Skip to content

Conversation

@kkuehlz
Copy link
Contributor

@kkuehlz kkuehlz commented Nov 17, 2025

  • assert there's max 1 reward system tx per block
  • assert that the value of it if it exists is <= 25 MON

Adds unit test suite to verify expected behavior.

Copilot AI review requested due to automatic review settings November 17, 2025 23:36
Copilot finished reviewing on behalf of kkuehlz November 17, 2025 23:38
Copy link

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 adds failsafe validation for reward system transactions in the Monad blockchain execution layer. The changes ensure that blocks contain at most one reward transaction and that its value does not exceed 25 MON.

  • Renamed static_validate_monad_senders to static_validate_monad_body to reflect expanded validation scope
  • Added validation logic to detect multiple reward transactions and enforce maximum reward value of 25 MON
  • Introduced comprehensive unit tests to verify the new validation behavior

Reviewed Changes

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

Show a summary per file
File Description
cmd/monad/runloop_monad_ethblocks.cpp Updated function call to use renamed static_validate_monad_body with transactions parameter
cmd/monad/runloop_monad.cpp Updated function call to use renamed static_validate_monad_body with transactions parameter
category/execution/monad/validate_monad_block.hpp Added forward declaration for Transaction struct, new error enums for reward validation, and updated function signature
category/execution/monad/validate_monad_block.cpp Implemented reward transaction validation logic and error message mappings
category/execution/monad/test_validate_monad_block.cpp Added comprehensive test suite covering valid and invalid reward transaction scenarios

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

@jhunsaker jhunsaker force-pushed the kkuehler/reward_check branch from f88a998 to 46aedbc Compare November 18, 2025 01:32
@kkuehlz kkuehlz force-pushed the kkuehler/reward_check branch from 46aedbc to b061e5b Compare November 18, 2025 16:55
assert there's max 1 reward system tx per block assert that the value of
it if it exists is <= 25 MON

Adds unit test suite to verify expected behavior.
@kkuehlz kkuehlz force-pushed the kkuehler/reward_check branch from b061e5b to 65cc8c2 Compare November 18, 2025 16:58
@jhunsaker jhunsaker merged commit 1f6367a into main Nov 18, 2025
8 checks passed
@jhunsaker jhunsaker deleted the kkuehler/reward_check branch November 18, 2025 17:09
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