stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3k stars 659 forks source link

[Clarity] TBD contract for keeping sbtc state #3958

Open jferrant opened 10 months ago

jferrant commented 10 months ago

There should be a boot contract (.sbtc) that stores pending sBTC operations -- the miner node will be responsible for inserting them into the contract.

We should have read only functions to retrieve all pending transactions (peg-in, peg-out, handoff) There should be a read only function to check current state (e.g., if we haves sBTC ops older than x amount of time...this is bad state, DKG has not been set within x amount of time, etc.). There should be a write function (only writeable by the N signers for a given reward cycle N) to set DKG

Considering re-visiting / re-factoring / importing logic used in sbtc-registry: https://github.com/Trust-Machines/stacks-sbtc/blob/main/sbtc-mini/contracts/sbtc-registry.clar

Relates to https://github.com/stacks-network/stacks-blockchain/issues/3948

setzeus commented 10 months ago

Latest update on #3977

setzeus commented 10 months ago

Latest update here: https://github.com/stacks-network/stacks-blockchain/tree/add-storage-contracts

setzeus commented 9 months ago

Reading through SIP25 to highlight differences b/w DR & Nakamoto sBTC.

https://github.com/stacksgov/sips/pull/156