From 1bb4e9eb32a3438f57059bed4dc845fb8dbdce81 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 7 Aug 2023 18:03:20 +0200 Subject: [PATCH 1/2] caps/eth.md: change encoding of eth/68 tx announcement Due to an implementation flaw in go-ethereum and other clients, we have decided to change the encoding of the `txtypes` list into a byte array. --- caps/eth.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/caps/eth.md b/caps/eth.md index e704c20b..d0764601 100644 --- a/caps/eth.md +++ b/caps/eth.md @@ -393,12 +393,15 @@ block. ### NewPooledTransactionHashes (0x08) -`[[txtype₁: P, txtype₂: P, ...], [txsize₁: P, txsize₂: P, ...], [txhash₁: B_32, txhash₂: B_32, ...]]` +`[txtypes: B, [txsize₁: P, txsize₂: P, ...], [txhash₁: B_32, txhash₂: B_32, ...]]` This message announces one or more transactions that have appeared in the network and -which have not yet been included in a block. Note that the message payload contains three -sub-lists containing the [transaction types], sizes, and hashes of the announced -transactions. All three sub-lists must be of equal length. +which have not yet been included in a block. The message payload describes a list of +of transactions, but note that it is encoded as three separate elements. + +The `txtypes` element is a byte array containing the announced transaction types. +The other two payload elements refer to the sizes and hashes of the announced transactions. +All three payload elements must contain an equal number of items. The recommended soft limit for this message is 4096 hashes (~150 KiB). From a2dac69b127bef2cfd43b1162be1ff2316cb86b5 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 7 Aug 2023 18:05:00 +0200 Subject: [PATCH 2/2] caps/eth.md: add link --- caps/eth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caps/eth.md b/caps/eth.md index d0764601..bdf5ddf4 100644 --- a/caps/eth.md +++ b/caps/eth.md @@ -399,7 +399,7 @@ This message announces one or more transactions that have appeared in the networ which have not yet been included in a block. The message payload describes a list of of transactions, but note that it is encoded as three separate elements. -The `txtypes` element is a byte array containing the announced transaction types. +The `txtypes` element is a byte array containing the announced [transaction types]. The other two payload elements refer to the sizes and hashes of the announced transactions. All three payload elements must contain an equal number of items.