Skip to content

Commit aff8110

Browse files
authored
Use the same signature threshold used in bsc parlia consensus (#712)
1 parent efea69e commit aff8110

File tree

7 files changed

+9
-8
lines changed

7 files changed

+9
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ dist/
1212
/pallet-ismp/evm/solidity/cache
1313
.env*
1414
.vscode
15+
.cursor
1516

1617
evm/out/
1718
evm/cache/

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/consensus/bsc/prover/src/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ async fn verify_bsc_pos_headers() {
132132

133133
// Skip blocks without enough participants (2/3 + 1 threshold)
134134
let participant_count = validators_bit_set.iter().as_bitslice().count_ones();
135-
let required_participants = (2 * validator_set_for_check.len() / 3) + 1;
135+
let required_participants = (2 * validator_set_for_check.len() / 3);
136136
if participant_count < required_participants {
137137
println!(
138138
"Not enough participants in bsc update for block {} ({}/{}), skipping",

modules/consensus/bsc/verifier/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ pub fn verify_bsc_header<H: Keccak256, C: Config>(
6464
)
6565
.map_err(|_| anyhow!("Could not deseerialize vote address set"))?;
6666

67-
if validators_bit_set.iter().as_bitslice().count_ones() <
68-
((2 * current_validators.len() / 3) + 1)
69-
{
67+
// We have to use the same threshold specified in the bsc parlia consensus which is 2/3
68+
// https://github.com/bnb-chain/bsc/blob/da35ee13e2fe38efaeab2d6fb27f112332459b50/consensus/parlia/parlia.go#L557
69+
if validators_bit_set.iter().as_bitslice().count_ones() < ((2 * current_validators.len()) / 3) {
7070
Err(anyhow!("Not enough participants"))?
7171
}
7272

parachain/runtimes/gargantua/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
238238
spec_name: Cow::Borrowed("gargantua"),
239239
impl_name: Cow::Borrowed("gargantua"),
240240
authoring_version: 1,
241-
spec_version: 5_000,
241+
spec_version: 5_100,
242242
impl_version: 0,
243243
apis: RUNTIME_API_VERSIONS,
244244
transaction_version: 1,

parachain/runtimes/nexus/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
227227
spec_name: Cow::Borrowed("nexus"),
228228
impl_name: Cow::Borrowed("nexus"),
229229
authoring_version: 1,
230-
spec_version: 6_500,
230+
spec_version: 6_600,
231231
impl_version: 0,
232232
apis: RUNTIME_API_VERSIONS,
233233
transaction_version: 1,

tesseract/consensus/relayer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tesseract-consensus"
3-
version = "1.6.3"
3+
version = "1.6.4"
44
edition = "2021"
55

66
[lib]

0 commit comments

Comments
 (0)