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

Rework forfeit transactions validation #382

Merged
merged 6 commits into from
Nov 18, 2024

Conversation

louisinger
Copy link
Collaborator

@louisinger louisinger commented Nov 18, 2024

This PR changes the verification process of the forfeit transaction made by the server. It allows the client to compute the forfeit tx fee amount.

Instead of building every forfeit transactions before the round finalization, the server waits to receive the signed forfeit tx to verify it. The server verifies the fee amount is not lower than the min-relay-fee and do not exceed 105% of the min-relay-fee. It has several advantages:

  • do not "freeze" the fees amount, making the estimation more flexible.
  • make the fee estimation more accurate because the user knows the exact size of the tapscript control block.
  • the server does not have to build every forfeit transactions before sending the vtxo tree to round participants. This makes round creation quicker.
  • the server doesn't keep descriptors in memory during the round creation.

@tiero @altafan please review

@louisinger louisinger requested a review from altafan November 18, 2024 15:15
@altafan altafan merged commit 0d2db92 into ark-network:master Nov 18, 2024
5 checks passed
sekulicd pushed a commit that referenced this pull request Nov 21, 2024
* compute forfeit partial tx client-side first

* fix conflict

* go work sync

* move verify sig in VerifyForfeits

* move check after len(inputs)
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.

2 participants