feat(p2p): implement BIP-0183 (Utreexo Peer Services)#5009
Conversation
|
I wonder if it's correct to use |
You mean for leaf data? That is always a script pubkey, can't you use the tag for it and avoid being generic? |
|
On pub struct ReconstructableScript {
/// The kind of locking script the UTXO is locked to.
pub tag: ReconstructableScriptTag,
/// The actual script, if [`ReconstructableScriptTag`] is of kind `Other`.
pub script: Option<Vec<u8>>,
} |
|
I've implemented this. However, you can use |
|
Can you just use a Rust enum? This looks like a manual implementation of a tagged union, which is exactly what a Rust enum is. |
Makes sense, this would also prevent the illegal state where the tag is |
|
For scripts, is the script always a ScriptPubKey (locking script)? Are there any constraints (size, canonicality) enforced? |
There was a problem hiding this comment.
Please don't post LLM output like this. It is obviously useless to complain about unimplemented!() calls in a draft PR. I did not read the rest of your paste.
0293e71 to
14fd2a2
Compare
storopoli
left a comment
There was a problem hiding this comment.
Some doc nits.
Where the hell are these test vectors?
@Davidson-Souza Where the hell are these test vectors? |
14fd2a2 to
46250bf
Compare
0d93549 to
1e2f3a0
Compare
Add the new Utreexo network message variants to `NetworkMessage`, `V2NetworkMessage` and `RawNetworkMessage`
00f4b0b to
f14e21d
Compare
This (draft) PR implements BIP-0183: Utreexo - Peer Services on the
p2pcrate.Still missing a few TODOs. I'll keep this as a draft until the Utreexo BIPs get finalized.
Changelog
NODE_UTREEXOservice bitNODE_UTREEXO_ARCHIVEservice bitCompactLeafDatatypeReconstructableScriptTagtypeReconstructableScripttypeTTLInfotypeUtreexoTTLtypeuproofmessagegetuproofmessageuttlsmessagegetuttlsmessageusummarymessageutreexotxmessageurootmessagegeturootmessageEncodablefor allDecodablefor allArbitraryfor allTODO