Skip to content
This repository was archived by the owner on Apr 11, 2021. It is now read-only.

Conversation

@smartcontracts
Copy link
Contributor

Description

We're not using this code anymore, should be able to safely remove it.

Contributing Agreement

@tynes tynes marked this pull request as ready for review March 11, 2021 21:57
// representation, with the given location metadata set (if available).
func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber uint64, index uint64) *RPCTransaction {
var signer types.Signer = types.NewOVMSigner(tx.ChainId())
var signer types.Signer = types.FrontierSigner{}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is reintroducing the types.FrontierSigner{} that was removed in a recent commit

case config.IsHomestead(blockNumber):
signer = HomesteadSigner{}
default:
signer = FrontierSigner{}
Copy link
Collaborator

Choose a reason for hiding this comment

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

we never want to return anything besides EIP155Signer. This would result in a diff but would give extra assurance that we never use the wrong signer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What impact would using the wrong signer have?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Allowing transactions that are not protected with a chainid. All transactions must be protected with a chainid

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Transactions w/o chain ID should fail inside the OVM_ECDSAContractAccount.

@gakonst
Copy link
Contributor

gakonst commented Mar 27, 2021

@tynes we're based on Geth 1.9.10. The non-EIP155 signers are allowed there. They were only removed in Geth 1.10. Once we rebase to it, they will also be removed from our codebase, but for now I believe we should stick to minimizing the diff from 1.9.10. Also, the chainId is checked here in the OVM ECDSA Contract Account.

Copy link
Contributor

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

LGTM, unless @tynes disagrees with the comment I wrote above

@tynes
Copy link
Collaborator

tynes commented Mar 27, 2021

This is a non-backwards compatible change meaning that historical sync depends on this - the RPC endpoint eth_sendrawethsigntransaction depends on the OVMSigner

func (s *PublicTransactionPoolAPI) SendRawEthSignTransaction(ctx context.Context, encodedTx hexutil.Bytes) (common.Hash, error) {

This can only be removed if:

  • We regenesis
  • We have a sync that doesn't execute the transactions up to a certain height

We will no longer support the EthSign based transactions at some point, meaning we will need to sunset the functionality

We also have a hard requirement that the sequencer must reject transactions sent directly to it without a chainid

Copy link
Contributor

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

Removing my approval so we don't merge by accident

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants