Skip to content

Conversation

@devbugging
Copy link
Collaborator

Restricting access to process and execute to only service account, so the FVM can still execute them but others can't.

Other minor improvements to comments and some code cleanup.

@devbugging devbugging changed the base branch from master to feature/callback-scheduling August 8, 2025 12:01
Copy link
Member

@joshuahannan joshuahannan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just left the same comments that I left on #507 so we can just work and merge from here

/// and route all callback functionality
access(self) var sharedScheduler: Capability<auth(Cancel) &SharedScheduler>

access(all) let schedulerStoragePath: Path
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
access(all) let schedulerStoragePath: Path
access(all) let storagePath: Path

}

/// Get all timestamps that are in the past (less than or equal to current timestamp)
access(all) fun past(current: UFix64): [UFix64] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
access(all) fun past(current: UFix64): [UFix64] {
access(all) fun getTimestampsBefore(current: UFix64): [UFix64] {


/// Check if there are any timestamps that need processing
/// Returns true if processing is needed, false for early exit
access(all) fun check(current: UFix64): Bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
access(all) fun check(current: UFix64): Bool {
access(all) fun checkIfTimestampsNeedProcessing(current: UFix64): Bool {

@joshuahannan joshuahannan merged commit f96494a into onflow:feature/callback-scheduling Aug 12, 2025
1 check failed
joshuahannan added a commit that referenced this pull request Sep 15, 2025
* Optimise processing with sorted timestamps

* Add tests for sorted timestamps type

* Fix wrong assert args

* Extract garbage collection

* Add missing arg

* Handle wrong statuses

* Change access control to account

* Change access control to only limit process and execute to FVM

* Add comments

* Regenerate all the assets

* generate assets

---------

Co-authored-by: Joshua Hannan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants