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

feat(primitive): Signer recovery #179

Merged
merged 5 commits into from Nov 9, 2022
Merged

feat(primitive): Signer recovery #179

merged 5 commits into from Nov 9, 2022

Conversation

rakita
Copy link
Collaborator

@rakita rakita commented Nov 9, 2022

I added signer recovery with seckp256k1 lib.

there are a few additional changes in consensus for tx validity that are unrelated to recovery but seem okay to be merged, I will continue working on those.

@rakita rakita added the C-enhancement New feature or request label Nov 9, 2022
@codecov
Copy link

codecov bot commented Nov 9, 2022

Codecov Report

Merging #179 (5b1b852) into main (b970079) will increase coverage by 0.14%.
The diff coverage is 65.35%.

@@            Coverage Diff             @@
##             main     #179      +/-   ##
==========================================
+ Coverage   69.97%   70.11%   +0.14%     
==========================================
  Files         191      192       +1     
  Lines       15408    15604     +196     
==========================================
+ Hits        10781    10941     +160     
- Misses       4627     4663      +36     
Impacted Files Coverage Δ
crates/consensus/src/verification.rs 68.18% <0.00%> (-12.59%) ⬇️
crates/executor/src/executor.rs 0.00% <ø> (ø)
crates/interfaces/src/consensus.rs 100.00% <ø> (ø)
crates/primitives/src/lib.rs 100.00% <ø> (ø)
crates/primitives/src/transaction/mod.rs 86.22% <80.40%> (+7.76%) ⬆️
crates/consensus/src/config.rs 75.00% <100.00%> (ø)
crates/net/eth-wire/src/types/transactions.rs 91.98% <100.00%> (ø)
crates/primitives/src/transaction/signature.rs 79.54% <100.00%> (+6.81%) ⬆️
crates/primitives/src/transaction/util.rs 100.00% <100.00%> (ø)
crates/net/discv4/src/lib.rs 67.85% <0.00%> (-0.15%) ⬇️
... and 6 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rakita rakita linked an issue Nov 9, 2022 that may be closed by this pull request
Copy link
Member

@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, left some comments

crates/primitives/src/transaction/mod.rs Outdated Show resolved Hide resolved
crates/primitives/src/transaction/mod.rs Outdated Show resolved Hide resolved
@rkrasiuk rkrasiuk mentioned this pull request Nov 9, 2022
@rakita
Copy link
Collaborator Author

rakita commented Nov 9, 2022

Done some cleanup and found bug in hash calculation that took me some time to find.

in essence for typed transaction hash was calculated over rlp header hash(rlp(02|rlp_list())) while hash should be without that header hash(02|rlp_list())

Copy link
Member

@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

crates/primitives/src/transaction/mod.rs Show resolved Hide resolved
@rakita rakita merged commit 9e35d58 into main Nov 9, 2022
@rakita rakita deleted the rakita/tx_signer_recovery branch November 9, 2022 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement pubkey recovery
3 participants