Skip to content

Add support for signet genesis block#61

Merged
remyers merged 2 commits intoACINQ:masterfrom
remyers:signet
Aug 18, 2022
Merged

Add support for signet genesis block#61
remyers merged 2 commits intoACINQ:masterfrom
remyers:signet

Conversation

@remyers
Copy link
Contributor

@remyers remyers commented Aug 16, 2022

See issue #60 and Eclair discussion/request #2382

This PR also adds check of the final genesis block hashes.

Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just wondering what the Segnet one we have is supposed to be...

)

@JvmField
public val SignetGenesisBlock: Block = LivenetGenesisBlock.copy(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what the Segnet one above refers to?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Segnet was a test network that was used to test segwit in 2016. It's most likely dead by now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I guess we can remove it in this PR then? It's a bit confusing with Signet...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, it was ported from bitcoin-lib but is useless now.

@t-bast
Copy link
Member

t-bast commented Aug 17, 2022

@remyers can you remove the Segnet hash in this PR as well (and in ACINQ/bitcoin-lib#70)?

@remyers
Copy link
Contributor Author

remyers commented Aug 17, 2022

@remyers can you remove the Segnet hash in this PR as well (and in ACINQ/bitcoin-lib#70)?

It looks like I will have to recreate on testnet some tests in SegwitTestsCommon.kt that reference segnet transactions.

@t-bast
Copy link
Member

t-bast commented Aug 17, 2022

It looks like I will have to recreate on testnet some tests in SegwitTestsCommon.kt that reference segnet transactions.

Good point, but I think most of these tests are obsolete, and were only useful before segwit was activated. You can probably greatly simplify this test file by just verifying that p2wpkh and p2wsh work as expected, without referencing segnet transactions, this will remove some technical debt!

@remyers
Copy link
Contributor Author

remyers commented Aug 17, 2022

The tests seemed useful, so I just ported them to testnet in 2581f47 after removing segnet.

Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

segwit

Yay saved fees!

@remyers remyers merged commit 199b0f4 into ACINQ:master Aug 18, 2022
@remyers remyers deleted the signet branch August 18, 2022 06:48
dpad85 added a commit to ACINQ/phoenix that referenced this pull request Sep 23, 2022
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