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

Agnostic VtxoScript + migrate from descriptor to script array #384

Merged
merged 13 commits into from
Nov 20, 2024

Conversation

louisinger
Copy link
Collaborator

@louisinger louisinger commented Nov 19, 2024

Replace descriptor by tapscripts array

Since descriptors don't yet support timelocks, we are currently using a custom descriptor lib maintained by us. This is cool but the package is basically just a list of supported descriptor templates, not something that is general-purpose and ready-to-use and requires us to update this list for any custom script created by the client, while we designed the Server to support any kind of script.

Therefore, instead of using our custom descriptor package to represent a taproot tree, we now use a list of hex-encoded raw taproot tree leaves, allowing any custom script client-side without having to touch anything server-side.

Agnostic VtxoScript

  • DefaultVtxoScript has been replaced by TapscriptsVtxoScript accepting a set of taproot scripts instead of hardcoding the script types.
  • MultisigClosure and CSVSigClosure now accept a list of keys instead of a hardcoded number of keys. It allows building custom forfeit and exit closures.
  • The server will consider any VTXO script as valid if and only if : (1) all forfeits closures contain at least the Server public key and (2) there is no exit closure where the exit delay is smaller than ARK_EXIT_DELAY.

@altafan @tiero please review

@louisinger louisinger requested a review from altafan November 19, 2024 14:51
louisinger and others added 8 commits November 19, 2024 17:58
* Hotfix: Prevent ZMQ-based bitcoin wallet to panic  (ark-network#383)

* Hotfix bct embedded wallet w/ ZMQ

* Fixes

* Rename vtxo is_oor to is_pending (ark-network#385)

* Rename vtxo is_oor > is_pending

* Clean swaggers

* Revert changes to client and sdk
@altafan altafan merged commit 06dd01e into ark-network:master Nov 20, 2024
6 checks passed
sekulicd pushed a commit that referenced this pull request Nov 21, 2024
* migrate descriptors --> tapscripts

* fix covenantless

* dynamic boarding exit delay

* remove duplicates in tree and bitcointree

* agnostic signatures validation

* revert GetInfo change

* renaming VtxoScript var

* Agnostic script server (#6)

* Hotfix: Prevent ZMQ-based bitcoin wallet to panic  (#383)

* Hotfix bct embedded wallet w/ ZMQ

* Fixes

* Rename vtxo is_oor to is_pending (#385)

* Rename vtxo is_oor > is_pending

* Clean swaggers

* Revert changes to client and sdk

* descriptor in oneof

* support CHECKSIG_ADD in MultisigClosure

* use right witness size in OOR tx fee estimation

* Revert changes

---------

Co-authored-by: Pietralberto Mazza <[email protected]>
altafan added a commit that referenced this pull request Nov 22, 2024
* wasm e2e test

* Remove ark-sdk.wasm.gz from repository

* pr review

* exclude test files from linting

* fix

* test fix

* go work sync

* gha fix

* gha fix

* wasm e2e test

* kill webserver

* Fix nonce encoding/decoding & Fix pop from queue of payment requests (#375)

* bug fix - paymentMap pop input traversal

* bug fix - nonce encode/decode

* pr review

* pr review

* Fix trivy gh action (#381)

* Update trivy gha

* Update tryvy gha

* Fix

* merge

* Panic recovery in app svc (#372)

* panic recovery

* pr review

* Support connecting to bitcoind via ZMQ (#286)

* add ZMQ env vars

* consolidate config and app-config naming

* [Server] Validate forfeit txs without re-building them (#382)

* compute forfeit partial tx client-side first

* fix conflict

* go work sync

* move verify sig in VerifyForfeits

* move check after len(inputs)

* Hotfix: Prevent ZMQ-based bitcoin wallet to panic  (#383)

* Hotfix bct embedded wallet w/ ZMQ

* Fixes

* Rename vtxo is_oor to is_pending (#385)

* Rename vtxo is_oor > is_pending

* Clean swaggers

* Change representation of taproot trees & Internal fixes (#384)

* migrate descriptors --> tapscripts

* fix covenantless

* dynamic boarding exit delay

* remove duplicates in tree and bitcointree

* agnostic signatures validation

* revert GetInfo change

* renaming VtxoScript var

* Agnostic script server (#6)

* Hotfix: Prevent ZMQ-based bitcoin wallet to panic  (#383)

* Hotfix bct embedded wallet w/ ZMQ

* Fixes

* Rename vtxo is_oor to is_pending (#385)

* Rename vtxo is_oor > is_pending

* Clean swaggers

* Revert changes to client and sdk

* descriptor in oneof

* support CHECKSIG_ADD in MultisigClosure

* use right witness size in OOR tx fee estimation

* Revert changes

---------

Co-authored-by: Pietralberto Mazza <[email protected]>

* fix unit test

* fix unit test

* fix unit test

---------

Co-authored-by: Pietralberto Mazza <[email protected]>
Co-authored-by: Marco Argentieri <[email protected]>
Co-authored-by: Louis Singer <[email protected]>
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.

3 participants