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

Feat/reward multiwallet #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Feat/reward multiwallet #1

wants to merge 4 commits into from

Conversation

purusang
Copy link
Collaborator

@purusang purusang commented Mar 9, 2025

This pr enable two important features:

  • allows multiple wallet management with custom_signet as obligatory and first one.
    The no of wallets is controlled by NUM_WALLETS env, if its 0 then node will only have custom_signet wallet.
  • enables pre-mining max 100 blocks to an address derived from custom_signet.

purusang added 4 commits March 7, 2025 14:05
- Any arbritrary number of wallets can be created to receive miner reward
- Preexisting custom_signet is still rewarded
- A new script "setup-mineto-address.sh" is added which got major logic for this update
@purusang purusang requested review from sapinb and Rajil1213 March 9, 2025 10:18
@sapinb
Copy link

sapinb commented Mar 9, 2025

@Rajil1213 Are we planning to connect all the bridge nodes to the same bitcoin node, which is also the miner node of the signet? I dont think this is a good idea.

@Rajil1213
Copy link

Are we planning to connect all the bridge nodes to the same bitcoin node, which is also the miner node of the signet? I dont think this is a good idea.

@sapinb that's not a requirement. Each bridge node needs two wallets:

  1. To make front-payments, fund dust outputs and for CPFP-ing transactions. This requires a non-deterministic amount of funds so it should be well-funded at all times.
  2. To stake some funds. This only requires 1 BTC (assuming that that's the deposit denomination).

We are planning to deploy 3 bridge nodes. So that means we need 3 well-funded addresses and 3 addresses with 1 BTC. These addresses will be derived from some master xpriv during bridge deployment.

@purusang
Copy link
Collaborator Author

@Rajil1213 Got it. So can I modify the program such that it takes some addresses (bridge nodes) and mining rewards are sent to them in cycle instead of managing arbritrary wallets for them?

@Rajil1213
Copy link

Rajil1213 commented Mar 11, 2025

So can I modify the program such that it takes some addresses (bridge nodes) and mining rewards are sent to them in cycle instead of managing arbritrary wallets for them?

Yes. That's the most straightforward approach. These wallets don't need a lot of funds either. One wallet only ever needs 1 BTC. The other wallet needs a constant influx of funds but even with just 4 BTC, it can serve ~10000 deposits/withdrawals (not considering the transaction fees).

Another thing to note is that for the first deployment we also require the miner node to be run with the following options:

minrelaytxfee=0.0
blockmintxfee=0.0
dustRelayFee=0.0

This will allow transactions with 0 fees to be mined as well since we are not handling any dynamic fees during our first deployment of the bridge.

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