Fix masterchain ValueFlow burned fees and blackhole accounting#58
Merged
bvscd merged 7 commits intorelease/node/v0.4.0from Apr 4, 2026
Merged
Fix masterchain ValueFlow burned fees and blackhole accounting#58bvscd merged 7 commits intorelease/node/v0.4.0from
bvscd merged 7 commits intorelease/node/v0.4.0from
Conversation
Contributor
Lapo4kaKek
commented
Apr 3, 2026
- Fix missing burned_fee accounting in masterchain ValueFlow
- Add executor level blackhole burn tracking and validator checks
There was a problem hiding this comment.
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_burnedfield 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
approved these changes
Apr 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.