Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCIP-014: Upgrade to pox-3 #14

Merged
merged 14 commits into from
Aug 31, 2023
Merged

CCIP-014: Upgrade to pox-3 #14

merged 14 commits into from
Aug 31, 2023

Conversation

Rapha-btc
Copy link
Contributor

@Rapha-btc Rapha-btc commented Apr 19, 2023

CCIP-014

Preamble

CCIP Number 014
Title Upgrade to pox 3
Author(s) Raphael R. Sierra [email protected]
On behalf of the community, see discussion details in issue #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.

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

Please see more details here: citycoins#13 and kindly suggest edits to this first draft.
@Rapha-btc Rapha-btc changed the title Create first-draft Upgrade to pox 2 Apr 19, 2023
@whoabuddy
Copy link
Contributor

whoabuddy commented Apr 26, 2023

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
Copy link
Contributor

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!

@whoabuddy whoabuddy changed the title Upgrade to pox 2 CCIP-014: Upgrade to pox-3 Apr 26, 2023
@Rapha-btc
Copy link
Contributor Author

Rapha-btc commented Apr 27, 2023

  • Renamed

  • Copy-pasted template in Files

  • Corrected typos 2-> 3

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

@whoabuddy
Copy link
Contributor

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

@Rapha-btc
Copy link
Contributor Author

Rapha-btc commented May 30, 2023

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
Copy link
Contributor

whoabuddy commented Aug 31, 2023

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. 🙂

@whoabuddy
Copy link
Contributor

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

@whoabuddy whoabuddy merged commit 9220db9 into citycoins:main Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants