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

Adds the ability to register custom Bitcoin signets #1226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sipsorcery
Copy link
Contributor

With testnet full of spam a custom sigent has become more appealing.

This PR is an attempt at allowing NBitcoin to initialise a signet with a custom challenge (no more flakey faucets).

I got this approach to work with nbxplorer to index my custom signet blockchain but despite that I'm not sure if this is the ideal approach or not. Happy to take any advice on alternatives.

@Kukks
Copy link
Contributor

Kukks commented Sep 16, 2024

Does #1222 help you?

@sipsorcery
Copy link
Contributor Author

Thanks for the follow-up.

Does #1222 help you?

I don't think so. Isn't MutinyNet just hard coding another signet variation?

This PR is so the hard coded parameters are not required and NBitcoin can be used with any arbitrary signet challenge.

@NicolasDorier
Copy link
Collaborator

@sipsorcery concept ACK, but can you rebase as I merged #1222 which moved some stuff around

@sipsorcery
Copy link
Contributor Author

@Kukks I was looking at the signet and mutinynet initialisation and the only differences are:

  • chain name and aliases
  • POW target spacing
  • network seeds
  • challenge

One thing not different, that I suspect should be, is the genesis block. I think NBXplorer uses it to detect the start of the chain. MutinyNet can't be using the same genesis block as the default signet chain given they have different block signing keys. Might not matter if NBXplorer is not being used.

I could add another partial class to initialise a custom signet but it would seem better to create a single bitcoin signet class that can be initialised with different options for the parameters above. wdyt?

@dangershony
Copy link
Contributor

ACK good idea, we also use a custom signet.

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.

4 participants