IntersectMBO / cardano-cli

This repository contains sources for the command-line interface (CLI) tool for interacting with the Cardano blockchain.
Apache License 2.0
37 stars 13 forks source link

action create-hardfork cmd + update description fields in all governance action files. #746

Closed CarlosLopezDeLara closed 4 months ago

CarlosLopezDeLara commented 4 months ago

Changelog

- description: |
    Introduces the `governance action create-hardfork` cmd.
# uncomment types applicable to the change:
  type:
  - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - improvement    # QoL changes e.g. refactoring
  # - bugfix         # fixes a defect
  - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Closes https://github.com/IntersectMBO/cardano-cli/issues/721

How to trust this PR

Run the command

cardano-cli conway governance action create-hardfork \
--mainnet \
--anchor-url example.com \
--anchor-data-hash c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745 \
--deposit-return-stake-verification-key-file stake.vkey \
--governance-action-deposit 12345 \
--protocol-major-version 10 \
--protocol-minor-version 0 \
--out-file conway-create-hardfork.action

Explore the text envelope en check it with cbor.me

{
    "type": "Governance proposal",
    "description": "Hardfork initiation governance action",
    "cborHex": "84193039581de18f4a3466a404c11eb410313015b88e447d81b60089e25f611600e6058301f6820a00826b6578616d706c652e636f6d5820c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745"
}
[12345, h'E18F4A3466A404C11EB410313015B88E447D81B60089E25F611600E605', [1, null, [10, 0]], ["example.com", h'C7DDB5B493FAA4D3D2D679847740BDCE0C5D358D56F9B1470CA67F5652A02745']]

or with

cardano-cli conway governance action view --action-file conway-create-hardfork.action
{
    "anchor": {
        "dataHash": "c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745",
        "url": "example.com"
    },
    "deposit": 12345,
    "governance action": {
        "contents": [
            null,
            {
                "major": 10,
                "minor": 0
            }
        ],
        "tag": "HardForkInitiation"
    },
    "return address": {
        "credential": {
            "keyHash": "8f4a3466a404c11eb410313015b88e447d81b60089e25f611600e605"
        },
        "network": "Mainnet"
    }
}

Checklist

carbolymer commented 4 months ago

The windows CI failure: https://github.com/IntersectMBO/cardano-node/pull/5811#issuecomment-2089561098 - we can ignore windows GHA, it's fixed in nix already.

smelc commented 4 months ago

@CarlosLopezDeLara> those commits should not be here:

image

Since they have been merged already. I can help you clean this up during our pair programming session :+1: