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

Use eip155 signer for public transactions #375

Merged
merged 3 commits into from
Jun 29, 2018

Conversation

Szkered
Copy link
Contributor

@Szkered Szkered commented May 15, 2018

Use eip155 for public transactions. Private transactions will continue to use V={37,38}, hence you need to set chain id to some value other than 1 to avoid conflict. This PR should be merged along with #350 (which enable eip155 for locally signed transactions), and #354 (which fixes TestEIP155SigningVitalik by using a new set of test vectors with chain_id=10)

Tested on public value transfer, private contract deployment, public contract deployment on 'Ubuntu 16.04.4 LTSwithWeb3 1.0.0-beta.34andchain_id=10`.

@@ -1052,7 +1053,7 @@ func (s *PublicTransactionPoolAPI) sign(addr common.Address, tx *types.Transacti
// Request the wallet to sign the transaction
var chainID *big.Int
isQuorum := false
if config := s.b.ChainConfig(); config.IsEIP155(s.b.CurrentBlock().Number()) {
if config := s.b.ChainConfig(); config.IsEIP155(s.b.CurrentBlock().Number()) && !tx.IsPrivate() {
chainID = config.ChainId
isQuorum = true
Copy link
Contributor

Choose a reason for hiding this comment

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

@Szkered isQuorum will stay false here for private(Quorum) transactions.

Szkered and others added 3 commits June 22, 2018 11:45
…to use

V={37,38}, hence you need to set chain id to soem value other than 1 to avoid conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants