-
Couldn't load subscription status.
- Fork 90
SIP-034: Dimension-Specific Tenure Extend Variants #236
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
base: main
Are you sure you want to change the base?
Conversation
| 0x02 indicates Extend read-count budget is reset. | ||
| 0x03 indicates Extend runtime budget is reset. | ||
| 0x04 indicates Extend read-length budget is reset. | ||
| 0x05 indicates Extend write-count budget is reset. | ||
| 0x06 indicates Extend write-length budget is reset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this order? Could we swap runtime and read-count or was there a specific reason for this order?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason. I can swap them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The database fields on a stacks api node are ordered in this way (alphabetic):
execution_cost_read_count
execution_cost_read_length
execution_cost_runtime
execution_cost_write_count
execution_cost_write_length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that's fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 97719e1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could there be a scenario where it may be preferable to reset the count on more than 1 field?
i.e. reset on both of write-count and read-count?
from this table, it's apparent only that either all fields are reset, or one is reset only.
| 0x02 indicates Extend read-count budget is reset. | ||
| 0x03 indicates Extend runtime budget is reset. | ||
| 0x04 indicates Extend read-length budget is reset. | ||
| 0x05 indicates Extend write-count budget is reset. | ||
| 0x06 indicates Extend write-length budget is reset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The database fields on a stacks api node are ordered in this way (alphabetic):
execution_cost_read_count
execution_cost_read_length
execution_cost_runtime
execution_cost_write_count
execution_cost_write_length
| The Stacks network controls total runtime and I/O expenditure during Nakamoto tenures | ||
| via a total tenure budget. Costs are tracked using worst-case estimates of the actual | ||
| runtime or I/O expended to evaluate a given Clarity operation. In Nakamoto rules, | ||
| signers and miners may coordinate to include a `TenureChange` transaction in the miner's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this SIP affect the effectiveness of the coordination between signers and miners? Before there were only two options which are less likely to be disputed.
The SIP should address what happens if coordination fails, or why it is likely to improve the situation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add this to the SIP. The coordination would basically be the same as it is now -- right now, the signers signal to miners (and to each other) when they will accept a TenureExtend via the BlockResponseMetadata::tenure_extend_timestamp included within a BlockAcceptance message. Once enough signers have posted a timestamp that is in the past, the miner will create a TenureExtend transaction in their next block.
Signers internally decide what this timestamp will be based on how much "idle time" they have observed (i.e. time not processing block proposals). This ensures that the rate of block appends is low enough that a crashed signer (or new follower) can quickly catch up to the chain tip.
After this SIP is ratified, signers would similarly track notions of "idle time" for each of these cost dimensions, and share them amongst themselves and the miners. For example, they may require that the average rate of read I/O operations be beneath a certain threshold before they'll allow a miner to issue a read-count extension. This computation and sharing does not need to ship with the hard-fork since it is not consensus-breaking, but would be added shortly afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in 97719e1
|
The reference implementation is being developed in this PR. |
Technical CAB approval for SIP-034
add gov cab signoff for sip-034
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say this is nearly ready for sign-off from the editors.
- Correct some minor spelling/grammer issues
- Add the "Reference implementation" section and References section
- I think the Activation section could explain a bit better what it means to be a rider to the 033 (clarity 4) SIP.
sips/sip-034/sip-034.md
Outdated
| measurement of how much of each resource each Clarity operation consumes. The | ||
| current model is pessimistic, and assumes a worst-case resource consumption. It | ||
| also does not consider the size of the _value_ of the data being processed; it | ||
| instead consideres the _worst-case size_ allowed by the data's _type_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
considers instead of consideres
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spanish : )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 8821768
|
|
||
| This SIP details a rider to SIP-033, including a new variant of the tenure change | ||
| control transaction. This variant allows the tenure change to specify a specific | ||
| dimension of the block budget to reset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clearer: ...which dimension of the block budget is reset.
instead of "...a specific dimension of the block budget to reset.".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 8821768
|
|
||
| # Introduction | ||
|
|
||
| The Stacks network controls total runtime and I/O expenditure during Nakamoto tenures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...Nakamoto tenures, I think it makes sense to reference SIP021 here [1]: https://github.com/stacksgov/sips/blob/main/sips/sip-021/sip-021-nakamoto.md#nakamoto-terminology
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 8821768
sips/sip-034/sip-034.md
Outdated
| # Activation | ||
|
|
||
| This is intended as a rider SIP to SIP-033. If SIP-033 is ratified, then this | ||
| SIP will also be ratified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add these two sections and references.
Reference implementation
stacks-network/stacks-core#6609
References
[1] SIP021 Nakamoto, Tenure definition: https://github.com/stacksgov/sips/blob/main/sips/sip-021/sip-021-nakamoto.md#block-structure
[2] SIP021 Nakamoto, Block header wire format: https://github.com/stacksgov/sips/blob/main/sips/sip-021/sip-021-nakamoto.md#block-structure
[3] SIP033 Clarity 4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 8821768
| has been added are new values to represent the kind of tenure extension | ||
| requested. | ||
|
|
||
| # Activation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If activation criteria are redundant because this is a rider to SIP-033, that should be explicitly stated with some criteria or process for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 8821768
sips/sip-034/sip-034.md
Outdated
| ## Wire Formats | ||
|
|
||
| The serialization of the `TenureChangePayload` will be a backwards-compatible extension of | ||
| the existing SIP-021 serialization: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets add a reference here [2] https://github.com/stacksgov/sips/blob/main/sips/sip-021/sip-021-nakamoto.md#block-structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 8821768
This SIP details a rider to SIP-033, including a new variant of the tenure change control transaction. This variant allows the tenure change to specify a specific dimension of the block budget to reset.
The purpose of this SIP is to make it so that cost-heavy transactions which otherwise execute quickly can be mined, regardless of how pessimistic the current cost model is.
This PR supersedes #234 since I can't push to #234's remote.