-
Notifications
You must be signed in to change notification settings - Fork 199
[DataAvailability] Implement fork-aware Execution Data Endpoints #7985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/optimistic-sync
Are you sure you want to change the base?
[DataAvailability] Implement fork-aware Execution Data Endpoints #7985
Conversation
…a to snapshot interface, refactored access and observer node builders, fixed tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a few small comments. overall this looks good. will wait for the rest of your changes before doing a thorough review
Co-authored-by: Peter Argue <[email protected]>
Co-authored-by: Peter Argue <[email protected]>
Co-authored-by: Peter Argue <[email protected]>
Co-authored-by: Peter Argue <[email protected]>
…ation of GetExecutionDataByBlockID
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
} | ||
|
||
// TODO: use real objects instead of mocks once they're implemented | ||
snapshot := osyncsnapshot.NewSnapshotMock( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn’t add the notNil()
check for any of the storages because some integration tests fail when it’s added. It’s expected that these storages can be nil
at that point, they’re either initialized or being initialized later during module setup, depending on flags such as storeTxResultErrorMessages
and executionDataSyncEnabled
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If any of these storages are not set when this module is run, then the snapshot will store nil for the db. Then when the API requests the db, it will get nil and panic.
I think adding the notNil()
check is a good idea. if anything is nil during bootstrapping, that points to an ordering problem that needs to be fixed.
engine/access/state_stream/backend/backend_executiondata_test.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a few small comments, but otherwise this looks good to me. I also agree with Peter's outstanding comments.
…ction in observer builder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly small comments. the main 2 were about error handling and bootstrapping. otherwise this looks good
.mockery.yaml
Outdated
interfaces: | ||
Core: | ||
Snapshot: | ||
BlockExecutionDataReader: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if we remove all of the config for github.com/onflow/flow-go/module/executiondatasync/optimistic_sync
and just let it generate all of the mocks? if it's only a couple extra we may not need, I vote we do that to keep the config simple
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peterargue yes, it will generate additional mocks for(PipelineStateConsumer
, PipelineFactory
, PipelineStateProvider
, CoreFactory
), which I believe is not too much. So I will remove the separate config for optimistic_sync
.
} | ||
|
||
// TODO: use real objects instead of mocks once they're implemented | ||
snapshot := osyncsnapshot.NewSnapshotMock( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If any of these storages are not set when this module is run, then the snapshot will store nil for the db. Then when the API requests the db, it will get nil and panic.
I think adding the notNil()
check is a good idea. if anything is nil during bootstrapping, that points to an ordering problem that needs to be fixed.
engine/access/state_stream/backend/backend_executiondata_test.go
Outdated
Show resolved
Hide resolved
engine/access/state_stream/backend/backend_executiondata_test.go
Outdated
Show resolved
Hide resolved
engine/access/state_stream/backend/backend_executiondata_test.go
Outdated
Show resolved
Hide resolved
… before creating NewSnapshotMock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I left a few minor comments.
closes: #7656
Context