Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pente: Handle methods that emit events but do not mutate storage #252

Open
awrichar opened this issue Oct 1, 2024 · 2 comments
Open

pente: Handle methods that emit events but do not mutate storage #252

awrichar opened this issue Oct 1, 2024 · 2 comments
Labels

Comments

@awrichar
Copy link
Contributor

awrichar commented Oct 1, 2024

If a private smart contract deployed on Pente happens to have a method that emits events only (and does not modify contract storage), then the contract address shows up in getUpdatedAccounts(), but has no changes (that is, none of the 4 core account fields address, nonce, balance, code has changed). This means that Pente computes the exact same state hash as both an input state and an output state of the transition, which is not allowed.

Simple contract that reproduces the problem when calling set():

pragma solidity ^0.8.0;

contract SimpleGuard {
    event Changed(uint256 x);

    function set(uint256 value) external {
        emit Changed(value);
    }
}

The symptom is that Paladin finds a conflicting "new state confirmed" event for a state that was already confirmed previously:

[2024-10-01T13:15:33.240-04:00] ERROR PD010121: Pending confirmation for transaction 9592b2a4-34fd-4328-a573-d9f86f61505b found when attempting to confirm from transaction 810535d4-5447-4328-88eb-83c0878ca32b (attempt=1) eventstream=b18f254e-cf52-4387-9c50-294c28e441c7 pid=80759

Therefore it gets in a retry loop while trying to make sense of the transaction, and cannot move forward.

@matthew1001
Copy link
Contributor

I think this is actually a bug. I've raised hyperledger/besu#7845 to fix it @awrichar

Copy link

github-actions bot commented Nov 8, 2024

This issue is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the stale label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants