-
Notifications
You must be signed in to change notification settings - Fork 107
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
Fix find on-chain checkpoint #1294
Conversation
type ParachainConfig struct { | ||
Endpoint string `mapstructure:"endpoint"` | ||
MaxWatchedExtrinsics int64 `mapstructure:"maxWatchedExtrinsics"` | ||
HeaderRedundancy uint64 `mapstructure:"headerRedundancy"` |
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.
Setting to capture the max headers in the ringbuffer: // https://github.com/paritytech/polkadot-sdk/blob/master/bridges/snowbridge/pallets/ethereum-client/src/lib.rs#L75
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 we add a comment in the code describing the config item?
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.
Sure, 1956d87.
slotPeriodIndex := slot / syncCommitteePeriod | ||
|
||
for index := startIndex; index >= endIndex; index-- { | ||
totalStates := syncCommitteePeriod * h.protocol.HeaderRedundancy // Total size of the circular buffer, |
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.
Is total size of the circular buffer be 256*20=5120?
totalStates := h.protocol.Settings.EpochsPerSyncCommitteePeriod * h.protocol.HeaderRedundancy
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.
Exactly. 👍🏻
@@ -18,7 +18,8 @@ | |||
"sink": { | |||
"parachain": { | |||
"endpoint": "ws://127.0.0.1:11144", | |||
"maxWatchedExtrinsics": 8 | |||
"maxWatchedExtrinsics": 8, | |||
"headerRedundancy": 20 |
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 we just move the new config headerRedundancy
to config.SpecSettings
, then not much change required.
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.
That's true, but it is not really related to the Ethereum spec settings, which is why I didn't add it there.
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 just plz add a comment describing the new config item.
* Initialize for westend * Update beacon checkpoint * add back in para threads * fix out of bounds error * Smoke tests on westend * Load config from env * Cleanup env * Remove penpal code * Cleanup * Update smoke tests * Add westend env * crontab smoke tests * Split as two tests * Fix typo * Remove assets/parachain non-exist * Revert change * Wait config from env * Load interval from env * Add alarm check no transfer * Adds paseo UI (#1276) * adds paseo UI * remove muse and bump versions * remove muse and bump versions * remove veth token * paseo things * fix subscan urls * revert version * fix versions * Update api package * Fix the merge * Remove unused * Fix find on-chain checkpoint (#1294) * fix wrap around * logs * doesnt have to be in the same period * testing something * fix * adds test and config * writer * fix compilation * remove temp building relayer * comment * bump version --------- Co-authored-by: Alistair Singh <alistair.singh7@gmail.com> Co-authored-by: Clara van Staden <claravanstaden64@gmail.com>
* add back in para threads * fix out of bounds error * forward compatible * fix comment * move function back up * move again * Smoke test on westend (#1291) * Initialize for westend * Update beacon checkpoint * add back in para threads * fix out of bounds error * Smoke tests on westend * Load config from env * Cleanup env * Remove penpal code * Cleanup * Update smoke tests * Add westend env * crontab smoke tests * Split as two tests * Fix typo * Remove assets/parachain non-exist * Revert change * Wait config from env * Load interval from env * Add alarm check no transfer * Adds paseo UI (#1276) * adds paseo UI * remove muse and bump versions * remove muse and bump versions * remove veth token * paseo things * fix subscan urls * revert version * fix versions * Update api package * Fix the merge * Remove unused * Fix find on-chain checkpoint (#1294) * fix wrap around * logs * doesnt have to be in the same period * testing something * fix * adds test and config * writer * fix compilation * remove temp building relayer * comment * bump version --------- Co-authored-by: Alistair Singh <alistair.singh7@gmail.com> Co-authored-by: Clara van Staden <claravanstaden64@gmail.com> --------- Co-authored-by: Ron <yrong1997@gmail.com> Co-authored-by: Clara van Staden <claravanstaden64@gmail.com>
There were 2 bugs in the find on-chain checkpoint method:
Added new config in Ansible scripts: https://github.com/Snowfork/snowbridge-infra-suite/pull/24/files#diff-0bdba71d49616abfe1a14b43ead54c6df64cdbfca68c8e4e5fe47bd4a1e3ae2bR29