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

Snowbridge Ethereum Deneb fork preparation #3029

Merged
merged 48 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4de9edf
cleanup test imports (#96)
claravanstaden Jan 16, 2024
eef706e
Adds emulated test comments (#97)
claravanstaden Jan 16, 2024
2922db0
Dencun (#102)
yrong Jan 19, 2024
0dff6f4
Schedule dencun on sepolia (#104)
yrong Jan 23, 2024
31b55c7
rm subtree
Jan 23, 2024
a5b4fbb
Merge commit '65b4312577e57d529c43269154b48a627d410d0e' as 'bridges/s…
Jan 23, 2024
65b4312
Squashed 'bridges/snowbridge/' content from commit d65afb42f62
Jan 23, 2024
3d3d1a7
update subtree
Jan 23, 2024
fd7c142
adds prdoc
Jan 23, 2024
071902b
Merge branch 'master' into snowbridge-deneb-updates
Jan 23, 2024
9e2a925
updates lock file
Jan 23, 2024
108e14c
Remove minimal spec (#100)
claravanstaden Jan 23, 2024
5eb62e1
Squashed 'bridges/snowbridge/' changes from d65afb42f62..53a5522d494
Jan 23, 2024
20a5d6e
updates subtree
Jan 23, 2024
d554861
Merge branch 'master' into snowbridge-deneb-updates
claravanstaden Jan 23, 2024
cb6abc6
fmt
Jan 23, 2024
82bba29
Merge remote-tracking branch 'origin/snowbridge-deneb-updates' into s…
Jan 23, 2024
1cd207f
fix path
Jan 23, 2024
a72da8c
update spec version
Jan 23, 2024
d562823
Merge branch 'master' into snowbridge-deneb-updates
Jan 24, 2024
969cfc0
fix rust doc and lock file
Jan 24, 2024
57f9b19
revert path update
Jan 24, 2024
632f412
revert spec version update
Jan 24, 2024
20dbd93
Merge branch 'master' into snowbridge-deneb-updates
claravanstaden Jan 25, 2024
91e7dc7
Squashed 'bridges/snowbridge/' changes from 53a5522d494..ef3d640a459
Jan 25, 2024
a9c1c65
milagro bls and ethabi crates
Jan 25, 2024
d745785
Merge remote-tracking branch 'origin/snowbridge-deneb-updates' into s…
Jan 25, 2024
56271a0
Register token with inbound fixture (#106)
yrong Jan 26, 2024
5083767
Adds Runtime tests (#98)
claravanstaden Jan 26, 2024
6f155c3
merge fixes
Jan 26, 2024
c662eb2
Squashed 'bridges/snowbridge/' changes from ef3d640a459..252df12a5a4
Jan 26, 2024
ea2ca38
update subtree
Jan 26, 2024
e5cb3a7
Merge branch 'master' into snowbridge-deneb-updates
claravanstaden Jan 29, 2024
d6f43a5
update cargo.lock and fix markdown
Jan 29, 2024
a9c4a32
Merge branch 'master' into snowbridge-deneb-updates
claravanstaden Jan 29, 2024
808dd21
Reset Nonces in Rococo (#109)
alistair-singh Jan 29, 2024
ba1d529
Disable create agent/channel (#108)
yrong Jan 29, 2024
0748d0e
Squashed 'bridges/snowbridge/' changes from 252df12a5a4..3c4fe56af66
Jan 29, 2024
34def83
updates subtree
Jan 29, 2024
55f4dd6
fix clippy
Jan 29, 2024
dadc817
fix removing incorrect variable
Jan 29, 2024
557cfb8
Merge branch 'master' into snowbridge-deneb-updates
claravanstaden Jan 29, 2024
bec72f3
fix removing incorrect variable
Jan 29, 2024
8bb432a
Merge remote-tracking branch 'origin/snowbridge-deneb-updates' into s…
Jan 29, 2024
dff0d17
fixing weird downgrades and missing no default features
Jan 29, 2024
d13b08b
Merge branch 'master' into snowbridge-deneb-updates
claravanstaden Jan 29, 2024
75ccedb
zepter
Jan 29, 2024
1dedc2a
Merge remote-tracking branch 'origin/snowbridge-deneb-updates' into s…
Jan 29, 2024
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
3 changes: 3 additions & 0 deletions Cargo.lock

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

5 changes: 2 additions & 3 deletions bridges/snowbridge/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Snowbridge ·
[![codecov](https://codecov.io/gh/Snowfork/snowbridge/branch/main/graph/badge.svg?token=9hvgSws4rN)]
(https://codecov.io/gh/Snowfork/snowbridge)
# Snowbridge
[![codecov](https://codecov.io/gh/Snowfork/snowbridge/branch/main/graph/badge.svg?token=9hvgSws4rN)](https://codecov.io/gh/Snowfork/snowbridge)
![GitHub](https://img.shields.io/github/license/Snowfork/snowbridge)

Snowbridge is a trustless bridge between Polkadot and Ethereum. For documentation, visit https://docs.snowbridge.network.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,3 @@ try-runtime = [
"pallet-timestamp?/try-runtime",
"sp-runtime/try-runtime",
]
beacon-spec-minimal = []
fast-runtime = ["beacon-spec-minimal"]

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
use super::*;
mod fixtures;
mod util;

use crate::Pallet as EthereumBeaconClient;
use frame_benchmarking::v2::*;
use frame_system::RawOrigin;

#[cfg(feature = "beacon-spec-minimal")]
mod fixtures_minimal;
#[cfg(feature = "beacon-spec-minimal")]
use fixtures_minimal::*;

#[cfg(not(feature = "beacon-spec-minimal"))]
mod fixtures_mainnet;
#[cfg(not(feature = "beacon-spec-minimal"))]
use fixtures_mainnet::*;
use fixtures::*;

use primitives::{
fast_aggregate_verify, prepare_aggregate_pubkey, prepare_aggregate_signature,
Expand Down Expand Up @@ -79,7 +72,7 @@ mod benchmarks {
let checkpoint_update = make_checkpoint();
let finalized_header_update = make_finalized_header_update();
let execution_header_update = make_execution_header_update();
let execution_header_hash = execution_header_update.execution_header.block_hash;
let execution_header_hash = execution_header_update.execution_header.block_hash();
EthereumBeaconClient::<T>::process_checkpoint_update(&checkpoint_update)?;
EthereumBeaconClient::<T>::process_update(&finalized_header_update)?;

Expand Down Expand Up @@ -151,16 +144,5 @@ mod benchmarks {
Ok(())
}

#[cfg(feature = "beacon-spec-minimal")]
impl_benchmark_test_suite!(
EthereumBeaconClient,
crate::mock::minimal::new_tester(),
crate::mock::minimal::Test
);
#[cfg(not(feature = "beacon-spec-minimal"))]
impl_benchmark_test_suite!(
EthereumBeaconClient,
crate::mock::mainnet::new_tester(),
crate::mock::mainnet::Test
);
impl_benchmark_test_suite!(EthereumBeaconClient, crate::mock::new_tester(), crate::mock::Test);
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
use primitives::merkle_proof::{generalized_index_length, subtree_index};
use static_assertions::const_assert;

pub mod mainnet;
pub mod minimal;

#[cfg(feature = "beacon-spec-minimal")]
pub use minimal::*;

#[cfg(not(feature = "beacon-spec-minimal"))]
pub use mainnet::*;

// Generalized Indices

// get_generalized_index(BeaconState, 'block_roots')
Expand Down Expand Up @@ -54,3 +45,10 @@ pub const PUBKEY_SIZE: usize = 48;
pub const SIGNATURE_SIZE: usize = 96;

const_assert!(SYNC_COMMITTEE_BITS_SIZE == SYNC_COMMITTEE_SIZE / 8);

pub const SLOTS_PER_EPOCH: usize = 32;
pub const EPOCHS_PER_SYNC_COMMITTEE_PERIOD: usize = 256;
pub const SYNC_COMMITTEE_SIZE: usize = 512;
pub const SYNC_COMMITTEE_BITS_SIZE: usize = SYNC_COMMITTEE_SIZE / 8;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always nice to have one line of doc on public stuff 😋

pub const SLOTS_PER_HISTORICAL_ROOT: usize = 8192;
pub const BLOCK_ROOT_AT_INDEX_DEPTH: usize = 13;
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ pub mod pallet {
let latest_execution_state: ExecutionHeaderState = Self::latest_execution_state();
ensure!(
latest_execution_state.block_number == 0 ||
update.execution_header.block_number ==
update.execution_header.block_number() ==
latest_execution_state.block_number + 1,
Error::<T>::ExecutionHeaderSkippedBlock
);
Expand Down Expand Up @@ -603,7 +603,7 @@ pub mod pallet {
}

Self::store_execution_header(
update.execution_header.block_hash,
update.execution_header.block_hash(),
update.execution_header.clone().into(),
update.header.slot,
block_root,
Expand Down Expand Up @@ -786,6 +786,9 @@ pub mod pallet {

/// Returns the fork version based on the current epoch.
pub(super) fn select_fork_version(fork_versions: &ForkVersions, epoch: u64) -> ForkVersion {
if epoch >= fork_versions.deneb.epoch {
return fork_versions.deneb.version
}
if epoch >= fork_versions.capella.epoch {
return fork_versions.capella.version
}
Expand All @@ -795,7 +798,6 @@ pub mod pallet {
if epoch >= fork_versions.altair.epoch {
return fork_versions.altair.version
}

fork_versions.genesis.version
}

Expand Down
Loading
Loading