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

Underflow in verify_transfer #421

kirk-baird opened this issue Jul 3, 2019 · 1 comment

Underflow in verify_transfer #421

kirk-baird opened this issue Jul 3, 2019 · 1 comment


Copy link

@kirk-baird kirk-baird commented Jul 3, 2019


In eth2/state_processing/src/per_block_processing/
Verifying the balance of sender should check against amount + fee rather just amount.

Present Behaviour

Currently the code has a check sender_balance >= transfer.amount

    // Verify the sender has adequate balance.
        time_independent_only || sender_balance >= transfer.amount,
        Invalid::FromBalanceInsufficient(transfer.amount, sender_balance)

Which does not account for the fee.

Expected Behaviour

sender_balance >= total_amount

Steps to resolve

Change transfer.amount to total_amount to also account for the fee.

Copy link

@paulhauner paulhauner commented Jul 29, 2019

Closed via #457


@paulhauner paulhauner closed this Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants