nebulasio / go-nebulas

Official Go implementation of the Nebulas protocol.
https://nebulas.io
GNU Lesser General Public License v3.0
712 stars 203 forks source link

Reorganization the folders structure for testnet #55

Closed magicstuff closed 6 years ago

magicstuff commented 6 years ago

Hello! What do you think about the reorganization of the folders structure and adding testnet configuration files? It seems to me so it would be convenient:

~/Go/src/github.com/nebulasio/go-nebulas $ tree testnet/
testnet/
├── conf
│   ├── config.conf
│   ├── ed25519key
│   └── genesis.conf
├── data.db
└── keydir

If you like it, I can do this.

qywang2012 commented 6 years ago

yeah, It's ok. Maybe we should change ed25519key to networkkey, which is used as the p2p network private key. This key is generated you self and different with others, so it should not put in conf. You can push a pull request do this change.

magicstuff commented 6 years ago

Sorry, I'm confused.

There is no info about generating by self a networkkey file for tesnet in this tutorial [English] Nebulas 101 - 06 Testnet.md. I copied the conf/network/ed25519key to testnet/conf/networkkey just for moving all testnet files in one place. We can change or remove networkkey file later, but I think we need to explain this in tutorial.

Now i did this https://github.com/magicstuff/go-nebulas/commits/develop, last 2 commits. Explain me please, where I did wrong.

qywang2012 commented 6 years ago

You can use neb subcommand ./neb network ssh-keygen to generate the network key. I'm sorry that it's not write in tutorials. If you have changed the position of the networkkey, you should update the config in config file


network {
  listen: ["0.0.0.0:8680"]
  private_key: "conf/network/ed25519key" # you should change the key position for you self.
  network_id: 1
}