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

SIP-012: Burn height selection for network-upgrade to introduce new cost-limits #41

Merged
merged 49 commits into from
Dec 7, 2021

Conversation

diwakergupta
Copy link
Contributor

The current Clarity cost limits were set very conservatively in Stacks 2.0: transactions with contract-calls frequently exceed these limits, which negatively affects transaction throughput. This SIP proposes an update to these cost-limits via a network upgrade and further, that the network upgrade be executed at a block height chosen by an off-chain process described in this SIP.

@diwakergupta
Copy link
Contributor Author

Tagging some folks to get the ball rolling here: @jcnelson @friedger @kantai @lgalabru @hstove @jasonklau @0xAsteria

@diwakergupta
Copy link
Contributor Author

Also cc/ @xanbots

@Zk2u
Copy link

Zk2u commented Oct 14, 2021

Looking awesome. Do we reckon we can get it from 3 weeks down to 2 weeks?

@LNow
Copy link

LNow commented Oct 14, 2021

@diwakergupta is there any particular reason to increase cost of contract-of over 13x ?
We can't pass to it anything but valid trait, which by default consists proper contract address, therefore I don't understand why do we have to increase its cost.

@hstove
Copy link
Contributor

hstove commented Oct 14, 2021

Big fan of this SIP!

Question about static vs. dynamic costs. map-get? is mentioned in the draft, but does this apply to basically anything that has a dynamic size? For example, functions like mine-many in MiamiCoin. The function arg has a (list 200 uint). Does this mean that, after this change, the cost will be based on the size of the argument, instead of the max length? If this change applies all around, that would be huge. I have found that this pattern is highly necessary in many different contexts, so only calculating costs based off of dynamic size would be a huge benefit.


### Changes to Static vs. Dynamic Tabulation of Costs

The cost assessment in Clarity for most data-handling functions (e.g.,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Most", or "all"? If it's "most," then please list them all. Also, "data-handling functions" is not the text we've used to label these; we'd call these "functions that interact with the contract's data space."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this also apply to NFTs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per @kantai, this also applies to NFTs and will be done in the next-costs branch of stacks-blockchain.

@314159265359879
Copy link
Contributor

On the community telegram users are asking when 2.05 will go live. What is the (expected) 'activation block height' for sip012?

I think this text will be updated with the 'activation block height' once it is settled, right?
https://github.com/hirosystems/sips/blob/draft/sip-012/sips/sip-012/sip-012-cost-limits-network-upgrade.md
image

@Zk2u
Copy link

Zk2u commented Nov 12, 2021

@314159265359879 I suggested #711975, but have had no answer (stacks-network/stacks-core#2878 (comment))

@314159265359879
Copy link
Contributor

2.05 not yet and I should see the "tabulation date":
image

ctrl+f (searching for) "tabulation date": 0 mentions. Maybe someone else knows where to find it.

@jcnelson
Copy link
Contributor

jcnelson commented Nov 12, 2021

Was referring to this: https://github.com/stacksgov/sips/pull/41/files#diff-30158688704ec09920309bbc5a856f6b5b2fa55cc91f59191c5b517406c61b20R151-R156. The text calls it the "vote deadline block."

@jcnelson
Copy link
Contributor

jcnelson commented Nov 12, 2021

Okay folks, I spoke again with the authors, and now that the implementation of this SIP is nearly finished, they've proposed activating this officially at Bitcoin block 713,000. The rationale is as follows:

  • It's in the middle of a reward cycle (so the upgrade won't mess with PoX if it breaks).
  • It's early in the work week -- likely Tuesday, December 7 (so the folks who need to be on-call to fix it if it breaks will be available).
  • It gives ample time to verify that the testnet can undergo this hard fork without breaking the network or any downstream services.
  • It's the earliest such block height with these properties that is later than November 29, which was the targeted deadline. November 29 is approximately when cycle 22's prepare phase begins; December 7 is in the middle of cycle 22.

In a similar vein, the vote deadline block will be the height of the first Bitcoin block mined after 12:00pm EST on November 23. The SIP text will be updated to reflect this block height once it is known.

Sounds good? The final decision will be made at the public blockchain meeting this coming Monday (November 15) at 11am EST. If you'd like to debate this further, please come to this meeting or leave feedback here over the weekend (so we can discuss it at the meeting if you're unable to attend).

@jasonklau
Copy link

jasonklau commented Nov 14, 2021 via email

@laelymenyon
Copy link

GG

@jcnelson
Copy link
Contributor

Just had the public blockchain engineering meeting, and there were no objections. 713,000 it is.

@jcnelson
Copy link
Contributor

All right, folks -- it's vote ratification day! Bitcoin block 710,001 was the first block mined after 12pm EST, so we're gonna go with the votes that got in before it was mined.

My totals from the scripts in this PR are as follows:

  • Yes: 129,615,879.836327
  • No: 0

I realize that these do not match sip012.xyz, and I'm happy to discuss it more, but that doesn't matter too much because the activation threshold has been cleared. SIP 012 will officially transition to activation-in-progress.

In the mean time, a release candidate of the Stacks 2.05 node can be found here: https://github.com/blockstack/stacks-blockchain/releases/tag/2.05.0.0.0-rc1. It is backwards-compatible with Stacks 2.0 chainstate, so if you want to download and run it to try it out, please feel free to do so.

See you all on the other side of Bitcoin block 713,000!

@jcnelson
Copy link
Contributor

Alright folks, release 2.05.0.0.0 is out!

Release: https://github.com/blockstack/stacks-blockchain/releases/tag/2.05.0.0.0
Foundation announcement: https://groups.google.com/u/1/a/stacks.org/g/announce/c/RhDz0hj-XjI

Comment on lines +28 to +29
num_locked = $7
until = $16

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The success of this function appears to be tied directly to the token quantity and ordering found inside debug log output, which looks brittle and a source of future bugs – if/when someone edits the upstream debug message, not realizing the downstream implications here. So, add some sanity checks before proceeding to use "num_locked" and "until" values?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the stacking records for the vote have been extracted and stored as supplementary materials to this SIP, so there's not much of a concern here. This script is meant mainly to explain how the votes were extracted at the time they were extracted.

wileyj and others added 3 commits December 3, 2021 11:40
Highly subject to change, but is required for some notification channels
Adding an estimated block production time
@jcnelson
Copy link
Contributor

jcnelson commented Dec 7, 2021

SIP 012 has officially activated! Congratulations everyone! Merging this in.

@jcnelson jcnelson merged commit 029b56d into stacksgov:main Dec 7, 2021
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.