-
Notifications
You must be signed in to change notification settings - Fork 92
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
[rooch] support Bitcoin network protocol from nostr example #406
Comments
Please clarify which Bitcoin protocols we would like to support. |
We should support basic secp256k1 protocol of bitcoin as nostr uses it to implement account keys. Nostr's key infrastructure uses schnorr, XOnlyPublicKey, SecretKey, KeyPair, respectively. You can refer to this I have added to PR draft: https://github.com/rooch-network/rooch/pull/408/files#diff-3b5b019d0ba29ef5f2611225e57614771b1a38b6a1c75552f0a49a57dfb2cba7R14 Furthermore, we should also support bitcoin address mapping, e.g. Taproot address and earlier address implementations of Bitcoin, to Rooch address to achieve mutually binding, and other libraries nostr implements as listed here: |
|
Yes it is true. It seems that
This might not be true. From my testing experience at: rooch/crates/rooch-types/src/address.rs Line 366 in 3479ffc
The test only generates addresses starting We should also support addresses of protocol starting Reference: https://en.bitcoin.it/wiki/Invoice_address Also, nostr uses Schnorr algorithm for creating and verifying signatures, which isn't supported at Rooch. The algorithm is commonly used on Bitcoin Lightning Networks and key-breaking multi-sig hardwares. Reference: https://en.bitcoin.it/wiki/Schnorr |
Rooch's BitcoinAddress is a wrap of bitcoin::Address. It likes is supports all Bitcoin address types. |
This isn't totally correct. The BitcoinAddress at Rooch is wrapped bitcoin::Address, while its random() function is /// The method used to produce an address.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[non_exhaustive]
pub enum Payload {
/// P2PKH address.
PubkeyHash(PubkeyHash),
/// P2SH address.
ScriptHash(ScriptHash),
/// Segwit address.
WitnessProgram(WitnessProgram),
} Generally the test function is using random() which only supports H160 for Ethereum and Bitcoin. |
At the time of writing, Rooch doesn't support Bitcoin related protocol.
nostr, on the other hand, supports Bitcoin protocols, and by supporting nostr on Rooch, we can further support Bitcoin networking infrastructure on Rooch.
We should support
secp256k1
curve on account's keys andSchnorr
signatures on Bitcoin network, Bitcoin address mapping to Rooch address on protocols ofP2PKH
,P2SH
, andBech32
,sha256
of Bitcoin hashes, etc. In essence, referential implementations of Bitcoin protocols on nostr should be supported as well as on Rooch.Currently, there are several ways to implement nostr on Rooch:
Perfectly, we should support 2 as the ultimate decentralized solution, that everyone can run a Rooch node as a nostr relay.
We also need a transactional executor for nostr events, perfectly using Move, to store to the merkle tree state and retrieve the state from.
I will take handle on this issue to further support Bitcoin infrastructure on Rooch.
Task division:
schnorr
signature standard for nostr and bitcoin protocol #457Following discussions on Discord:
https://discord.com/channels/1078938449974935592/1124908489525960714
The text was updated successfully, but these errors were encountered: