From 2e524e583fa52cb97b302401d7d97d085a4aa14c Mon Sep 17 00:00:00 2001 From: Friedger Date: Tue, 7 May 2024 16:22:44 +0200 Subject: [PATCH 1/6] Update for get-block-info --- sips/sip-021/sip-021-nakamoto.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sips/sip-021/sip-021-nakamoto.md b/sips/sip-021/sip-021-nakamoto.md index 89754a5e..ab63db8c 100644 --- a/sips/sip-021/sip-021-nakamoto.md +++ b/sips/sip-021/sip-021-nakamoto.md @@ -36,6 +36,22 @@ In this proposal, Stacks block production would no longer be tied to miner elect This proposal, dubbed the "Nakamoto" release, represents a substantial architectural change to the current Stacks blockchain. If adopted, the Stacks major version would be bumped from 2 to 3. The first Nakamoto release would be 3.0.0.0.0. +# Addendum +_The following was added after this SIP was accepted, where some version number changes were necessary. The following 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. The function should be removed in Clarity 3, instead two new functions should be added that retrieves data for stacks blocks and for tenure blocks: +* `get-stacks-block-info?` + * id-header-hash: as `(get-block-info? id-header-hash bh)`. + * header-hash: as `(get-block-info? header-hash bh)`. + * time: **new** in Clarity 3, this property returns a `uint` value of the stacks block header time field. +* `get-tenure-info?` + * burnchain-header-hash: as `(get-block-info? burnchain-header-hash bh)`. + * miner-address: as `(get-block-info? miner-address bh)`. + * time: as `(get-block-info? time bh)`, returns the value of the burn chain block header time field of the tenure block. + * block-reward: as `(get-block-info? time bh)`. + * miner-spend-total: as `(get-block-info? miner-spend-total bh)`. + * miner-spend-winner: as `(get-block-info? miner-spend-winner bh)`. + # Introduction ## Glossary From 8eeb5265eb40f4261e50cf357960acf5187face1 Mon Sep 17 00:00:00 2001 From: Friedger Date: Tue, 7 May 2024 16:30:45 +0200 Subject: [PATCH 2/6] Add vrf-seed --- sips/sip-021/sip-021-nakamoto.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sips/sip-021/sip-021-nakamoto.md b/sips/sip-021/sip-021-nakamoto.md index ab63db8c..ba434511 100644 --- a/sips/sip-021/sip-021-nakamoto.md +++ b/sips/sip-021/sip-021-nakamoto.md @@ -51,6 +51,7 @@ The introduction of Fast Blocks and of the new Clarity variables `tenure-height` * block-reward: as `(get-block-info? time bh)`. * miner-spend-total: as `(get-block-info? miner-spend-total bh)`. * miner-spend-winner: as `(get-block-info? miner-spend-winner bh)`. + * vrf-seed: as `(get-block-info? vrf-seed bh)` # Introduction From 376ee2a581199d5d77c8c7a97f56b41948d41c8f Mon Sep 17 00:00:00 2001 From: Friedger Date: Mon, 3 Jun 2024 14:19:25 +0200 Subject: [PATCH 3/6] Update sip-021-nakamoto.md --- sips/sip-021/sip-021-nakamoto.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sips/sip-021/sip-021-nakamoto.md b/sips/sip-021/sip-021-nakamoto.md index ba434511..7788c149 100644 --- a/sips/sip-021/sip-021-nakamoto.md +++ b/sips/sip-021/sip-021-nakamoto.md @@ -37,7 +37,7 @@ In this proposal, Stacks block production would no longer be tied to miner elect This proposal, dubbed the "Nakamoto" release, represents a substantial architectural change to the current Stacks blockchain. If adopted, the Stacks major version would be bumped from 2 to 3. The first Nakamoto release would be 3.0.0.0.0. # Addendum -_The following was added after this SIP was accepted, where some version number changes were necessary. The following section addresses these changes **without** changing the ratified text_ +_The following was added after this SIP was accepted, where some clarification about Clarity specifications were necessary. The following 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. The function should be removed in Clarity 3, instead two new functions should be added that retrieves data for stacks blocks and for tenure blocks: * `get-stacks-block-info?` From 0bd3e0082d6b9a9608c43b017e3798d6ae937b98 Mon Sep 17 00:00:00 2001 From: Friedger Date: Thu, 20 Jun 2024 09:31:58 +0200 Subject: [PATCH 4/6] Apply suggestions from code review Co-authored-by: Brice Dobry --- sips/sip-021/sip-021-nakamoto.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sips/sip-021/sip-021-nakamoto.md b/sips/sip-021/sip-021-nakamoto.md index 7788c149..8b212e46 100644 --- a/sips/sip-021/sip-021-nakamoto.md +++ b/sips/sip-021/sip-021-nakamoto.md @@ -39,19 +39,19 @@ This proposal, dubbed the "Nakamoto" release, represents a substantial architect # Addendum _The following was added after this SIP was accepted, where some clarification about Clarity specifications were necessary. The following 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. The function should be removed in Clarity 3, instead two new functions should be added that retrieves data for stacks blocks and for tenure blocks: -* `get-stacks-block-info?` - * id-header-hash: as `(get-block-info? id-header-hash bh)`. - * header-hash: as `(get-block-info? header-hash bh)`. - * time: **new** in Clarity 3, this property returns a `uint` value of the stacks block header time field. -* `get-tenure-info?` - * burnchain-header-hash: as `(get-block-info? burnchain-header-hash bh)`. - * miner-address: as `(get-block-info? miner-address bh)`. - * time: as `(get-block-info? time bh)`, returns the value of the burn chain block header time field of the tenure block. - * block-reward: as `(get-block-info? time bh)`. - * miner-spend-total: as `(get-block-info? miner-spend-total bh)`. - * miner-spend-winner: as `(get-block-info? miner-spend-winner bh)`. - * vrf-seed: as `(get-block-info? vrf-seed bh)` +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 tenure-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)` # Introduction From df17dffd24972d4adbb9634dac91112fe0d5a343 Mon Sep 17 00:00:00 2001 From: Brice Dobry Date: Thu, 20 Jun 2024 08:30:03 -0400 Subject: [PATCH 5/6] Use block height for `get-tenure-info?` --- sips/sip-021/sip-021-nakamoto.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sips/sip-021/sip-021-nakamoto.md b/sips/sip-021/sip-021-nakamoto.md index 8b212e46..3b671e41 100644 --- a/sips/sip-021/sip-021-nakamoto.md +++ b/sips/sip-021/sip-021-nakamoto.md @@ -44,7 +44,7 @@ The introduction of Fast Blocks and of the new Clarity variables `tenure-height` * `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 tenure-height)`, where `property-name` is one of: +* `(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 From 71a5fe011fb4835dcfa7a4890e57708d92ecbc7d Mon Sep 17 00:00:00 2001 From: Brice Dobry Date: Fri, 16 Aug 2024 10:04:34 -0400 Subject: [PATCH 6/6] chore: move addendum to the end of the SIP --- sips/sip-021/sip-021-nakamoto.md | 34 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sips/sip-021/sip-021-nakamoto.md b/sips/sip-021/sip-021-nakamoto.md index 3b671e41..92965a99 100644 --- a/sips/sip-021/sip-021-nakamoto.md +++ b/sips/sip-021/sip-021-nakamoto.md @@ -36,23 +36,6 @@ In this proposal, Stacks block production would no longer be tied to miner elect This proposal, dubbed the "Nakamoto" release, represents a substantial architectural change to the current Stacks blockchain. If adopted, the Stacks major version would be bumped from 2 to 3. The first Nakamoto release would be 3.0.0.0.0. -# Addendum -_The following was added after this SIP was accepted, where some clarification about Clarity specifications were necessary. The following 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)` - # Introduction ## Glossary @@ -554,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]