quorum icon indicating copy to clipboard operation
quorum copied to clipboard

Ordering of Accounts

Open rushikeshacharya opened this issue 8 years ago • 2 comments

System information

Geth version: geth version Version: 1.7.2-stable Quorum Version: 2.0.1 Architecture: amd64 Network Id: 1 Go Version: go1.10 Operating System: linux GOPATH= GOROOT=/usr/local/go

OS & Version: Ubuntu 16.04

In 7Node Example From Node1's console if I execute eth.accounts I'm getting result as

> eth.accounts
["0xed9d02e382b34818e88b88a309c7fe71e65f419d"]  

and if I create a new account it's storing new account at position 0

personal.newAccount()
Passphrase: 
Repeat passphrase: 
"0x94f9684d5030cf50932bca16eb8309e88097f331"
> eth.accounts
["0x94f9684d5030cf50932bca16eb8309e88097f331", "0xed9d02e382b34818e88b88a309c7fe71e65f419d"]  

eth.accounts[0]
"0x94f9684d5030cf50932bca16eb8309e88097f331"

is it a expected behaviour? because from Node3's console if I do the same then it is giving different result

> eth.accounts
[ ]

> personal.newAccount()
Passphrase: 
Repeat passphrase: 
"0x3360675aac223644d673c5f750804924f8ce54a2"   

> eth.accounts
["0x3360675aac223644d673c5f750804924f8ce54a2"]   

> personal.newAccount()
Passphrase: 
Repeat passphrase: 
"0xedfd873abd5e4f8e27d9e093577f1b21033931d1"  

> eth.accounts
["0x3360675aac223644d673c5f750804924f8ce54a2", "0xedfd873abd5e4f8e27d9e093577f1b21033931d1"]

rushikeshacharya avatar Apr 13 '18 09:04 rushikeshacharya

Hi HrishikeshFC. Quorum did not modify account management from original go-ethereum implementation, so the root of the issue is there. From my understanding tho, the account creation is loosely reliant on the key file creation date on disk. See: https://github.com/ethereum/go-ethereum/pull/1283

fixanoid avatar Apr 17 '18 14:04 fixanoid

@fixanoid Thanks. The problem was because of improper name format of account file in keystore folder. I had changed the name of the file to keystore1, so it was not able to identify the account creation time. I think the accounts gets positioned according to their timestamp. The account name should be in UTC format.

rushikeshacharya avatar Apr 19 '18 06:04 rushikeshacharya