Skip to content

Fix masterchain ValueFlow burned fees and blackhole accounting#58

Merged
bvscd merged 7 commits intorelease/node/v0.4.0from
fix/valueflow-fee-burning-v0.4.0
Apr 4, 2026
Merged

Fix masterchain ValueFlow burned fees and blackhole accounting#58
bvscd merged 7 commits intorelease/node/v0.4.0from
fix/valueflow-fee-burning-v0.4.0

Conversation

@Lapo4kaKek
Copy link
Copy Markdown
Contributor

  • Fix missing burned_fee accounting in masterchain ValueFlow
  • Add executor level blackhole burn tracking and validator checks

Copilot AI review requested due to automatic review settings April 3, 2026 21:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes masterchain ValueFlow burned fees accounting and adds executor-level blackhole burn tracking with validator checks. The changes implement proper tracking of burned fees when coins are sent to the configured blackhole account in the masterchain.

Changes:

  • Added blackhole_burned field to Transaction struct to track burned value at transaction execution time
  • Implemented calculate_burned_fees() method in BurningConfig to calculate fees that should be burned based on burn ratio
  • Updated collator to properly account for burned fees both from imported shard fees and from masterchain transaction fees
  • Implemented blackhole account detection and coin burning in the ordinary transaction executor for masterchain transactions
  • Added validator checks to verify that ValueFlow.burned matches expected burned fees including blackhole burns
  • Updated test helpers to account for blackhole_burned in balance verification

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/block/src/transactions.rs Added blackhole_burned field to Transaction struct with getter/setter methods
src/block/src/config_params.rs Added calculate_burned_fees() method to BurningConfig
src/executor/src/ordinary_transaction.rs Implemented blackhole account detection and coin burning for masterchain transactions
src/executor/src/tests/test_ordinary_transaction.rs Added comprehensive test for blackhole burning behavior
src/executor/src/tests/common/mod.rs Updated balance verification helpers to account for blackhole_burned
src/node/src/validator/collator.rs Updated fee accounting to properly handle burned fees from imports and transaction fees
src/node/src/validator/validate_query.rs Added validation checks for burned ValueFlow with blackhole burn tracking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bvscd bvscd changed the title fix masterchain ValueFlow burned fees and blackhole accounting Fix masterchain ValueFlow burned fees and blackhole accounting Apr 4, 2026
@bvscd bvscd merged commit a2f0540 into release/node/v0.4.0 Apr 4, 2026
5 checks passed
@bvscd bvscd deleted the fix/valueflow-fee-burning-v0.4.0 branch April 4, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants