citycoins / governance

Community-submitted CityCoins Improvement Proposals (CCIPs)
6 stars 4 forks source link

CCIP-014: Upgrade to pox-3 #14

Closed Rapha-btc closed 1 year ago

Rapha-btc commented 1 year ago

CCIP-014

Preamble

CCIP Number 014
Title Upgrade to pox 3
Author(s) Raphael R. Sierra rapha@fontainebleau-management.com
On behalf of the community, see discussion details in issue https://github.com/citycoins/governance/issues/13 and in Discord channels
Consideration Economic, Governance, Technical
Type Standard
Status Draft
Created 2023-04-19
License BSD-2-Clause
Replaces CCD002, CCD006, CCD001, CCIP-011

Summary

  1. Set minting contract for mia and nyc to a version using pox 3
  2. Add treasury that uses the minting contract from 1
  3. Transfer stx to treasury of 3
  4. Set pool address
  5. Delegate stx to pool
  6. Pay stackers that were not paid in cycle 55 due to bug

Please kindly suggest edits to this first draft.

whoabuddy commented 1 year ago

Hey @Rapha-btc - thanks for getting this started! Based on the discussions in Discord I think we should separate our intentions into three SIPs:

With this the first would be scoped to the changes we need now in line with pox-3.

The second would represent the voting method where we can document it's usage across different proposals, as well as replace it with a future method using the same CCIP process.

The third would be the place to store calculations and related proofs for claims, where we can try to use on-chain data where possible (at-block will come in handy!).

Given that structure let's start filling in this draft with the information we have for the pox-3 upgrade. An easy way to start is to copy all the headings from CCIP-000, and we can fill them in as the implementation progresses.

whoabuddy commented 1 year ago

Actually, looking closer at the PR, instead of attaching the markdown in the text file to your comment you should include the code as part of your changes.

You can do that by renaming the file ccips/ccip-014/first-draft to ccips/ccip-014/ccip-014-upgrade-to-pox-3.md then putting the contents inside.

Then it will show the code line-by-line and display it correctly on GitHub for the PR.

There are also a few spots where pox-2 should be updated to pox-3 as well.

Let me know if you have any questions!

Rapha-btc commented 1 year ago

Thanks for your kind guidelines. Looking forward to review code edits and continue to learn!

whoabuddy commented 1 year ago

FYI - going to add some commits to keep this moving along, and contracts are still being tracked in this PR.

Rapha-btc commented 1 year ago

After a week-long vacation without Internet access, I've returned to find that the community has made impressive progress and approved great work! A big thank you to WAB, Friedger, and everyone involved for their contributions and approval.

I did find the ccd002 upgrade on the Stacks Explorer and the ccip014-pox-3-v2 in the proposals folder! POX-3 > POX! (match (as-contract (contract-call? 'SP000000000000000000002Q6VF78.pox-3 delegate-stx maxAmount to none none))

An expedited vote is indeed the preferred approach for making changes and fixes that do not alter the governance of citycoins but rather ensure their compatibility with Stacks updates. Regarding the new contracts, there are four new contracts: "ccd006-citycoin-mining-v2" and "ccd002-treasury-v2" for two different cities, correct? The restriction on executing proposals is handled at the ccip014 level at this time, correct? Could you please share the treasury-v2 links as well? image

whoabuddy commented 1 year ago

Regarding the new contracts, there are four new contracts: "ccd006-citycoin-mining-v2" and "ccd002-treasury-v2" for two different cities, correct?

The four contracts deployed were:

In addition to that, a trait representing CCIP-015 was deployed and used, and is available for future proposals that include a vote.

The contract for ccip-014-pox-3 failed to execute though due to one of the cycles it was attempting to close out being active, see note from Discord:

Bad news: the final tx failed. CCIP-014 was trying to pay out cycles 56-59 but cycle 59 isn't complete, so we get the error u7006 or ERR_INCOMPLETE_CYCLE.

Following that, ccip-014-pox-3-v2 was deployed and executed after checking the is-executable function of the original ccip-014-pox-3.

(define-read-only (is-executable)
  (contract-call? .ccip014-pox-3 is-executable)
)

The restriction on executing proposals is handled at the ccip014 level at this time, correct?

Yes, per the CCIP-015 draft spec and using the trait listed above (first implementation). Any proposal can do the same, and a new method could be defined by a new CCIP should we need it.

Could you please share the treasury-v2 links as well?

Linked the deployed contracts in my comments above. :slightly_smiling_face:

whoabuddy commented 1 year ago

This is ready to merge! Congrats everyone for making it happen, and @Rapha-btc for kicking off the efforts!