Skip to content

fix: update average_block_time#2245

Merged
Harraken merged 1 commit into
mainfrom
bsc-spec
Mar 30, 2026
Merged

fix: update average_block_time#2245
Harraken merged 1 commit into
mainfrom
bsc-spec

Conversation

@Tomelia1999

@Tomelia1999 Tomelia1999 commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

User description

Description

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • read the contribution guide
  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the main branch
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Generated description

Below is a concise technical summary of the changes proposed in this PR:
Correct the BSC network specification loader by setting average_block_time to 450ms so QoS and validation thresholds use realistic block pacing. Apply this timing across the mainnet-1 and testnet-2 spec data to keep provider staking parameters consistent.

Latest Contributors(2)
UserCommitDate
NadavLevifix-bsc-spec-update-BS...November 20, 2025
yarom@lavanet.xyz git ...fix-min-stake-to-5kMay 08, 2025
This pull request is reviewed by Baz. Review like a pro on (Baz).

@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Update BSC average block time to 450ms

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Update BSC average block time from 750ms to 450ms
• Apply changes to both mainnet and testnet specifications
• Align block time with actual BSC network parameters
Diagram
flowchart LR
  A["BSC Specs<br/>average_block_time: 750ms"] -- "Update to 450ms" --> B["BSC Specs<br/>average_block_time: 450ms"]
  C["BSCT Specs<br/>average_block_time: 750ms"] -- "Update to 450ms" --> D["BSCT Specs<br/>average_block_time: 450ms"]
Loading

Grey Divider

File Changes

1. specs/mainnet-1/specs/bsc.json ⚙️ Configuration changes +2/-2

Update BSC block time configuration

• Updated BSC mainnet average_block_time from 750ms to 450ms
• Updated BSCT testnet average_block_time from 750ms to 450ms
• Aligns block time configuration with actual network parameters

specs/mainnet-1/specs/bsc.json


2. specs/testnet-2/specs/bsc.json ⚙️ Configuration changes +2/-2

Update BSC block time configuration

• Updated BSC mainnet average_block_time from 750ms to 450ms
• Updated BSCT testnet average_block_time from 750ms to 450ms
• Mirrors mainnet-1 configuration updates

specs/testnet-2/specs/bsc.json


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Mar 22, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 📐 Spec deviations (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment on lines 14 to 18
"data_reliability_enabled": true,
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": 750,
"average_block_time": 450,
"allowed_block_lag_for_qos_sync": 14,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

average_block_time is 450 but consumers treat it as milliseconds while BSC's block time is ≈3000 ms, should we set average_block_time to ≈3000 in both BSC and BSCT specs?

Finding type: Logical Bugs | Severity: 🔴 High


Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents:

Before applying, verify this suggestion against the current code. In
specs/mainnet-1/specs/bsc.json around lines 14-18 and 59-63, the average_block_time is
set to 450 (ms) which is incorrect for Binance Smart Chain and will cause timeouts and
sync checks to be too aggressive. Change both values from 450 to approximately 3000
(milliseconds) to reflect the real BSC average block time; also search for and update
any corresponding BSCT spec files to the same ~3000 ms value so derived TTLs and polling
cadences remain correct. Run configuration validation and any integration tests to
ensure derived timeouts behave as expected.

@codecov

codecov Bot commented Mar 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
consensus 8.71% <ø> (ø)
protocol 33.20% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
7 files   ±0   0 ❌ ±0 

Results for commit 52dbc88. ± Comparison against base commit 50e9a40.

@Tomelia1999 Tomelia1999 changed the title update average_block_time fix: update average_block_time Mar 23, 2026
@Harraken Harraken merged commit 6b5b690 into main Mar 30, 2026
31 of 33 checks passed
@Harraken Harraken deleted the bsc-spec branch March 30, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants