Skip to content

Make the Bazo Blockchain truly permissionless#26

Open
rmnblm wants to merge 44 commits intomasterfrom
make-permissionless
Open

Make the Bazo Blockchain truly permissionless#26
rmnblm wants to merge 44 commits intomasterfrom
make-permissionless

Conversation

@rmnblm
Copy link
Member

@rmnblm rmnblm commented Nov 23, 2018

Hey there Bazorians, Bazonians, Bazingos or whatever we call ourselves 👋

I've been working hard the past week to make this PR reality, but here it is:
This PR will make the Bazo blockchain truly permissionless.

What does truly permissionless mean?

Well, a (single) root account still exists (I didn't say truly decentralized, but truly permissionless) but is only able to change configurations in the network (by sending a ConfigTx). What's new is that accounts now can simply join the network. No need for a root to create an account in the network.

Furthermore, if user A wants to transfer coins to user B that does not exist yet, the account will be created automatically. Caution: You can now send coins to accounts where nobody is in possession of the private key (yet).

Starting a miner also has become even more simpler because miners do not need the wallet address or the commitment key of the root. Instead, a new struct Genesis is being introduced. This struct contains the root's wallet address and commitment public key.

type Genesis struct {
 	RootAddress [64]byte
 	RootCommitment [256]byte
 }

The genesis is created by the first miner of the network. The previous hash prevHash of the initial block with height h = 0 is the hash of the genesis.

initialBlock.prevHash = genesis.Hash()

Once a second miner joins the network, it makes a genesis request to a random peer which then responds with the genesis.

Further improvements

The CLI now is even easier than before, you can start a miner A (as root) with the following command:

./bazo-miner start --dataDir NodeA --address localhost:8000 --bootstrap localhost:8000

This will create a directory NodeA containing all required keys and databases.
Starting a second miner B is also easy:

./bazo-miner start --dataDir NodeB --address localhost:8001 --bootstrap localhost:8000

Note that miner B still must have sufficient funds and be part of the validator set in order to start mining. You can read more about the setup of two miners here.

Other mentionable changes:

  • Accounts with balance 0 are deleted
  • Everything related to multisig is deleted
  • Added more tests

Enjoy black friday and see you next week at the Bazo workshop 🖤

Roman

@rmnblm rmnblm force-pushed the make-permissionless branch from 13e9ea3 to 2d79f6c Compare November 28, 2018 08:05
No need to have AccTx because the blockchain is now permissionless, new contracts can be deployed by sending a ContractTx to the network.
@rmnblm rmnblm removed the do not merge For PRs that should not be merged yet label Nov 28, 2018
@rmnblm rmnblm changed the title Draft: Make the Bazo Blockchain truly permissionless Make the Bazo Blockchain truly permissionless Nov 28, 2018
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