Skip to content

Fetch fees based on last chain exec header#7838

Merged
ssd04 merged 9 commits into
feat/testnet-fixesfrom
update-acc-fees-v3
Jun 18, 2026
Merged

Fetch fees based on last chain exec header#7838
ssd04 merged 9 commits into
feat/testnet-fixesfrom
update-acc-fees-v3

Conversation

@ssd04

@ssd04 ssd04 commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Reasoning behind the pull request

Proposed changes

Testing procedure

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@ssd04 ssd04 self-assigned this Apr 29, 2026
sstanculeanu
sstanculeanu previously approved these changes Apr 29, 2026
@ssd04 ssd04 changed the base branch from rc/supernova to feat/testnet-fixes May 19, 2026 07:48
@github-actions

Copy link
Copy Markdown

Integration Tests completed with failures or errors.

📊 MultiversX Automated Test Report: View Report

🔄 Build Details:

  • mx-chain-go Commit Hash: e4f8c1dfdfc57629c82236f98bcea7c7800d1de4
  • Current Branch: update-acc-fees-v3
  • mx-chain-go Target Branch: rc/supernova
  • mx-chain-simulator-go Target Branch: rc/supernova
  • mx-chain-simulator-go Commit Hash: f10bde764d4770bd9c6caeac60f6b57020bc0bdc
  • mx-chain-testing-suite Target Branch: rc/supernova
  • mx-chain-testing-suite Commit Hash: 56ce8892aaafd0aa8420d821eac8a4bbf25f6d56

🚀 Environment Variables:

  • TIMESTAMP: 2026_MAY_19__10_14_46
  • PYTEST_EXIT_CODE: 1

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 changes the source of accumulated epoch fees for V3 meta headers in getCurrentlyAccumulatedFees: instead of extracting them from the proposed header's embedded LastExecutionResult, they are now read from blockChain.GetLastExecutionResult() (the chain-level last execution result maintained by the async executor). Tests are updated to reflect the new source and to populate MetaExecutionResult.ExecutionResult where required by other paths.

Changes:

  • In getCurrentlyAccumulatedFees, switch the V3 path to read fees from mp.blockChain.GetLastExecutionResult(); on nil chain result, return (0, 0, nil) instead of an error.
  • Update Test_getCurrentlyAccumulatedFees to cover the new nil/zero-return behavior and the new fee source semantics; remove the obsolete "nil base execution result" test case.
  • Update metablockProposal_test.go test setups to seed BlockChain with a MetaExecutionResult containing a populated BaseMetaExecutionResult (with fee fields where expectations changed).

Reviewed changes

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

File Description
process/block/metablock.go Reads V3 last execution fees from the blockchain's last execution result instead of the proposed header; nil result yields zero fees.
process/block/metablock_test.go Renames/rewrites V3 fee tests to drive BlockChain.GetLastExecutionResult; drops the now-unreachable "nil base execution result" case.
process/block/metablockProposal_test.go Updates proposal/process tests to seed the chain's last execution result with nested BaseMetaExecutionResult and adjusts fee expectations to come from the chain rather than the header.

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

@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.57%. Comparing base (69d4de7) to head (d726fe6).
⚠️ Report is 10 commits behind head on feat/testnet-fixes.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           feat/testnet-fixes    #7838      +/-   ##
======================================================
- Coverage               77.57%   77.57%   -0.01%     
======================================================
  Files                     884      884              
  Lines                  125210   125210              
======================================================
- Hits                    97135    97134       -1     
- Misses                  21622    21625       +3     
+ Partials                 6453     6451       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@ssd04 ssd04 merged commit 4d94bfb into feat/testnet-fixes Jun 18, 2026
11 checks passed
@ssd04 ssd04 deleted the update-acc-fees-v3 branch June 18, 2026 07:56
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.

5 participants