-
Notifications
You must be signed in to change notification settings - Fork 180
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
Port #4063 to master #4086
Port #4063 to master #4086
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4086 +/- ##
==========================================
+ Coverage 53.45% 53.90% +0.44%
==========================================
Files 832 621 -211
Lines 77809 55458 -22351
==========================================
- Hits 41596 29892 -11704
+ Misses 32883 23180 -9703
+ Partials 3330 2386 -944
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 223 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
thanks @jordanschalm!
@@ -83,11 +84,12 @@ func (s *blockSignerDecoderSuite) Test_UnexpectedCommitteeException() { | |||
// It should propagate the sentinel error model.ErrViewForUnknownEpoch from Committee. | |||
func (s *blockSignerDecoderSuite) Test_UnknownEpoch() { |
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.
can you add a couple more tests to cover the 3 error cases:
- ParentView's epoch is not in cache, but block exists
- IdentitiesByEpoch returns non-sentinel
- IdentitiesByBlock returns an error
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've added these in a follow-up PR: #4093
Your comment made me realize that the implementation didn't differentiate between storage exceptions and unknown input blocks.
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.
👍
would you mind fixing the typo here:
// the auxilluary logic for de-coding signer indices of a block (header) to full node IDs
"auxilluary" -> auxiliary
bors merge |
4093: Check reference at snapshot creation r=jordanschalm a=jordanschalm This PR extends #4086, adding checks to snapshot creation to differentiate between exceptions and unknown blocks in BlockSignerDecoder. - Updates `protocol.Snapshot` to guarantee that `ErrUnknownSnapshotReference` is returned in all cases where a snapshot's reference is unknown - Add existence checking methods to `storage/common`, `storage.Cache` - Updates BlockSignerDecoder to differentiate between errors from an unknown input block and exception - Misc: marks all unexpected errors in `storage/common` as exceptions - Misc: update `flow-emu` version to include onflow/flow-emulator#280 (avoid changes to `Headers` being breaking) 4140: Storage layer test refactor r=janezpodhostnik a=janezpodhostnik Extracting pieces from #3736 so its easier to digest and merge. Co-authored-by: Jordan Schalm <jordan@dapperlabs.com> Co-authored-by: Janez Podhostnik <janez.podhostnik@gmail.com>
4093: Check reference at snapshot creation r=jordanschalm a=jordanschalm This PR extends #4086, adding checks to snapshot creation to differentiate between exceptions and unknown blocks in BlockSignerDecoder. - Updates `protocol.Snapshot` to guarantee that `ErrUnknownSnapshotReference` is returned in all cases where a snapshot's reference is unknown - Add existence checking methods to `storage/common`, `storage.Cache` - Updates BlockSignerDecoder to differentiate between errors from an unknown input block and exception - Misc: marks all unexpected errors in `storage/common` as exceptions - Misc: update `flow-emu` version to include onflow/flow-emulator#280 (avoid changes to `Headers` being breaking) Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>
4093: Check reference at snapshot creation r=jordanschalm a=jordanschalm This PR extends #4086, adding checks to snapshot creation to differentiate between exceptions and unknown blocks in BlockSignerDecoder. - Updates `protocol.Snapshot` to guarantee that `ErrUnknownSnapshotReference` is returned in all cases where a snapshot's reference is unknown - Add existence checking methods to `storage/common`, `storage.Cache` - Updates BlockSignerDecoder to differentiate between errors from an unknown input block and exception - Misc: marks all unexpected errors in `storage/common` as exceptions - Misc: update `flow-emu` version to include onflow/flow-emulator#280 (avoid changes to `Headers` being breaking) Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>
DecodeSignerIDs
#4063 tomaster