-
Notifications
You must be signed in to change notification settings - Fork 32
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
eth_sendRawTransaction modified to support ethereum transactions #1227
Conversation
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.
I think we can do this without a new tx handler (EthTxHandler
), new tx ID (4
), nor any protobuf changes, here how:
- Change
VerifySolidity66Byte
to check iflen(SignedTx.Signature) == 0
if it is assume this is a raw Ethereum tx and use similar code toVerifyEthereumTransacton
to recover the sender address. - Use the
eth
chain ID instead ofnative-eth
when creating theSignedTx
inethereumToTendermintTx
Creating a new Tx id was so that
|
# Conflicts: # e2e/eth-5-test.toml # eth/query/tx.go # rpc/query_server.go
Doesn't quite work yet because the signer on the node seems to have a different chain ID to the one recovered from the signed eth tx.
# Conflicts: # eth/polls/polls_test.go
# Conflicts: # features/features.go
Also revert the Ethereum ChainConfig changes since these are no longer needed in this PR. And tweak the truffle test a bit.
It was attempting to mint the same ERC721 UID as one of the other tests, which failed because you can't mint the same token twice.
These tests were using eth_getTransactionCount to obtain the account nonce, this method now expects to be given an Ethereum address instead of a DAppChain address. To fix this an account mapping is now created prior to the each nonce test case and the Ethereum address is used in calls to eth_getTransactionCount.
This RPC function wasn't reusable in any way, so renamed it to make it more obvious what it actually does.
So there's no need to bypass EthTxHandler in CheckTx, in fact we want it to run in CheckTx so it can do the basic validation checks.
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.
One suggestion, Looks ok to merge.
Fix for #1177
Changes to support Ethereum transactions
Requires loomnetwork/go-loom#391
Changes to allow access to
auth.Config
information to determine Chain id. #1348Add new feature flag
EthTxFeature
to activate ethereum transaction functionality.