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

Reject unsigned transactions sent via RPC #11282

Merged
merged 4 commits into from
Jul 30, 2020

Conversation

t-nelson
Copy link
Contributor

Problem

Since we use the first signature as a transaction identifier, we can't identify transactions that have not been signed

Summary of Changes

  • Add failing test
  • Minor refactor to kill two birds with one stone
  • Add a new error variant
  • Reject unsigned transactions

Fixes #11279

@t-nelson
Copy link
Contributor Author

cc/ @svenski123

@codecov
Copy link

codecov bot commented Jul 30, 2020

Codecov Report

Merging #11282 into master will increase coverage by 0.0%.
The diff coverage is 96.1%.

@@           Coverage Diff           @@
##           master   #11282   +/-   ##
=======================================
  Coverage    82.4%    82.5%           
=======================================
  Files         316      316           
  Lines       74482    74494   +12     
=======================================
+ Hits        61442    61473   +31     
+ Misses      13040    13021   -19     

@t-nelson t-nelson added the automerge Merge this Pull Request automatically once CI passes label Jul 30, 2020
@t-nelson t-nelson closed this Jul 30, 2020
@t-nelson t-nelson reopened this Jul 30, 2020
@t-nelson t-nelson merged commit a888f2f into solana-labs:master Jul 30, 2020
@t-nelson t-nelson deleted the rpc-reject-unsigned-tx branch July 30, 2020 06:07
mergify bot added a commit that referenced this pull request Jul 30, 2020
* Add failing test for TX sent via RPC with no signatures

(cherry picked from commit b962b2c)

* Dereplicode send_transaction and request_airdrop RPC handlers

(cherry picked from commit a7079e4)

* Add new RPC error for TXs with no signatures

(cherry picked from commit 9778fed)

* Reject TXs sent via RPC with no signatures

(cherry picked from commit a888f2f)

Co-authored-by: Trent Nelson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid transaction data can cause nodes to abruptly terminate
3 participants