The Self-node Testnet phase is over (Depreciated), but we are leaving this documentation in place for reference purposes. See the latest at Shelley Networked Testnet Home
Follow the instructions below or watch this video tutorial: Jormungandr - Stake Delegation script
create-account-and-delegate.sh script is automatically generated when you run the
- Make sure to have
faucet-send-money.shtemplfiles in the same location with the bootstrap file when executing the bootstrap.
- Make sure to use the latest version of all 3 scripts.
In order to check the delegation functionality you need to execute the below steps:
- create the required files using the
bootstrapscript (BFT or Genesis-Praos modes)
bash bootstrap -g -s 2or
bash bootstrap -b
- start the node using the suggested command
jormungandr --genesis-block ./block-0.bin --config ./config.yaml --secret ./pool-secret1.yaml
- execute the
create-account-and-delegate.sh script executes the following operations:
- create an Account address
- send some funds (1000 Lovelaces) from Faucet to the previously created Account address
- wait for the previous transaction (from step 2) to be included in a block
- create and sign the delegation certificate for the Account address
- create the delegation transaction (delegating the stake of the account to the stake pool)
- wait for the delegation transaction (from step 5) to be included in a bloc
- display the delegation results
We check that both transactions (steps 2 and 5 from above) were included in a block.
- below we can see that there are 2 transactions - one included in block 34 (sending funds from Faucet to Account) and other included in block 64 (the delegation one).
##Check the node logs (to confirm that the transaction was included into a node) --- - fragment_id: e8979795180c27d737392e6782e4a639929042c3c717e23bbf8be55c12615bce last_updated_at: "2019-07-08T09:14:43.038531400+00:00" received_at: "2019-07-08T09:13:46.200096600+00:00" received_from: Rest status: InABlock: date: "0.63" - fragment_id: 2ed32d6ca3cb34bab0e0f64823783ad79387b6c48cd2204de4152c8a1f234173 last_updated_at: "2019-07-08T09:13:45.028243300+00:00" received_at: "2019-07-08T09:13:04.653402200+00:00" received_from: Rest status: InABlock: date: "0.34"
Next, we check the Account delegation status.
- delegation: this is the value of the Stake Pool ID to which the account delegated its stake
- value: this is the delegated value (= account_value - tx_fee = 1000 - 10 = 990)
counter: 1 delegation: 29849b4f512162fc4c6e374197aeb02942edb3fbe060c6d95b84e7f96d5a7c41 value: 990
Conclusion: delegation worked well and we delegated 990 Lovelaces from an Account address to the Stake Pool with ID: