-
Notifications
You must be signed in to change notification settings - Fork 58
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
External Index handling as sent by external chain #836
Merged
Conversation
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
WASM runtime size check:Compared to target branchdancebox runtime: 1412 KB (no changes) ✅ flashbox runtime: 824 KB (no changes) ✅ dancelight runtime: 2172 KB (no changes) ✅ container chain template simple runtime: 1116 KB (no changes) ✅ container chain template frontier runtime: 1404 KB (no changes) ✅ |
Coverage Report@@ Coverage Diff @@
## master girazoki-add-timestamp-handling +/- ##
===================================================================
+ Coverage 66.01% 66.04% +0.03%
Files 335 335
+ Lines 58789 58858 +69
===================================================================
+ Hits 38809 38869 +60
+ Misses 19980 19989 +9
|
girazoki
added
B7-runtimenoteworthy
Changes should be noted in any runtime-upgrade release notes
D5-nicetohaveaudit⚠️
PR contains trivial changes to logic that should be properly reviewed.
breaking
Needs to be mentioned in breaking changes
labels
Jan 31, 2025
girazoki
changed the title
timestamp handling as sent externally
External Index handling as sent by external chain
Jan 31, 2025
Agusrodri
reviewed
Jan 31, 2025
tmpolaczyk
reviewed
Jan 31, 2025
Agusrodri
reviewed
Jan 31, 2025
tmpolaczyk
approved these changes
Jan 31, 2025
Agusrodri
reviewed
Jan 31, 2025
Agusrodri
approved these changes
Jan 31, 2025
ParthDesai
approved these changes
Jan 31, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
B7-runtimenoteworthy
Changes should be noted in any runtime-upgrade release notes
breaking
Needs to be mentioned in breaking changes
D5-nicetohaveaudit⚠️
PR contains trivial changes to logic that should be properly reviewed.
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.
Adds handling of the epoch sent externally as part of the validators. this is used later to pinpoint reward and slashes to a certain point in time. As part of this PR we do:
store the external index (which can be an epoch/timestamp/set_id or in general whatever you want that acts as an indetifier for the validators sent at a given point in time) per era. Everytime we receive one we put it in storage item called
ExternalIndex
. Before the era start, we put this inPendingExternalIndex
. At the era start, we put it inCurrentExternalIndex
.on_era_start
now sends this timestamp over. The goal is that pallet-external-validator-slashes stores this information inBondedEras
. As this is the information later used to pinpoint slahes, we use it to pinpoint a particular slash to a external index.externalValidatorsRewards now sends
CurrentExternalndex
as part of the rewards message.Includes a migration to migrate currently bonded eras
To verify it works with try-runtime:
try-runtime --runtime target/release/wbuild/dancelight-runtime/dancelight_runtime.compact.compressed.wasm on-runtime-upgrade live --uri wss://stagelight.tanssi-dev.network:443 --pallet ExternalValidatorSlashes --pallet CollatorConfiguration --pallet Balances --pallet Migrations --pallet Configuration