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

Update for get-block-info in SIP-021 #178

Merged
merged 6 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions sips/sip-021/sip-021-nakamoto.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,23 @@ Users who Stack may not want to run a 24/7 signing daemon. If not, then they can

While this does induce some consolidation pressure, we believe it is the least-bad option. Some users will inevitably want to outsource the signing responsibility to a third party. However, trying to prevent this programmatically would only encourage users to find work-arounds that are even more risky. For example, requiring users to sign with the same key that owns their STX would simply encourage them to trust a 3rd party to both hold and stack their STX on their behalf, which is worse than just outsourcing the signing responsibility.

# Addendum
_The following was added after this SIP was accepted, where some clarification about Clarity specifications were necessary. This section addresses these changes **without** changing the ratified text_

The introduction of Fast Blocks and of the new Clarity variables `tenure-height` and `stacks-block-height` in this SIP requires that the existing Clarity function `get-block-info?` is changed. This function should be removed in Clarity 3, replaced with two new functions to retrieve data for Stacks blocks and tenures:
* `(get-stacks-block-info? property-name block-height)`, where `property-name` is one of:
* `id-header-hash`: equivalent to Clarity 2's `(get-block-info? id-header-hash block-height)`
* `header-hash`: equivalent to Clarity 2's `(get-block-info? header-hash block-height)`
* `time`: **new** in Clarity 3, this property returns a `uint` value matching the time field in the Stacks block header
* `(get-tenure-info? property-name block-height)`, where `property-name` is one of:
* `burnchain-header-hash`: equivalent to Clarity 2's `(get-block-info? burnchain-header-hash block-height)`
* `miner-address`: equivalent to Clarity 2's `(get-block-info? miner-address block-height)`
* `time`: equivalent to Clarity 2's `(get-block-info? time block-height)`, returns the value of the burn chain block header time field of the tenure block
* `block-reward`: equivalent to Clarity 2's `(get-block-info? time block-height)`
* `miner-spend-total`: equivalent to Clarity 2's `(get-block-info? miner-spend-total block-height)`
* `miner-spend-winner`: equivalent to Clarity 2's `(get-block-info? miner-spend-winner block-height)`
* `vrf-seed`: equivalent to Clarity 2's `(get-block-info? vrf-seed block-height)`

# References

- [1] Komlo C, Goldberg I (2020) FROST: Flexible Round-Optimized Schnorr Threshold Signatures. Available at https://eprint.iacr.org/2020/852.pdf and [locally][local-FROST-paper-copy] [Verified 2 February 2024]
Expand Down