-
Notifications
You must be signed in to change notification settings - Fork 118
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
Snow VM #1831
Merged
Merged
Snow VM #1831
Changes from 52 commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
9e347ab
Create snow vm wrapper to provide snowman.Block types
aaronbuchwald 02c86a2
update vm package to match new snow.Chain interface
aaronbuchwald a5f86a6
add back state sync ready check
aaronbuchwald 11e56af
Separate snow vm from chain
aaronbuchwald da945fa
Add snow tests
aaronbuchwald 053cf8a
Add snow fuzz test
aaronbuchwald f496712
clean up
aaronbuchwald de739b3
Add state sync vm tests
aaronbuchwald b47f5cb
Add FinishStateSync and FinishOnAcceptedAncestor test
aaronbuchwald e4fa1ec
Handle init ready/not ready
aaronbuchwald e09bc90
fix state sync tests
aaronbuchwald 9e4daa0
move
aaronbuchwald a5dcdc2
Re-arrange
aaronbuchwald 39fe626
Update vm metrics
aaronbuchwald 8fb7697
Separate chain index
aaronbuchwald 2c24704
rename snow options to application
aaronbuchwald 9ea286c
working with MakeChainIndexF
aaronbuchwald 156ded0
Add hypervm unit tests
aaronbuchwald 46b1bfa
Add external subscriber unit test
aaronbuchwald a86f91c
Add direct state API unit test
aaronbuchwald 6bd3a69
Add ws integration test
aaronbuchwald 3bdd769
fix ws client integration test to handle buggy ws server
aaronbuchwald 7f7afd2
Remove outstanding test comments
aaronbuchwald 78079a2
WIP: add state sync integration test
aaronbuchwald f46637d
Integration tests working
aaronbuchwald e8845d5
remove dead code
aaronbuchwald e8be361
Remove deadcode and add shutdown to vm tests
aaronbuchwald bb5fc69
trim config
aaronbuchwald 2cd7b9f
Add back stateful block Stringer
aaronbuchwald 02af352
Fix lint
aaronbuchwald 0d5e56e
fix: keep txs after gossiping instead of dropping after gossip to pro…
aaronbuchwald e1aba3a
cleanup lint
aaronbuchwald 391bd4f
fix vm test
aaronbuchwald 31b2552
fix nolint
aaronbuchwald 1762edd
replace nolint:G404 with nolint:gosec
aaronbuchwald d24e07d
fix client access race condition during force gossip test
aaronbuchwald f8c4b97
fix race during state sync test
aaronbuchwald 42cd39a
re-arrange comment to avoid false positive dupword linter
aaronbuchwald b7f34ef
add version to morpheus constructor
aaronbuchwald 02dfb3e
cleanup snow package
aaronbuchwald 320c411
remove lifecycle package
aaronbuchwald 972fb0b
Remove unused test err
aaronbuchwald b9c0f71
fix mark ready in MakeChainIndex and test configs
aaronbuchwald 92b73a8
Cleanup
aaronbuchwald fe04049
Fix handling of stateReady in MakeChainIndex
aaronbuchwald ed6de54
name closers
aaronbuchwald 8f83c7b
fix e2e tests
aaronbuchwald 6d4fe49
Address comments
aaronbuchwald f767948
narrow hcontext to config only
aaronbuchwald c8880a6
Add needed config helpers to keep service configs the same
aaronbuchwald 06f6a46
fix lint
aaronbuchwald b90413a
go mod tidy
aaronbuchwald 86a8b47
Address comments
aaronbuchwald 0ed5c18
fix missing metric init
aaronbuchwald 7df4fb5
fix built txs metric and morpheusvm main
aaronbuchwald 38f01d4
Add comment to chainLock
aaronbuchwald 787b271
Merge branch 'main' into snow-vm
aaronbuchwald b62b541
Fix merge
aaronbuchwald 169c637
fix lint
aaronbuchwald 836087c
remove integration tests from CI
aaronbuchwald 1b01e8e
Snow vm integration (#1867)
aaronbuchwald 328ecf9
cleanup
aaronbuchwald e9cdda7
Remove recursive verification and improve snow tests
aaronbuchwald 546859d
Update sort func
aaronbuchwald efcefc7
replace readyL with atomic bool
aaronbuchwald 77e618c
Merge branch 'main' into snow-vm
aaronbuchwald 098714f
Merge branch 'main' into snow-vm
aaronbuchwald 514bdf4
Remove dead code getExclusiveBlockRange
aaronbuchwald 1262be9
bump initial balance
aaronbuchwald File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,9 +35,9 @@ func (b *Base) Execute(r Rules, timestamp int64) error { | |
// TODO: make this modulus configurable | ||
return fmt.Errorf("%w: timestamp=%d", ErrMisalignedTime, b.Timestamp) | ||
case b.Timestamp < timestamp: // tx: 100 block: 110 | ||
return ErrTimestampTooLate | ||
return fmt.Errorf("%w: tx timestamp (%d) < block timestamp (%d)", ErrTimestampTooLate, b.Timestamp, timestamp) | ||
case b.Timestamp > timestamp+r.GetValidityWindow(): // tx: 100 block 10 | ||
return ErrTimestampTooEarly | ||
return fmt.Errorf("%w: tx timestamp (%d) > block timestamp (%d) + validity window (%d)", ErrTimestampTooEarly, b.Timestamp, timestamp, r.GetValidityWindow()) | ||
Comment on lines
+38
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added details while debugging newly added tests. These errors are much more helpful with the added information. |
||
case b.ChainID != r.GetChainID(): | ||
return ErrInvalidChainID | ||
default: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Fixes a bug discovered in a newly added test. If the error was nil, then the previous code triggered a panic.