-
Notifications
You must be signed in to change notification settings - Fork 13
BaerChain address and nodeID generation process
- Compile brcd
- Configuring config.json creation files
- execute program
./brcd --config /Users/friday/Documents/txt/master/config.json -d ./data/data --db-path ./data/db
- Wait for the program to execute, there will be a log output, as follows:
Node ID: enode://fa9ac6d54f551fe390b457cf123f97fcaa179d78265f035af8e73dcdbd6f1860f78b52b87281411e4cdaba140591a5b11956faf7d2cf7341528069374f8a4e41@0.0.0.0:0 listenPort:30041
- among them
fa9ac6d54f551fe390b457cf123f97fcaa179d78265f035af8e73dcdbd6f1860f78b52b87281411e4cdaba140591a5b11956faf7d2cf7341528069374f8a4e41为NodeID
- Execute in the build directory
make cmdWallet
- run
./wallet/cmdWallet/cmdWallet -g 1
- The program will randomly generate the private key and address
private-key: wDnHJb3kRV7YnUojQ6sjYnfbe93vK1YVCHHPV71GAcA
address : a49c22485d140e7c725a9d40ce801d19dbb88784
public-key : cd4846e7f5ab2d29e85e033f89cb7000a49bd223ca9fd5df5ef7c162740a7cb1336006807d5e2b8d1c6760922e7399e8ffd3261a16f4c33dd81a41a31822600f
-
The above process generates address and private key methods for reference only, and can be generated separately. Please ensure that the private key is not leaked.
- Getting new private key and corresponding public key in the process of generating address
private-key: CbnNDpHaahsG6MTGVu4vud5paNsQF58jHGqoxP2f8gEy
public-key : 764af6627ec80bcf136cc7ee60167623f980ddbaa92e484345d88443b58319c1d1f6861e190eb048cdb575eabd1520e8328f69c758dcf1c076b67f540f0ccd24
- Add the following commands to the starter
--node-key 4tAUjwA4guRhYArjiJ9JVf7QTmNLjinc3UfChccJF6tC
This command specifies that the program nodeID is public-key. If you don't write the node-key command: the program will use the nodeID it started last time, and randomly generate the nodeID if there was no nodeID last time