[DRAFT PROPOSAL] Technical Omnibus 3

Summary

In this omnibus proposal, we suggest the following changes:

  1. Migrate Neutron DAO Core, Pre-Propose Multiple, Pre-Propose Single Overrule, Pre-Propose Single, Proposal Multiple, Proposal Single, SubDAO Core, SubDAO Proposal Single, DAO Proposal Single, SubDAO Core, SubDAO Timelock, SubDAO Pre-Propose, SubDAO Propose Single to the newest version to use the latest version of Neutron SDK;
  2. Update SubDAO Timelock to v0.2.3;

Content of the omnibus

Update of DAO contracts

The proposal contains migration of contracts (Neutron DAO Core, Pre-Propose Multiple, Pre-Propose Single Overrule, Pre-Propose Single, Proposal Multiple, Proposal Single, SubDAO Core, SubDAO Proposal Single, DAO Proposal Single, SubDAO Core, SubDAO Timelock, SubDAO Pre-Propose, SubDAO Propose Single) to make them compatible with the latest version of Neutron SDK at the moment - v0.10.0
Here is the full list of changes: Sdk 47 by pr0n00gler · Pull Request #79 · neutron-org/neutron-dao · GitHub

Update SubDAO Timelock to v0.2.3

This is a minor release update which fixes a small bug in the timelock contract which could break the timelock logic when a corresponding overrule proposal was closed.
Here is the full diff of changes: fix: allow for execution of proposals that have closed overrule proposal #ntrn-225 by NeverHappened · Pull Request #100 · neutron-org/neutron-dao · GitHub

Technical details

  1. DAO contracts release: Release v0.6.0 · neutron-org/neutron-dao · GitHub

  2. To verify the migration you need to check that uploaded contracts contain only changes from the relevant releases. For that you need to take a hash of uploaded binaries and compare it with the hash of binaries you built on your machine.
    Let’s see how to verify validity of the first migration message in the proposal:

    1. At first we need to understand which contract is being migrated. We can do it by taking a value from the contract_addr field in the message (neutron1suhgf5svhu4usrurvxzlgn54ksxmn8gljarjtxqnapv8kjnp4nrstdxvff), looking at the tables, finding a row with this address and checking the name of the contract. In our case it’s Neutron DAO Core;

    2. Here we need to build contracts locally. For that we need to clone the repo:

      $ git clone https://github.com/neutron-org/neutron-dao.git
      $ cd neutron-dao
      $ git checkout v0.6.0
      $ make build
      

      Since we are verifying DAO contract we are cloning the DAO repo.
      If you want to verify some of the TGE contracts, you need to clone TGE repo (GitHub - neutron-org/neutron-tge-contracts);

    3. After this we should take a hash of cwd_core.wasm contract (name of the binary is similar to the name of contract ****in step a):

      $ shasum -a 256 artifacts/cwd_core.wasm
      

      <TODO_HASH> is the hash of the Main DAO Core binary you’ve built on your machine.

      To verify that the migration will happen to the same proper binary you should get a hash of the deployed contract by its code id (you can see a new_code_id in the message to be executed below):

      $ neutrond q wasm code-info 325 --node <https://rpc-kralum.neutron-1.neutron.org:443> --output json | jq ".data_hash"
      
      "<TODO_HASH>"
      
      

      If hashes are equal, that means the deployed binary is correct and contains all the fixes above.

    You can verify the rest of migrate message the same way.

Transaction message:

{
  "propose": {
    "msg": {
      "propose": {
        "title": "migrate DAO",
        "description": "to make it actual",
        "msgs": [
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron1suhgf5svhu4usrurvxzlgn54ksxmn8gljarjtxqnapv8kjnp4nrstdxvff",
                "new_code_id": 1304,
                "msg": "e30K"
              }
            }
          },
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron1436kxs0w2es6xlqpp9rd35e3d0cjnw4sv8j3a7483sgks29jqwgshlt6zh",
                "new_code_id": 1312,
                "msg": "e30K"
              }
            }
          },
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron1hulx7cgvpfcvg83wk5h96sedqgn72n026w6nl47uht554xhvj9nsgs8v0z",
                "new_code_id": 1306,
                "msg": "e30K"
              }
            }
          },
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron1pvrwmjuusn9wh34j7y520g8gumuy9xtl3gvprlljfdpwju3x7ucsj3fj40",
                "new_code_id": 1298,
                "msg": "ewogICAgImZyb21fY29tcGF0aWJsZSI6IHt9Cn0K"
              }
            }
          },
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron1up07dctjqud4fns75cnpejr4frmjtddzsmwgcktlyxd4zekhwecqt2h8u6",
                "new_code_id": 1305,
                "msg": "e30K"
              }
            }
          },
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron1w798gp0zqv3s9hjl3jlnwxtwhykga6rn93p46q2crsdqhaj3y4gsum0096",
                "new_code_id": 1313,
                "msg": "e30K"
              }
            }
          },
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron1fuyxwxlsgjkfjmxfthq8427dm2am3ya3cwcdr8gls29l7jadtazsuyzwcc",
                "new_code_id": 1294,
                "msg": "ewogICAgImZyb21fY29tcGF0aWJsZSI6IHt9Cn0K"
              }
            }
          },
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron15m728qxvtat337jdu2f0uk6pu905kktrxclgy36c0wd822tpxcmqvnrurt",
                "new_code_id": 1299,
                "msg": "e30K"
              }
            }
          },
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron1zjd5lwhch4ndnmayqxurja4x5y5mavy9ktrk6fzsyzan4wcgawnqjk5g26",
                "new_code_id": 1306,
                "msg": "e30K"
              }
            }
          },
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron1zjdv3u6svlazlydmje2qcp44yqkt0059chz8gmyl5yrklmgv6fzq9chelu",
                "new_code_id": 1294,
                "msg": "ewogICAgImZyb21fY29tcGF0aWJsZSI6IHt9Cn0K"
              }
            }
          },
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron1lvl674duw26psvzux5050du5kfg40kmy5z70t6am8pw6yje2wfjq66lmj2",
                "new_code_id": 1302,
                "msg": "e30K"
              }
            }
          },
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron12pwnhtv7yat2s30xuf4gdk9qm85v4j3e6p44let47pdffpklcxlq56v0te",
                "new_code_id": 1312,
                "msg": "e30K"
              }
            }
          },
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron1s0fjev2pmgyaj0uthszzp3tpx59yp2p07vwhj0467sl9j343dk9qss6x9w",
                "new_code_id": 1309,
                "msg": "e30K"
              }
            }
          },
          {
            "wasm": {
              "migrate": {
                "contract_addr": "neutron14n7jt2qkngxtgr7dgdt50g4xn2a29llz79h9y25lrsqyxrwmngmsmt9kta",
                "new_code_id": 1299,
                "msg": "e30K"
              }
            }
          }
        ]
      }
    }
  }
}