-
Notifications
You must be signed in to change notification settings - Fork 54
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
Starlight <> Ethereum: Slashes mapping #793
base: master
Are you sure you want to change the base?
Conversation
WASM runtime size check:Compared to target branchdancebox runtime: 1416 KB (no changes) ✅ flashbox runtime: 824 KB (no changes) ✅ dancelight runtime: 2148 KB (+2148 KB) container chain template simple runtime: 1124 KB (-4296 KB) ✅ container chain template frontier runtime: 1400 KB (-5152 KB) ✅ |
let mut slashes_to_send: Vec<_> = vec![]; | ||
|
||
for unreported_slash in unreported_slashes.iter() { | ||
// TODO: check if validator.clone().encode() matches with the actual account bytes. |
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.
Maybe not, use validator.as_ref().to_vec()
* simplify slash process queue and process a page every block * on process page in on_initialize * fix one test
* optimize storage writes and prepare bench * run bench locally
Introduces slashes to be sent to Ethereum from pallet-external-validator-slashes.
Up to now slashes were just recorded but nothing was done with them. This PR changes this by:
QueuedSlashesProcessedPerBlock
. This batches are sent on-initialize of each block, with one batch at most per blockSlashes
command which contains: The era in which the slashes are sent, the slashes, and a timestamp. Currently the timestamp is likely wrong, in the future it will contain a timestamp to identify the validators in the external chain.