-
Notifications
You must be signed in to change notification settings - Fork 278
sync: coreth PR #963,981,1009: sync package extension and related items #1679
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
Open
JonathanOppenheimer
wants to merge
56
commits into
master
Choose a base branch
from
sync-pr-963-atomic-sync-package
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
01053b3
first pass
JonathanOppenheimer f3fd073
reapply wait changes
JonathanOppenheimer d04a7fc
add test back
JonathanOppenheimer 239a3b5
attempt 2
JonathanOppenheimer 52e4d26
sync part 3!
JonathanOppenheimer 34e3c48
sync part 4
JonathanOppenheimer ae531aa
oops broke the clock
JonathanOppenheimer 38ecb7e
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer 08bf133
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer a759870
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer 912b506
Merge remote-tracking branch 'origin/master' into sync-pr-963-atomic-…
JonathanOppenheimer 892379e
remove duplicate import
JonathanOppenheimer c7c0c9a
lint
JonathanOppenheimer 4719758
Merge remote-tracking branch 'origin/master' into sync-pr-963-atomic-…
JonathanOppenheimer 434fb4f
lint
JonathanOppenheimer 936aacc
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer 0edb94f
lint
JonathanOppenheimer af00a05
Merge remote-tracking branch 'origin/master' into sync-pr-963-atomic-…
JonathanOppenheimer 3cb3808
Merge remote-tracking branch 'origin/master' into sync-pr-963-atomic-…
JonathanOppenheimer 728620c
align with coreth
JonathanOppenheimer 52aba0c
add back advance clock setting
JonathanOppenheimer eb25788
simplify registration
JonathanOppenheimer 6ba1bd6
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer 59a0ccc
Merge remote-tracking branch 'origin/master' into sync-pr-963-atomic-…
JonathanOppenheimer 07edff7
merge
JonathanOppenheimer 2564286
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer fa8a32d
lint
JonathanOppenheimer 5d911d5
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer 14c8028
Merge remote-tracking branch 'origin/master' into sync-pr-963-atomic-…
JonathanOppenheimer 8fa7586
add errors back
JonathanOppenheimer 94c2b46
lint
JonathanOppenheimer 5b7d576
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer 8426e2a
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer 24e0ae0
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer 7e55ada
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer ac0b665
finish merge
JonathanOppenheimer 2a46756
Merge remote-tracking branch 'origin/master' into sync-pr-963-atomic-…
JonathanOppenheimer 40abb33
reduce diff
JonathanOppenheimer ba927d5
lint
JonathanOppenheimer 0cc7e3b
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer cced3ca
fix merge
JonathanOppenheimer 291003a
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer e84bf4a
Update plugin/evm/message/handler.go
JonathanOppenheimer 2356b60
Update sync/client/test_client.go
JonathanOppenheimer 9e4a453
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer 509e349
Update sync/client/stats/stats.go
JonathanOppenheimer 33837af
lint
JonathanOppenheimer 55f46e3
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer dca0da5
Merge remote-tracking branch 'origin' into sync-pr-963-atomic-sync-pa…
JonathanOppenheimer 29cf556
remove incorrect clock setting
JonathanOppenheimer 7aaf41a
revert breaking serialization change
JonathanOppenheimer 4e55173
lint
JonathanOppenheimer 1a3cfe9
Cey feedback
JonathanOppenheimer 3f3b9e2
Merge branch 'master' into sync-pr-963-atomic-sync-package
JonathanOppenheimer 04eb8ee
restore regossip addresses
JonathanOppenheimer 04ce7f5
lint
JonathanOppenheimer 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| // Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved. | ||
| // See the file LICENSE for licensing terms. | ||
|
|
||
| package message | ||
|
|
||
| import ( | ||
| "context" | ||
| "encoding/base64" | ||
| "testing" | ||
|
|
||
| "github.com/ava-labs/avalanchego/snow/engine/snowman/block" | ||
| "github.com/ava-labs/libevm/common" | ||
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| func TestMarshalBlockSyncSummary(t *testing.T) { | ||
| blockSyncSummary, err := NewBlockSyncSummary(common.Hash{1}, 2, common.Hash{3}) | ||
| require.NoError(t, err) | ||
|
|
||
| require.Equal(t, common.Hash{1}, blockSyncSummary.GetBlockHash()) | ||
| require.Equal(t, uint64(2), blockSyncSummary.Height()) | ||
| require.Equal(t, common.Hash{3}, blockSyncSummary.GetBlockRoot()) | ||
|
|
||
| expectedBase64Bytes := "AAAAAAAAAAAAAgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" | ||
| require.Equal(t, expectedBase64Bytes, base64.StdEncoding.EncodeToString(blockSyncSummary.Bytes())) | ||
|
|
||
| parser := NewBlockSyncSummaryParser() | ||
| called := false | ||
| acceptImplTest := func(Syncable) (block.StateSyncMode, error) { | ||
| called = true | ||
| return block.StateSyncSkipped, nil | ||
| } | ||
| s, err := parser.Parse(blockSyncSummary.Bytes(), acceptImplTest) | ||
| require.NoError(t, err) | ||
| require.Equal(t, blockSyncSummary.GetBlockHash(), s.GetBlockHash()) | ||
| require.Equal(t, blockSyncSummary.Height(), s.Height()) | ||
| require.Equal(t, blockSyncSummary.GetBlockRoot(), s.GetBlockRoot()) | ||
| require.Equal(t, blockSyncSummary.Bytes(), s.Bytes()) | ||
|
|
||
| mode, err := s.Accept(context.TODO()) | ||
| require.NoError(t, err) | ||
| require.Equal(t, block.StateSyncSkipped, mode) | ||
| require.True(t, called) | ||
| } |
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.