HC Alpha release
We are happy to announce that the HC Alpha testnet is released!
Introduction
We currently have 2 nodes:
curl -s http://3.105.185.75:3013/v3/status | jq .
and
curl -s http://13.239.157.207:3013/v3/status | jq .
One of them is producing blocks, the other is syncing. You can easily join the testnet and sync as well. For that, see below.
The HC Alpha is up and running. Blocks are being produced by the appropriate leaders. Those are elected in the smart contract. Rewards are being redistributed according to the smart contract. New staking validators can be created, anyone can stake or unstake (if you have coins, see below). Both keyblocks and microblocks are being signed by the appropriate leaders and this is being validated by syncing nodes.
At this point we have a prototype of a PoS blockchain that is being ruled by a smart contract. Anyone can spawn their own chain with their own unique conensus rules. You don’t need to know Erlang to do so, you only need to be able to write Sophia contracts.
This is the basis that we will build on top in order to achieve HyperChains. It took a lot of effort to get where we are now. What is more - a lot of work still lies ahead of us. Having HyperChains Alpha would allow us to redistribute the work to more people so we can be moving faster.
How to join
The node
There is a special release that you can download and run. If you want to - you can compile the source code. Please note that this is not the master
branch. HyperChains still live in a branch of their own (hc_alpha
) that is yet to be merged into master. The latest release will not work, you need to get the special release from the link above.
Config
The HC Alpha has its own special config. A default one looks like this:
chain:
consensus:
'0':
config:
calls:
- abi_version: 3
amount: 1000000000000000000000
call_data: cb_KxFuGm1JPyDWziI=
caller: ak_2MGLPW2CHTDXJhqFJezqSwYSNwbZokSKkG7wSbGtVmeyjGfHtm
contract_pubkey: ct_LRbi65kmLtE7YMkG6mvG5TxAXTsPJDZjAtsPuaXtRyPA7gnfJ
fee: 1000000000000000
gas: 1000000
gas_price: 1000000000
nonce: 1
- abi_version: 3
amount: 1000000000000000000000
call_data: cb_KxFuGm1JPyDWziI=
caller: ak_nQpnNuBPQwibGpSJmjAah6r3ktAB7pG9JHuaGWHgLKxaKqEvC
contract_pubkey: ct_LRbi65kmLtE7YMkG6mvG5TxAXTsPJDZjAtsPuaXtRyPA7gnfJ
fee: 1000000000000000
gas: 1000000
gas_price: 1000000000
nonce: 1
- abi_version: 3
amount: 0
call_data: cb_KxHmZidJP7W4jFY=
caller: ak_2MGLPW2CHTDXJhqFJezqSwYSNwbZokSKkG7wSbGtVmeyjGfHtm
contract_pubkey: ct_LRbi65kmLtE7YMkG6mvG5TxAXTsPJDZjAtsPuaXtRyPA7gnfJ
fee: 1000000000000000
gas: 1000000
gas_price: 1000000000
nonce: 2
- abi_version: 3
amount: 0
call_data: cb_KxHmZidJP7W4jFY=
caller: ak_nQpnNuBPQwibGpSJmjAah6r3ktAB7pG9JHuaGWHgLKxaKqEvC
contract_pubkey: ct_LRbi65kmLtE7YMkG6mvG5TxAXTsPJDZjAtsPuaXtRyPA7gnfJ
fee: 1000000000000000
gas: 1000000
gas_price: 1000000000
nonce: 2
- abi_version: 3
amount: 1000000000000000000000
call_data: cb_KxFuGm1JPyDWziI=
caller: ak_2KAcA2Pp1nrR8Wkt3FtCkReGzAi8vJ9Snxa4PcmrthVx8AhPe8
contract_pubkey: ct_LRbi65kmLtE7YMkG6mvG5TxAXTsPJDZjAtsPuaXtRyPA7gnfJ
fee: 1000000000000000
gas: 1000000
gas_price: 1000000000
nonce: 1
consensus_contract: ct_LRbi65kmLtE7YMkG6mvG5TxAXTsPJDZjAtsPuaXtRyPA7gnfJ
contract_owner: ak_11111111111111111111111111111115rHyByZ
contracts:
- abi_version: 3
amount: 0
call_data: cb_KxFE1kQfG58AoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqXepHQw==
code: cb_+QKRRgOgKxRFIonHw2b00MtV1VFfVfnD2QGDOcetap/BIocR6zPAuQJjuQHS/g3YEMwENwA3AFUAICCCBwwE+wOBT25seSBhbGxvd2VkIHRocm91Z2ggTWFpblN0YWtpbmcBAz/+PR6JaAA3ADcDRwBnRwAHBwwCggwChAwChicMBgD+RNZEHwA3AUcANwAaDoQvABoGggAaDoYAAQM//lrbON4ENwFHADcAVQAgIIIHDAT7A4FPbmx5IGFsbG93ZWQgdGhyb3VnaCBNYWluU3Rha2luZwsAHzAABwwI+wNFU3Rha2UgbXVzdCBiZSA+IDALAAIDEVsUB7kPAgoMAgoMAQACAxHUzSn4DwJvgibPFCqGhgoBAz/+WxQHuQI3AQcHIDiGAAcMBBoKBIZTABUQABYkAAQXAAABAQD+gjZJAQA3AkcABwdVACAgggcMBPsDgU9ubHkgYWxsb3dlZCB0aHJvdWdoIE1haW5TdGFraW5nGgoGhCzaCAYAACIYCAIHDAj7A0VOb3QgZW5vdWdoIHNoYXJlcxoKDoZTABYEAhciEA5lCQAQFRoUCAIgOBQABwwOFRqGhgItmoSEABQMAz8GAwwPAm+CJs8BAhAVGoaGAi4ahIQADAM/BgMM/tTNKfgCNwJHAAc3ACzaBoQAABQYBgItGoSEAAEDP7iJLwcRDdgQzBlwcm9maXQRPR6JaCVnZXRfc3RhdGURRNZEHxFpbml0EVrbON4Vc3Rha2URWxQHuYkuU3Rha2luZ1ZhbGlkYXRvci5jYWxjdWxhdGVfc2hhcmVzEYI2SQEddW5zdGFrZRHUzSn4cS5TdGFraW5nVmFsaWRhdG9yLmFkZF9zaGFyZXOCLwCFNy4wLjAA8DZ7EA==
nonce: 1
owner_pubkey: ak_11111111111111111111111111111115rHyByZ
pubkey: ct_KJgjAXMtRF68AbT5A2aC9fTk8PA4WFv26cFSY27fXs6FtYQHK
vm_version: 8
- abi_version: 3
amount: 0
call_data: cb_KxFE1kQfK58CoCmQRGuzLDSzySG/5UcFOdoQ1iYy6a6fhJXVahjufrESFWRvbWF0f5V9Nw==
code: cb_+QyLRgOgTOfU7DyN1cZmgtfUa3jk7qW2EZAbRCeBIHFA5zy90bPAuQxduQnH/gfOsjICNwInNwLnADcCRwIHB4cCNwA3AecAMwQABwwINQYAADYGAgAoLgQAACguBgIAKCwCBh8QAgcMBigsAgYVBQICGgkAAgYDAAwCBET8IwACAgIAAQOvggABAD/+D8HMmgA3ACc3AkcABxoKAIQyCAAMAysRqp+U+z8EAxFodtbf/hN32AYCNwIn5wAn5wAn5wAzBAAHDAQ1BgAANgUAADQZAgACBgMAAQEC/hniRPMCNwFHADcCRwIHDA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XJzZREsJgcedS5NYWluU3Rha2luZy52YWxpZGF0b3JfYnVja2V0EUMMg5iFLk1haW5TdGFraW5nLmFzc2VydF9wcm90b2NvbF9jYWxsEUTWRB8RaW5pdBFG5LLNJS5MaXN0LmFzYxFV+KUQRS5MaXN0Lm1lcmdlX3BhaXJzEVrbON4Vc3Rha2URaHXg0SllbGVjdF9uZXh0EWh21t9ZLkxpc3RJbnRlcm5hbC5mbGF0X21hcBFuGm1JNW5ld192YWxpZGF0b3IRgHWgxz1lbGVjdF9hdF9oZWlnaHQRgjZJAR11bnN0YWtlEYncDD9RLkxpc3QubW9ub3RvbmljX3N1YnMRjezL3z0uTGlzdC5tZXJnZV9hbGwRlrx2tRkuXjEyNzYRlyifYUlvZmZsaW5lX3ZhbGlkYXRvcnMRpDzMVBlsZWFkZXIRpRqxwhlyZXdhcmQRqp+U+xkuXjEyNzgRskuyMBkuXjEyNzcRtIwWhB1iYWxhbmNlEc09WrgVZWxlY3QR2efX1U1nZXRfdmFsaWRhdG9yX3N0YXRlEdv4HGwtLkxpc3QubWVyZ2UR47Nxw2kuTWFpblN0YWtpbmcudmFsaWRhdG9yX2NtcBHlveq2LXNldF9vZmZsaW5lEeZmJ0kpc2V0X29ubGluZRHu4AmIKS5MaXN0LmRlc2MR/AgNHSkuTGlzdC5zb3J0gi8AhTcuMC4wAKKRRys=
nonce: 2
owner_pubkey: ak_11111111111111111111111111111115rHyByZ
pubkey: ct_LRbi65kmLtE7YMkG6mvG5TxAXTsPJDZjAtsPuaXtRyPA7gnfJ
vm_version: 8
expected_key_block_rate: 180000
stakers: []
name: smart_contract
db_path: ./db-path
hard_forks:
'6': 0
persist: true
fork_management:
network_id: ae_smart_contract_test
http:
external:
port: 3013
internal:
port: 3113
include_default_peers: false
keys:
dir: keys
peer_password: secret
peers:
- aenode://pp_2abigQ2fewdAH2eMMDReP4q13uYdsjXhjM1Qvs4xUn29auo8Hs@13.239.157.207:3015
sync:
port: 3015
Some of the settings above are mandatorary so please be careful changing them. For example the chain
section above must not be changed. It creates the two consensus smart contracts in the genesis block. It also creates 2 staking validators using contract calls. This seeds the initial state of the blockchain. Without those, there will be noone to produce block 1. Changing those would likely result in a different genesis block, so please do not change anything in chain
section.
Another magical setting is the network ID. It must be ae_smart_contract_test
. All transactions must be signed this network ID as well. hard_forks
section must not be changed as well, also the include_default_peers
would not help you anyhow. You need a peer so please keep the one provided. Please do not provide a beneficiary
- since your node will not be producing key blocks and you don’t need it. There is a known bug in hc_alpha
that plays bad with beneficiary
. This will be fixed ASAP.
Feel free adapting the network settings as you see fit: ports, endpoints and so on. You can both persist the chain on disk, define your own path where it would live and so on. This has nothing to do with conensus anyway.
Once set up, you can join the testnet: your node will sync.
What is missing
Ok, we have HC Alpha but what is still left to do? Let’s split the tasks in 2 sections - short term tasks and long term goals. Those are listed in no specific order.
We plan on continuing aggressive development and delivering some backwards incompatible changes when we need to. This means that every new release will bring something that would break existing consensus. That’s why we can not keep the old exsisting DB but rather we will delete it and start from genesis. We do still want to keep your contributions in place, so we will keep the consensus smart contracts’ states. Any stake you had made in one development cycle would be put in the genesis of the next one. Any other balances, contracts, names and so on will be lost.
Short term
Our goal was moving fast and breaking things. We had left a lot of TODOs. A huge part of the work on HC Alpha was scoping what shall be changed, what shall be refactored, what piece we are missing and so on. It had been an exploritory endevour. Now we must fill the missing pieces. Some of those are small tasks, some are more of an ongoing process (like writing test coverage).
-
rebase hc_alpha
on top of latest master
and merge - the HC Alpha branch had divered from our main branch some time ago, it must be rebased and merged. This will allow us to have one release that would be working both for main net and HCs. For this we would need to test heavily the HC code for backwards compatibility, and yes - make a full sync. We don’t want to break main net, right?
-
config must be simplified - as you had already seen above - there are a lot of magic settings in the config. With the exception of the network ID, changing the config should not result in a significantly different and incompatible chain. The config shall be cleaned up and reduced to a single protocol config. The smart contract creates and calls for the genesis block shall be moved in an external file and so on.
-
difficulty - currently the difficulty is not being changed. This will be done in the smart contract itself, using smart contract calls. Every staking validator would be allowed to support a fork and get a corresponding reward for it.
-
voting for missing leaders - similarly to the previous bullet point - if a leader is being elected but not producing keyblock - what shall we do? Shall we accept the next one in line instead? How would the network support or reject this? This is not a trivial question, we plan on pushing the responsibility to the ones that have skin in the game to decide - the staking validators. This means that they would be able to support a validator that is not elected as a leader if they want to. It would not be any validator, of course. The logic for this would be in the smart contract itself but the detection would happen in Erlang code. This is going to be a big and bloody task.
-
delegates participation - it is a DPOS, so we would like to invite you to join the testnet as delegates. We will provide whoever wants to with some HC-Alpha-testnet-coins (suggestions for a better name are welcome). The UI will allow you to stake and support a staking validator of your choise. You will be able to see how your stake grows with time, then unstake, stake again for a different staker and so on. The details of this would be provided shortly.
-
expand the network - currently we have two nodes and only one of them is producing blocks. We shall expand the setup to more nodes, esp. block producing ones. We would likely have a node dedicated to the UI as well. This is yet to be determined.
-
improve the contracts - we aim at providing great UX. For this we will provide some swag for the contracts. We will let the staking validator define some meta data that would describe their service - name, description, image and so on. We would also put some limits in place - ex. at the moment any staking validator can withdraw all of their stake and still be a staking validator (having only the delegated stake)
-
test, test, test
Long term
We could start working on parent-chain connectors now. There are still some open questions with regards of who posts a commitment and when they do so, but this is not a blocker. On the contrary - having a working prototype could actually help nailing the details.