This repository has been archived by the owner on May 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Use EIP-155 signing for Ethereum contracts #725
Merged
Merged
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
go-ethereum 1.10.0 has switched to denying non-EIP155 signatures by default. Although our code uses go-ethereum's own ABI binding generation, the version currently in our dependencies never added support for EIP155 signers, and instead always uses Homestead signers for the transactors it provides helpers for. This commit bumps the keep-common version to a hotfix that enables EIP-155 signing for contract bindings. It updates generated code from keep-common to reflect these new contract bindings, and updates Ethereum client instantiation to resolve the chain id and pass it into the contract binding constructor functions.
pdyraga
reviewed
Mar 11, 2021
go.sum
Outdated
@@ -1,3 +1,4 @@ | |||
<<<<<<< Updated upstream |
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.
Merge conflict?
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.
Dropped in 1baa1eb
chainID is used to create a custom bin.TransactOpts with EIP-155 signer in each New* function of generated contract. Storing chainID in EthereumChain struct is required so that the value can be passed to NewBondedECDSAKeep in ethereum.go. Bonded ECDSA Keep Go contract binding is created on-the-fly.
It is the same version as the one referenced before except that it is tagged.
The regenerated TBTC Deposit contract binding (see tbtc dependency version update in the previous commit), has EIP155-compatible signer requiring to pass a chain ID during construction.
Tested:
|
pdyraga
approved these changes
Mar 11, 2021
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.
LGTM but given that I was committing here, we need another approval.
nkuba
approved these changes
Mar 11, 2021
dimpar
approved these changes
Mar 11, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
go-ethereum 1.10.0 has switched to denying non-EIP155 signatures by default.
Although our code uses go-ethereum's own ABI binding generation, the version
currently in our dependencies never added support for EIP155 signers, and
instead always uses Homestead signers for the transactors it provides helpers
for.
This commit bumps the keep-common version to a hotfix that enables EIP-155
signing for contract bindings. It updates generated code from keep-common to
reflect these new contract bindings, and updates Ethereum client instantiation
to resolve the chain id and pass it into the contract binding constructor
functions.