The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/api/service/staking
Rongjian Lan 586b6a7822 Fix comments 5 years ago
..
readme.md quick doc for staking. 6 years ago
service.go Fix comments 5 years ago

readme.md

Staking Service

Staking service is used to send a stake to beacon chain to get a ticket to join Harmony blockchain.

Staking service first gets beacon info which is a result of networkinfo service, then create a staking transaction and send it to beacon chain. As we are currently using ethereum account model, the staking transaction is an ethereum transaction. In ethereum, to create a transaction, a client needs to call to Ethereum network to get the current account nonce (required), suggested gas (optional), and chainID (optional).

For development purpose, after getting beacon info, the staking service of the new node should send a RPC request to beacon chain to get the account nonce as the beacon chain already has a client service which serves that request. In the long term, we should switch to send a gossip request to beancon chain instead of a RPC call.

TODO: Rework on this matter.