-
Notifications
You must be signed in to change notification settings - Fork 215
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
sync2: ATX integration #6448
Open
ivan4th
wants to merge
12
commits into
sync2/fix-multipeer
Choose a base branch
from
sync2/atxs
base: sync2/fix-multipeer
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
sync2: ATX integration #6448
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4828b67
sync2: ATX integration
ivan4th a89964a
Merge branch 'sync2/dbset-conns' into sync2/atxs
ivan4th 294bc6c
Merge branch 'sync2/fix-multipeer' into sync2/atxs
ivan4th 1ff57ab
Merge branch 'sync2/dbset-conns' into sync2/atxs
ivan4th ce73f54
sync2: use saner retry scheme for fetched ATXs
ivan4th f411f7e
syncer: rename "v2" field to "reconcSync" in the config
ivan4th bb7226f
sync2: add server options and request rate limits
ivan4th 50afbf8
Merge branch 'develop' into sync2/atxs
ivan4th 284f836
sync2: fix mainnet/testnet configs
ivan4th a8d87f1
sync2: only handle synced keys during commit
ivan4th bb54fd8
Merge branch 'develop' into sync2/atxs
ivan4th 244ceb1
Merge branch 'sync2/fix-multipeer' into sync2/atxs
ivan4th 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 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.
I don't like how this config is structured, what is the meaning of
OldAtxSyncCfg
andNewAtxSyncCfg
?Is there maybe a better name for them?
Why are they part of
"main"
->"Syncer"
->"V2"
? Shouldn't they be part of the"main"
->"Syncer"
config object?Also if these are the defaults anyway, no need to overwrite them with the same values here again 🙂
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.
EDIT: fixed spelling
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.
This might cause confusion as there's currently V1 sync for ATXs, too, which is also configured in the syncer config.
When V2 is used in server-only mode, both V1 and V2 syncs are used at the same time.
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.
The idea is to use reasonable defaults so that most users will not have to adjust sync settings.
Then at some time in the future we might want to restructure the config to remove all the v1 stuff and keep v2 sync only, moving it out of this
v2
field.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.
old vs new in this context means old epochs vs the current epoch
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.
Ah so it is actually
PrevEpochSyncConfig
andCurrentEpochSyncConfig
? 🙂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.
The reasonable defaults are already specified as part of the
syncer.DefaultConfig
, my point was that we don't need to overwrite this values again with the same values inconfig.MainnetConfig
🙂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.
But this is a technical detail that I think should not be exposed via the config, or at least in a different way. Maybe instead of
V2
we can call it something like "reconciliationSync" or similar. Especially since "V2" has negative connotations: https://en.wikipedia.org/wiki/V-2_rocketThere 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.
Actually there's a bit of confusion re current vs prev, and I was imprecise in my above comment.
When a new epoch starts, activations don't start to be published in that epoch immediately, and consequently, the more efficient (but more memory and CPU hungry per missing/extra set element) sync is to be applied to the new epoch some time later (
EpochEndFraction
in the existing sync config). That's why the "new" epoch is not necessarily the current one, and the "old" epoch is not necessarily the previous. We could probably come up with better naming but I'm unsurecurrent
/prev
is the right choice here.Otherwise agree, will fix
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.
Renamed to
v2
part toreconc-sync
(ReconcSync
).