Skip to content
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

Eth2 Light Client #582

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
4ae7d2d
Links eth2 light client
Feb 14, 2022
605a234
Adds pallet scaffolding
Feb 14, 2022
fa2707d
Moves lib.rs into src
Feb 14, 2022
b1b08a7
Removes lib.rs in root dir
Feb 14, 2022
b662c91
Fix compiler warnings
claravanstaden Feb 14, 2022
4278337
Adds mock and test files
claravanstaden Feb 14, 2022
1c036d8
Update parachain/pallets/ethereum2-light-client/src/lib.rs
claravanstaden Feb 14, 2022
7255ad6
Cleans mock and test files
claravanstaden Feb 15, 2022
92b5508
Adds LightClientUpdate struct
claravanstaden Feb 15, 2022
a96a4f2
Adds basic test for update
claravanstaden Feb 15, 2022
3503e65
Adds light client update methods
claravanstaden Feb 15, 2022
17a6597
More light client update impl
claravanstaden Feb 15, 2022
4fff120
Fix compiler errors
claravanstaden Feb 15, 2022
5444f66
Rough impl done
claravanstaden Feb 15, 2022
f01f3cd
Removes traits that aren't required anymore
claravanstaden Feb 15, 2022
c94a676
Fix tests, thanks Vincent!
claravanstaden Feb 16, 2022
7e0b73a
Changes sync_committee_bits to use sum method
claravanstaden Feb 17, 2022
6999a70
Further fleshing out the client
claravanstaden Feb 17, 2022
24417e5
Fleshed out client some more
claravanstaden Feb 17, 2022
d99bfdc
Updates String types to Vec<u8>
claravanstaden Feb 17, 2022
3900cd5
Cleanup and refactoring data types
claravanstaden Feb 18, 2022
0029bfd
Working on Merkle proofs
claravanstaden Feb 21, 2022
9b08746
Adds hash_tree_root body
claravanstaden Feb 21, 2022
b037643
Merkle proof functions works 🎉
claravanstaden Feb 22, 2022
bb23971
Renames light client
claravanstaden Feb 23, 2022
aa9c4a2
Working on domain methods
claravanstaden Feb 23, 2022
f0dbf81
Cleanup
claravanstaden Feb 24, 2022
2dd3885
BLS verification, test not passing yet
claravanstaden Feb 24, 2022
86929a1
Adds cleanup TODOS
claravanstaden Feb 24, 2022
a3134bb
BLS verification implemented 🥳
claravanstaden Feb 25, 2022
1d0099c
SSZ encoding and merkleize tests
claravanstaden Feb 28, 2022
fb3e71b
Try using hash_tree_root
claravanstaden Mar 1, 2022
fbb18db
Format
claravanstaden Mar 1, 2022
dc8a93e
Hash tree root works
claravanstaden Mar 1, 2022
3053f04
Add more unit tests
claravanstaden Mar 1, 2022
d00ea45
Removes unnecessary struct
claravanstaden Mar 4, 2022
e01ee8b
Adds process_slot dispatchable
claravanstaden Mar 4, 2022
d71f624
Comments for presentation
claravanstaden Mar 8, 2022
9231cbb
Interim commit pulling in ssz_rs
claravanstaden Mar 17, 2022
5252fb5
Revert potential fix
claravanstaden Mar 17, 2022
60f79b7
Refactor to use ssz_rs instead of hashtree, introduced merklization mod
claravanstaden Mar 18, 2022
66cfca2
Refactored error handling
claravanstaden Mar 18, 2022
bd099b4
Updates Cargo edition
claravanstaden Mar 18, 2022
0b56f05
Adds merklization.rs
claravanstaden Mar 22, 2022
0bbe520
Adds license to Beacon Light client pallet.
Apr 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions parachain/Cargo.lock

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

1 change: 1 addition & 0 deletions parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ members = [
"pallets/dispatch",
"pallets/nft",
"pallets/ethereum-light-client",
"pallets/ethereum2-light-client",
"pallets/eth-app",
"pallets/erc20-app",
"pallets/erc721-app",
Expand Down
58 changes: 58 additions & 0 deletions parachain/pallets/ethereum2-light-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[package]
name = "snowbridge-ethereum2-light-client"
description = "Snowbridge Eth2 Light Client Pallet"
version = "0.0.1"
edition = "2018"
authors = ["Snowfork <contact@snowfork.com>"]
repository = "https://github.com/Snowfork/snowbridge"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
serde = { version = "1.0.130", optional = true }
codec = { version = "2.2.0", package = "parity-scale-codec", default-features = false, features = ["derive"] }
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
hex = { package = "rustc-hex", version = "2.1.0", default-features = false }
hex-literal = { version = "0.3.1", optional = true }
rlp = { version = "0.5", default-features = false }

frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.12", default-features = false, optional = true }
frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.12", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.12", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.12", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.12", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.12", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.12", default-features = false }

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

[dev-dependencies]
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.12" }
hex-literal = { version = "0.3.1" }
snowbridge-testutils = { path = "../../primitives/testutils" }
serde_json = "1.0.68"

[features]
default = ["std"]
std = [
"serde",
"codec/std",
"scale-info/std",
"frame-support/std",
"frame-system/std",
"rlp/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"snowbridge-core/std",
"snowbridge-ethereum/std",
]
runtime-benchmarks = [
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"hex-literal",
]
Loading