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

Commit

Permalink
Fix for runtime-benchmarks (paritytech#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong authored Nov 2, 2023
1 parent 2be6f57 commit 581f6f9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/parachain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ jobs:
--manifest-path polkadot-sdk/Cargo.toml
--release --verbose
--package bridge-hub-rococo-runtime
--features runtime-benchmarks
beacon-fuzz:
if: false
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/verification/polkadot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ N = \lceil log_2(R * V * \frac{1}{S} *(75+E)*172.8)\rceil + 1 + 2 \lceil log_2(C
$$

1. $$V$$ - Validator set length.
2. $$C$$ - The number of times a validator's signature was previously used for `submitInitial` calls within a session. There is no limit to how many times `submitInitial` can be called except for its gas cost. This allows an adversary to spam this transaction in order to gain influence over the RANDAO provided they can pay for gas. The light client will track how many times a validator signature is used when calling `submitIntial` in a session and increase the number of validator signatures required to be verified when finalizing the commitment. This will make finalizing the commitment cost more gas and would require more validators to back dishonest claims and be slashed by the BEEFY protocol.
2. $$C$$ - The number of times a validator's signature was previously used for `submitInitial` calls within a session. There is no limit to how many times `submitInitial` can be called except for its gas cost. This allows an adversary to spam this transaction in order to gain influence over the RANDAO provided they can pay for gas. The light client will track how many times a validator signature is used when calling `submitInitial` in a session and increase the number of validator signatures required to be verified when finalizing the commitment. This will make finalizing the commitment cost more gas and would require more validators to back dishonest claims and be slashed by the BEEFY protocol.
3. $$E$$ - RANDAO commit expiry. The number of blocks a relayer has to commit to a random seed based on RANDAO.
4. The ratio of the total supply of DOT to the minimum amount slashable. These are done using two heuristic variables.
1. $$R$$ - The ratio of total stake per validator.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use hex_literal::hex;
use snowbridge_beacon_primitives::CompactExecutionHeader;
use snowbridge_core::inbound::{Message, Proof};
use sp_std::vec;

pub struct InboundQueueTest {
pub execution_header: CompactExecutionHeader,
Expand Down
1 change: 1 addition & 0 deletions parachain/pallets/inbound-queue/src/benchmarking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use super::*;
use crate::Pallet as InboundQueue;
use frame_benchmarking::v2::*;
use frame_system::RawOrigin;
use sp_std::vec;

#[benchmarks]
mod benchmarks {
Expand Down
2 changes: 1 addition & 1 deletion polkadot-sdk

0 comments on commit 581f6f9

Please sign in to comment.