Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Beacon block sync (paritytech#623)
Browse files Browse the repository at this point in the history
* Start working on beacon block sync

* Progress on beacon block verification

* Beacon block verification

* Block proof progress

* Updates ssz_rs version with transactions panic fix.

* Use tested individual merkleization functions in beacon block proof

* Beacon block proof works

* Beacon block with transactions and attester slashing also works

* Pins byte-slice-cast version, checks rust version

* remove ssz_rs rev

* Tries updating Rust version

* Updates ssz-rs name and version

* Updates ssz-rs version

* Updates ssz-rs-derive too

* Moves Beacon structs into primitives

* Adds new beacon primitive files

* Fixes no-std issues.

* Cleanup and refactor.

* More cleanup

* PR comments

* Merged main

Co-authored-by: claravanstaden <Cats 4 life!>
  • Loading branch information
claravanstaden authored May 31, 2022
1 parent af5434c commit 1b5d8d5
Show file tree
Hide file tree
Showing 15 changed files with 4,184 additions and 916 deletions.
127 changes: 63 additions & 64 deletions parachain/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions parachain/pallets/ethereum-beacon-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ serde = { version = "1.0.136", optional = true }
codec = { version = "3.0.0", package = "parity-scale-codec", default-features = false, features = ["derive"] }
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }
milagro_bls = { git = "https://github.com/Snowfork/milagro_bls", default-features = false }
ssz_rs = { git = "https://github.com/Snowfork/ssz_rs", default-features = false }
ssz_rs_derive = { git = "https://github.com/Snowfork/ssz_rs", default-features = false }
ssz-rs = { git = "https://github.com/Snowfork/ssz_rs", default-features = false, rev="8d497a949c320577aa1f741eb9f2958191df905b" }
ssz-rs-derive = { git = "https://github.com/Snowfork/ssz_rs", default-features = false, rev="8d497a949c320577aa1f741eb9f2958191df905b" }
byte-slice-cast = { version = "1.2.1", default-features = false }

frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.19", default-features = false, optional = true }
frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.19", default-features = false }
Expand All @@ -28,6 +29,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "po

snowbridge-core = { path = "../../primitives/core", default-features = false }
snowbridge-ethereum = { path = "../../primitives/ethereum", default-features = false }
snowbridge-beacon = { path = "../../primitives/beacon", default-features = false }

[dev-dependencies]
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.19" }
Expand All @@ -49,8 +51,10 @@ std = [
"sp-std/std",
"snowbridge-core/std",
"snowbridge-ethereum/std",
"snowbridge-beacon/std",
"milagro_bls/std",
"ssz_rs/std",
"ssz-rs/std",
"byte-slice-cast/std"
]
runtime-benchmarks = [
"frame-benchmarking",
Expand Down
21 changes: 21 additions & 0 deletions parachain/pallets/ethereum-beacon-client/src/config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pub const MAX_PROPOSER_SLASHINGS: usize = 16;

pub const MAX_ATTESTER_SLASHINGS: usize = 2;

pub const MAX_ATTESTATIONS: usize = 128;

pub const MAX_DEPOSITS: usize = 16;

pub const MAX_VOLUNTARY_EXITS: usize = 16;

pub const MAX_VALIDATORS_PER_COMMITTEE: usize = 2048;

pub const DEPOSIT_CONTRACT_TREE_DEPTH: usize = 32;

pub const MAX_BYTES_PER_TRANSACTION: usize = 1073741824;

pub const MAX_TRANSACTIONS_PER_PAYLOAD: usize = 1048576;

pub const MAX_EXTRA_DATA_BYTES: usize = 32;

pub const SYNC_COMMITTEE_SIZE: usize = 512;
Loading

0 comments on commit 1b5d8d5

Please sign in to comment.