Replies: 1 comment 2 replies
-
For the service bit, let's just send out a message on the dev mailing list like the comment suggests when we're ready to actually set up nodes. How about just using bit 24? If there are other experiments using it, we can increment by +1 until we get to a bit that's not being used. Inventory vectors look good. For messages, instead of making separate wire messages, how about making a separate encoding like We can have the |
Beta Was this translation helpful? Give feedback.
-
Service bit
A node should set the
NODE_UTREEXO
service bit to announce its ability to serve or receive proofs. Bits 24- 31 are reserved for experiments so we should choose one of those for now.Inventory vector types
https://en.bitcoin.it/wiki/Protocol_documentation#Inventory_Vectors
Add two new types:
MSG_BLOCK_UTREEXO
,MSG_TX_UTREEXO
Messages
There are multiple options when it comes to how we could add proofs to the protocol.
Add a new message (e.g.:
proof
) that only contains proof data for blocks or transactions. This is not the best idea since transactions and blocks don't make sense to a compact node without proof, so it makes more sense to fuse the two into one message. Requesting individual proofs could still be useful in addition to (2) or (3). A compact node could request proof for a block or transaction that was received by a non-Utreexo node from a Utreexo peer. This could help bridges remain undetected because they would otherwise be the only Utreexo nodes that request regular blocks and transactions.Duplicate existing messages related to block and transaction relay. (e.g.:
block
->ublock
) The duplicated messages are the same as there original besides the command string and the appended proofs. This has the benefit that non-Utreexo nodes would ignore these messages if they were send to them by accident. Messages that would have to be duplicated:getblocks
,block
,tx
,sendcmpct
,cmpctblock
,getblocktxn
,blocktxn
. I personally am a bit on the fence about this approach because a combination of (3) and the added inventory types should be sufficient to avoid sending proofs to non-Utreexo nodes and requires no new messages.Don't add any new messages and append the proofs at the end of messages (
block
,tx
,blocktxn
) depending on the type of node that is being served. If aNODE_UTREEXO
node receives a message from anotherNODE_UTREEXO
node the receiver should expect the message to contain proofs. If a message is send by aNODE_UTREEXO
node to anotherNODE_UTREEXO
node the sender should append proofs. This approach should also take the added inventory types into account,inv(MSG_*_UTREEXO)
orgetdata(MSG_*_UTREEXO)
should only be answered with proof appended messages.We should discuss which of these approaches we want to go with (Maybe there are more approaches?). utcd currently implements (2) although so far only
getblocks
andblock
have been duplicated.Beta Was this translation helpful? Give feedback.
All reactions