cardano course
  • Welcome!
  • Video lessons
  • Handbook
    • Module 1. Building and running the node
      • Building the node
      • Running the node and connecting to a network
    • Module 2. Basic operations
      • Creating keys and addresses
      • Creating a simple transaction
      • Registering the stake address and delegating
    • Module 3. Protocol parameters and configuration files
      • Protocol parameters
      • Byron genesis file
      • Shelley genesis file
      • Alonzo genesis file
      • Conway genesis file
      • Node configuration file
      • Topology file
    • Module 4. Peer-to-peer (P2P) networking
    • Module 5. Creating a stake pool
      • The setup
      • Generating keys
      • Registering a stake pool
      • Runtime system options
      • Running the nodes
      • Stake snapshots
      • Upgrading cardano-node and cardano-cli
      • Pool operations and maintenance
      • Retiring a stake pool
    • Module 6. Monitoring the nodes
    • Module 7. Cardano governance
      • Update proposals
      • Polls
    • Module 8. Setting up a local cluster
      • Creating a local cluster
      • Spending the genesis UTXO
      • From Byron to Shelley
      • Moving funds to a Shelley address
      • Creating a first stake pool
      • Bringing decentralization parameter down to .80
      • From Shelley to Alonzo
      • Creating a second stake pool before moving to the Babbage era
      • Redelegating genesis keys
      • Vasil hard fork
      • Creating a local cluster with the mkfiles script
    • Module 9. Simple scripts and Plutus scripts
    • Module 10. New tracing system
    • Module 11. Running the SMASH server
    • Module 12. Running the token metadata server
  • Curated playlist
Powered by GitBook
On this page
  • The Allegra hard fork
  • The Mary hard fork
  • The Alonzo hard fork and the Alonzo intra-era hard fork
  • The Alonzo intra-era hard fork

Was this helpful?

Edit on GitHub
  1. Handbook
  2. Module 8. Setting up a local cluster

From Shelley to Alonzo

The Allegra hard fork

Continue upgrading your system to later eras. First, move from Shelley to Allegra. To achieve this, upgrade to protocol version 3.0:

sed -i configuration/config.json \
-e 's/LastKnownBlockVersion-Major":2/LastKnownBlockVersion-Major":3/' \
-e 's/"MaxKnownMajorProtocolVersion":2/"MaxKnownMajorProtocolVersion":7/'
gsed -i configuration/config.json \
-e 's/LastKnownBlockVersion-Major":2/LastKnownBlockVersion-Major":3/' \
-e 's/"MaxKnownMajorProtocolVersion":2/"MaxKnownMajorProtocolVersion":7/'

Create the proposal:

cardano-cli governance create-update-proposal \
--genesis-verification-key-file genesis-keys/non.e.shelley.000.vkey \
--genesis-verification-key-file genesis-keys/non.e.shelley.001.vkey \
--out-file transactions/update.v3.proposal \
--epoch $(cardano-cli query tip --testnet-magic 42 | jq .epoch) \
--protocol-major-version "3" \
--protocol-minor-version "0" 
CHANGE=$(($(cardano-cli query utxo --address $(cat pool1/payment.addr) --testnet-magic 42 --out-file  /dev/stdout | jq -cs '.[0] | to_entries | .[] | .value.value') - 1000000))
cardano-cli transaction build-raw \
--shelley-era \
--fee 1000000 \
--invalid-hereafter $(expr $(cardano-cli query tip --testnet-magic 42 | jq .slot) + 1000) \
--tx-in $(cardano-cli query utxo --address $(cat pool1/payment.addr) --testnet-magic 42 --out-file  /dev/stdout | jq -r 'keys[]') \
--tx-out $(cat pool1/payment.addr)+$CHANGE \
--update-proposal-file transactions/update.v3.proposal \
--out-file transactions/update.v3.proposal.txbody
cardano-cli transaction sign \
--tx-body-file transactions/update.v3.proposal.txbody \
--signing-key-file pool1/payment.skey \
--signing-key-file bft0/shelley.000.skey \
--signing-key-file bft1/shelley.001.skey \
--out-file transactions/update.v3.proposal.txsigned
cardano-cli transaction submit --testnet-magic 42 \
--tx-file transactions/update.v3.proposal.txsigned

Wait for the next epoch transition to see the Allegra hard fork.

The Mary hard fork

To get to the Mary era, upgrade to protocol version 4.0:

sed -i configuration/config.json \
-e 's/LastKnownBlockVersion-Major":3/LastKnownBlockVersion-Major":4/'
gsed -i configuration/config.json \
-e 's/LastKnownBlockVersion-Major":3/LastKnownBlockVersion-Major":4/'
cardano-cli governance create-update-proposal \
--genesis-verification-key-file genesis-keys/non.e.shelley.000.vkey \
--genesis-verification-key-file genesis-keys/non.e.shelley.001.vkey \
--out-file transactions/update.v4.proposal \
--epoch $(cardano-cli query tip --testnet-magic 42 | jq .epoch) \
--protocol-major-version "4" \
--protocol-minor-version "0" 
CHANGE=$(($(cardano-cli query utxo --address $(cat pool1/payment.addr) --testnet-magic 42 --out-file  /dev/stdout | jq -cs '.[0] | to_entries | .[] | .value.value') - 1000000))
cardano-cli transaction build-raw \
--shelley-era \
--fee 1000000 \
--invalid-hereafter $(expr $(cardano-cli query tip --testnet-magic 42 | jq .slot) + 1000) \
--tx-in $(cardano-cli query utxo --address $(cat pool1/payment.addr) --testnet-magic 42 --out-file  /dev/stdout | jq -r 'keys[]') \
--tx-out $(cat pool1/payment.addr)+$CHANGE \
--update-proposal-file transactions/update.v4.proposal \
--out-file transactions/update.v4.proposal.txbody
cardano-cli transaction sign \
--tx-body-file transactions/update.v4.proposal.txbody \
--signing-key-file pool1/payment.skey \
--signing-key-file bft0/shelley.000.skey \
--signing-key-file bft1/shelley.001.skey \
--out-file transactions/update.v4.proposal.txsigned
cardano-cli transaction submit --testnet-magic 42 \
--tx-file transactions/update.v4.proposal.txsigned

Wait for the next epoch transition to see the Mary hard fork.

The Alonzo hard fork and the Alonzo intra-era hard fork

Getting to Alonzo will require the Alonzo hard fork AND the Alonzo intra-era hard fork, which means that you need to move from protocol version 4.0 to 5.0 and then to 6.0:

sed -i configuration/config.json \
-e 's/LastKnownBlockVersion-Major":4/LastKnownBlockVersion-Major":5/'
gsed -i configuration/config.json \
-e 's/LastKnownBlockVersion-Major":4/LastKnownBlockVersion-Major":5/'
cardano-cli governance create-update-proposal \
--genesis-verification-key-file genesis-keys/non.e.shelley.000.vkey \
--genesis-verification-key-file genesis-keys/non.e.shelley.001.vkey \
--out-file transactions/update.v5.proposal \
--epoch $(cardano-cli query tip --testnet-magic 42 | jq .epoch) \
--protocol-major-version "5" \
--protocol-minor-version "0" 
CHANGE=$(($(cardano-cli query utxo --address $(cat pool1/payment.addr) --testnet-magic 42 --out-file  /dev/stdout | jq -cs '.[0] | to_entries | .[] | .value.value.lovelace') - 1000000))
cardano-cli transaction build-raw \
--mary-era \
--fee 1000000 \
--invalid-hereafter $(expr $(cardano-cli query tip --testnet-magic 42 | jq .slot) + 1000) \
--tx-in $(cardano-cli query utxo --address $(cat pool1/payment.addr) --testnet-magic 42 --out-file  /dev/stdout | jq -r 'keys[]') \
--tx-out $(cat pool1/payment.addr)+$CHANGE \
--update-proposal-file transactions/update.v5.proposal \
--out-file transactions/update.v5.proposal.txbody
cardano-cli transaction sign \
--tx-body-file transactions/update.v5.proposal.txbody \
--signing-key-file pool1/payment.skey \
--signing-key-file bft0/shelley.000.skey \
--signing-key-file bft1/shelley.001.skey \
--out-file transactions/update.v5.proposal.txsigned
cardano-cli transaction submit --testnet-magic 42 \
--tx-file transactions/update.v5.proposal.txsigned

The Alonzo intra-era hard fork

sed -i configuration/config.json \
-e 's/LastKnownBlockVersion-Major":5/LastKnownBlockVersion-Major":6/'
gsed -i configuration/config.json \
-e 's/LastKnownBlockVersion-Major":5/LastKnownBlockVersion-Major":6/'
cardano-cli governance create-update-proposal \
--genesis-verification-key-file genesis-keys/non.e.shelley.000.vkey \
--genesis-verification-key-file genesis-keys/non.e.shelley.001.vkey \
--out-file transactions/update.v6.proposal \
--epoch $(cardano-cli query tip --testnet-magic 42 | jq .epoch) \
--protocol-major-version "6" \
--protocol-minor-version "0" 
CHANGE=$(($(cardano-cli query utxo --address $(cat pool1/payment.addr) --testnet-magic 42 --out-file  /dev/stdout | jq -cs '.[0] | to_entries | .[] | .value.value.lovelace') - 1000000))
cardano-cli transaction build-raw \
--alonzo-era \
--fee 1000000 \
--invalid-hereafter $(expr $(cardano-cli query tip --testnet-magic 42 | jq .slot) + 1000) \
--tx-in $(cardano-cli query utxo --address $(cat pool1/payment.addr) --testnet-magic 42 --out-file  /dev/stdout | jq -r 'keys[]') \
--tx-out $(cat pool1/payment.addr)+$CHANGE \
--update-proposal-file transactions/update.v6.proposal \
--out-file transactions/update.v6.proposal.txbody
cardano-cli transaction sign \
--tx-body-file transactions/update.v6.proposal.txbody \
--signing-key-file pool1/payment.skey \
--signing-key-file bft0/shelley.000.skey \
--signing-key-file bft1/shelley.001.skey \
--out-file transactions/update.v6.proposal.txsigned
cardano-cli transaction submit --testnet-magic 42 \
--tx-file transactions/update.v6.proposal.txsigned
PreviousBringing decentralization parameter down to .80NextCreating a second stake pool before moving to the Babbage era

Last updated 1 year ago

Was this helpful?

Page cover image