Governance proposal in Koinos Mainnet (second try)

in #koinos10 months ago

koinos-proposal.png

As many of you know, the governance proposal created back in December for Koinos blockchain failed during the application despite of passing the threshold of votes.

A further investigation performed by Roamin concluded that the issue was that I didn't create the proposal correctly. This proposal has 3 operations: The first operation sets the new contract as system contract. The second operation assigns a number to this system contract. And the third one defines a name for it: "get_contract_metadata". The problem was that this third operation was not targeting the correct function to create the name, and then the whole transaction was rejected.

Roamin also observed a strange message saying that the account had no enough mana to apply the transaction. This log is strange because the governance contract was designed to have the maximum mana possible. I checked this and found that there is a small part of the code of the Koin contract that needs to be fixed. It is not taking into account the special case designed for the governance contract. In any case, this is not a blocking point and the current proposal can go forward because there are another ways to provide the mana.

Governance proposal

I launched a new proposal in koinos mainnet with the same operations but fixing the issue with the third operation. This is the transaction:
https://koinosblocks.com/tx/0x1220b8715851c58bd757995bb700347186de21e6fbfe6b16e1b8ea546bcaacf6ef34

The operations are the following:

{
  operations: [
    // set new contract as system contract
    {
      set_system_contract: {
        contract_id: "1C7JtWik7fTDD5r6B8n1HsU26s5M9qYp7i",
        system_contract: true
      }
    },

    // assign the ID 112 to this new contract
    // and define the entry point of the contract
    {
      set_system_call: {
        call_id: 112,
        target: {
          system_call_bundle: {
            contract_id: "1C7JtWik7fTDD5r6B8n1HsU26s5M9qYp7i",
            entry_point: 2018486792
          }
        }
      }
    },

    // create a new record in the name-service contract:
    // link the new contract with the name get_contract_metadata
    {
      call_contract: {
        contract_id: "19WxDJ9Kcvx4VqQFkpwVmwVEy1hMuwXtQE",
        args: {
          name: "set_record",
          args: {
            name: "get_contract_metadata",
            address: "1C7JtWik7fTDD5r6B8n1HsU26s5M9qYp7i"
          }
        }
      }
    }
  ],
  operation_merkle_root: "...",

  // fee required to submit this proposal
  fee: "4000000000",
}

How to vote

Configure your block producer to vote for this proposal in this way:

block_producer:
  ...
  approve-proposals:
    - 0x122077304e747204b95eea7fcae1c3dd6c733436543bd314c04177ac407f7e2634c7

You can check the status and current votes here: https://koinosblocks.com/proposal/0x122077304e747204b95eea7fcae1c3dd6c733436543bd314c04177ac407f7e2634c7

Acknowledgments

From here many thanks to Vandeberg who reviewed and tested the code. Also many thanks to Roamin who has been very active since the beginning when I reported the issue with the token standard. He created the code of the contract and now he helped me to find the issues with the proposal.

Sort:  

Congratulations @jga! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You distributed more than 49000 upvotes.
Your next target is to reach 50000 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP