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

CORE - verify tx payload str #309

Merged
merged 4 commits into from
Oct 24, 2024
Merged

Conversation

duelingbenjos
Copy link
Contributor

Description

When the node receives a transaction, it deserialises the transaction JSON to a dict, part of this process is that small numbers (e.g 0.0000025) are converted to exponential notation. This is causing the signature verification step to fail when the transaction is not sent from python.

This fix changes the way the tx is handled - the payload is now extracted from the tx as a string, which is then used to verify the signature against.

Additionally, this PR also includes the removal of some redundant verification steps - in finalise_tx and in check_tx (where it was being done twice.)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have performed a self-review of my own code
  • [] I have tested this change in my development environment.
  • I have added tests to prove that this change works
  • All existing tests pass after this change

@duelingbenjos duelingbenjos marked this pull request as ready for review October 19, 2024 09:04
@duelingbenjos duelingbenjos merged commit ebded2f into master Oct 24, 2024
4 checks passed
@duelingbenjos duelingbenjos deleted the core-verify-tx-payload-str branch October 24, 2024 09:38
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.

2 participants