Conversation
Contributor
WASM runtime size check:Compared to target branchMoonbase runtime: 2268 KB (no changes) ✅ Moonbeam runtime: 2244 KB (no changes) ✅ Moonriver runtime: 2248 KB (no changes) ✅ Compared to latest release (runtime-3400)Moonbase runtime: 2268 KB (+240 KB compared to latest release) Moonbeam runtime: 2244 KB (+232 KB compared to latest release) Moonriver runtime: 2248 KB (+236 KB compared to latest release) |
Contributor
Coverage Report@@ Coverage Diff @@
## master tarekkma/priority-fees +/- ##
==========================================================
+ Coverage 74.40% 74.51% +0.11%
Files 376 376
- Lines 95432 95401 -31
==========================================================
+ Hits 70998 71088 +90
- Misses 24434 24313 -121
|
RomarQ
reviewed
Jan 10, 2025
RomarQ
previously approved these changes
Jan 10, 2025
stiiifff
previously approved these changes
Jan 13, 2025
RomarQ
previously approved these changes
Jan 14, 2025
RomarQ
reviewed
Jan 14, 2025
RomarQ
reviewed
Jan 14, 2025
RomarQ
approved these changes
Jan 14, 2025
ahmadkaouk
pushed a commit
to datahaven-xyz/datahaven
that referenced
this pull request
Jun 25, 2025
This PR integrates the Substrate FRAME Treasury pallet across all three
DataHaven runtime environments (`testnet`, `mainnet`, `stagenet`) with a
custom fee allocation mechanism and comprehensive test coverage.
### Key Changes
#### Treasury Pallet Integration:
- Added Treasury pallet to all three runtimes (testnet, mainnet,
stagenet) with 20% fee allocation and 80% burn mechanism.
- Implemented dynamic fee proportion control via
`FeesTreasuryProportion` runtime parameter.
- Integrated treasury with custom fee handlers:
`DealWithEthereumBaseFees`, `DealWithEthereumPriorityFees`, and
`DealWithSubstrateFeesAndTip`.
#### Comprehensive Testing Infrastructure:
- Created robust test architecture with session management and validator
setup across all runtimes
- Added block author management utilities for treasury testing requiring
pallet_authorship integration
- Implemented 15 total tests (5 tests × 3 runtimes) covering:
- EVM transaction fee allocation with/without priority fees
- Substrate fee and tip handling validation
- Treasury spending functionality via sudo
- Complete fee flow verification with actual network base fee
calculations
#### Technnical Implementation
Fee Allocation Logic:
- Base fees: 20% to treasury, 80% burned
- Priority fees: 100% to block author
- Substrate tips: 100% to block author
The implementation is based on
moonbeam-foundation/moonbeam#3120 in
[Moonbeam](https://github.com/moonbeam-foundation/moonbeam), and
assisted by Claude Code.
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.
What does it do?
Expand on the work done in #2923 and #3043, and send the priority fees to the block author (collator).
What important points reviewers should know?
FeesTreasuryProportionis used to split the followingDealWithFeesstruct and replaced it withDealWithSubstrateFeesAndTipDealWithEthereumBaseFeesDealWithEthereumPriorityFeesTests
Some tests that were checking fees have been updated. Previously, they used the block author (ALITH), who will now receive tips due to this change, causing inaccuracies in the calculations.
Reviewer Checklist:
Is there something left for follow-up PRs?
What alternative implementations were considered?
Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?
What value does it bring to the blockchain users?