-
Notifications
You must be signed in to change notification settings - Fork 327
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
[LIVE-14459] Bugfix - Fix invalid EIP-155 v
and refactor transaction decoding
#8175
Merged
lambertkevin
merged 8 commits into
develop
from
bugfix/wrong-v-for-eip155-and-hw-app-eth-improvements
Oct 29, 2024
Merged
[LIVE-14459] Bugfix - Fix invalid EIP-155 v
and refactor transaction decoding
#8175
lambertkevin
merged 8 commits into
develop
from
bugfix/wrong-v-for-eip155-and-hw-app-eth-improvements
Oct 29, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
live-github-bot
bot
added
the
ledgerjs
Has changes in the ledgerjs open source libs
label
Oct 23, 2024
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
lambertkevin
force-pushed
the
bugfix/wrong-v-for-eip155-and-hw-app-eth-improvements
branch
3 times, most recently
from
October 25, 2024 10:49
8d025a9
to
50411dd
Compare
lambertkevin
force-pushed
the
bugfix/wrong-v-for-eip155-and-hw-app-eth-improvements
branch
from
October 25, 2024 11:04
50411dd
to
b935fb3
Compare
lambertkevin
force-pushed
the
bugfix/wrong-v-for-eip155-and-hw-app-eth-improvements
branch
from
October 25, 2024 15:27
b935fb3
to
0a7e8c0
Compare
Wozacosta
previously approved these changes
Oct 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
lambertkevin
force-pushed
the
bugfix/wrong-v-for-eip155-and-hw-app-eth-improvements
branch
from
October 25, 2024 15:54
0a7e8c0
to
1de115f
Compare
Wozacosta
approved these changes
Oct 25, 2024
lambertkevin
force-pushed
the
bugfix/wrong-v-for-eip155-and-hw-app-eth-improvements
branch
from
October 28, 2024 11:28
1de115f
to
70581fc
Compare
It should be decreasing the bundle size by using only sub librairies
It should be easier to reason about, increase chunk size and more tested Should also fix the `v` value of ECDSA sig bing incorrect for legacy txs
It's now unecessary as `hw-app-eth` has now a correct `v` for legacy txs
lambertkevin
force-pushed
the
bugfix/wrong-v-for-eip155-and-hw-app-eth-improvements
branch
from
October 29, 2024 09:23
70581fc
to
552679b
Compare
lambertkevin
deleted the
bugfix/wrong-v-for-eip155-and-hw-app-eth-improvements
branch
October 29, 2024 11:37
Canestin
pushed a commit
that referenced
this pull request
Oct 30, 2024
…n decoding (#8175) * Remove `ethers` full lib from dependencies It should be decreasing the bundle size by using only sub librairies * Refactoring of the whole transaction decoding flow It should be easier to reason about, increase chunk size and more tested Should also fix the `v` value of ECDSA sig bing incorrect for legacy txs * Refactoring and cleaning * Remove `ethers` from @ledgerhq/evm-tools as well * Remove `applyEIP155` helper in `coin-evm` It's now unecessary as `hw-app-eth` has now a correct `v` for legacy txs * Add env var to force using legacy txs w/ EVMs * Changeset * unimported
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✅ Checklist
npx changeset
was attached.v
value from ECDSA signature should now always be correct depending on the transaction type📝 Description
The
v
value from ECDSA signatures returned by@ledgerhq/hw-app-eth
could be wrongly applying EIP-155 on legacy transactions (type 0) depending on the signature's parity. This is now fixed and verified as broadcastable on all known chainIds viaanvil
.The whole transaction parsing and chunking has also been refactored to increase chunk size and make the code more readable and fully tested.
@ledgerhq/coin-evm
was hacking its way through thisv
value being incorrect, and therefore this unnecessary hack is now removed.QA can force transaction type 0 on all networks by using the
EVM_FORCE_LEGACY_TRANSACTIONS
flag as env variable (+--env-mode=loose
for turbo 🤷♂️ )Also removes
ethers
full library from dependencies for@ledgerhq/hw-app-eth
and@ledgerhq/coin-evm
and substitute it with sub librairies, which should reduce the install and bundle size of both librairies.Fixes #5265
❓ Context
🧐 Checklist for the PR Reviewers