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

[Config] Implement Protocol Paramsets #563

Draft
wants to merge 8 commits into
base: dev
Choose a base branch
from
Draft

[Config] Implement Protocol Paramsets #563

wants to merge 8 commits into from

Conversation

mmtftr
Copy link

@mmtftr mmtftr commented Feb 25, 2025

Description

This PR introduces a new config param named protocol_paramset which defines the various constants used within our bitcoin bridge contract. These include transaction UTXO amounts, timelock durations, btc network, winternitz commitment params

Linked Issues

Testing

Will add tests that validate that txhandlers can be constructed for all paramsets.

Thinking of adding tests to check the spendability of txhandlers by using a mechanism that checks whether a Tx has an anchor output, if so can it be spent using CPFP (TRUC)? Otherwise, check if all of its inputs are anyonecanpay, so that it can be RBF'd.

Docs

Docs are available in the new protocol.rs file.

@mmtftr mmtftr changed the base branch from main to dev February 25, 2025 10:14
This commit completes the migration of timelock-related constants from the constants module to the protocol paramset. Specifically:
- Removed BLOCKS_PER_DAY and BLOCKS_PER_WEEK constants from constants.rs
- Added timelock-specific fields to ProtocolParamset
- Updated transaction creation functions to use paramset-defined timelocks
- Maintained existing timelock durations for mainnet, testnet, and regtest networks
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.

Add a protocol_paramset config and define paramsets
1 participant