Skip to content
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

CBOR decoding error in replication connection handler #397

Closed
sandreae opened this issue May 31, 2023 · 16 comments · Fixed by #440
Closed

CBOR decoding error in replication connection handler #397

sandreae opened this issue May 31, 2023 · 16 comments · Fixed by #440
Labels
bug Something isn't working

Comments

@sandreae
Copy link
Member

[2023-05-31T11:25:26Z WARN  aquadoggo::network::replication::handler] Cbor(
        ErrorImpl {
            code: Message(
                "invalid type: integer `49`, expected p2panda replication message",
            ),
            offset: 0,
        },
    )
@adzialocha
Copy link
Member

Do you have the actual message body (in cbor)?

@sandreae
Copy link
Member Author

No..... was trying to track that down now 😅

@adzialocha adzialocha changed the title cbor decoding error in replication connection handler cbor decoding error in replication connection handler May 31, 2023
@sandreae
Copy link
Member Author

Haven't seen this error in a while 🤔...

@adzialocha adzialocha added this to the Replication protocol milestone Jun 3, 2023
@adzialocha adzialocha reopened this Jun 19, 2023
@adzialocha
Copy link
Member

adzialocha commented Jun 19, 2023

It shown up again here: https://laub.liebechaos.org/WQ3SzzmtSPyfESfLfNEgFA?edit=

CBOR error: invalid type: integer `49`, expected p2panda replication message

@adzialocha adzialocha added the bug Something isn't working label Jun 19, 2023
@adzialocha adzialocha changed the title cbor decoding error in replication connection handler CBOR decoding error in replication connection handler Jun 19, 2023
@adzialocha
Copy link
Member

adzialocha commented Jun 21, 2023

CBOR error: invalid type: integer `100`, expected p2panda replication message
CBOR error: invalid type: string "\u{18}5\u{18}0\u{18}2", expected p2panda replication message

@adzialocha
Copy link
Member

I still can't reproduce this bug on my machine! I've tried limiting the used threads for tokio but no "success"

@sandreae
Copy link
Member Author

sandreae commented Jul 3, 2023

logging from within encode on CborCodec

=== TIME SystemTime { tv_sec: 1688363573, tv_nsec: 861963120 } ===
=== ENCODE DATA ===
SyncMessage(0, HaveDocuments([(DocumentId(OperationId(Hash("0020ca1d2b85567443b2db42bba286c07fc64b1a46f2d3e67ba819550b09e18eccd0"))), DocumentViewId([OperationId(Hash("0020ca1d2b85567443b2db42bba286c07fc64b1a46f2d3e67ba819550b09e18eccd0"))])), (DocumentId(OperationId(Hash("00207c0dec3322d78efc419432c4a215b3635cb17b3cf20674ff47ec3aed0fa3f24e"))), DocumentViewId([OperationId(Hash("00207c0dec3322d78efc419432c4a215b3635cb17b3cf20674ff47ec3aed0fa3f24e"))])), (DocumentId(OperationId(Hash("0020c3560ffcfa50f14ab01740cd8f832e0fb35035eeb8cd4aca124bac2d42a47a2a"))), DocumentViewId([OperationId(Hash("0020c3560ffcfa50f14ab01740cd8f832e0fb35035eeb8cd4aca124bac2d42a47a2a"))])), (DocumentId(OperationId(Hash("002099dd2c7a77ce59fddb48bcfd18baefc73888849436d471d4aba40aa8f027e13a"))), DocumentViewId([OperationId(Hash("002099dd2c7a77ce59fddb48bcfd18baefc73888849436d471d4aba40aa8f027e13a"))])), (DocumentId(OperationId(Hash("00209f6b09271e1a71ae118d1db23247e3f9365a067d05a7c600f6294efe2853915a"))), DocumentViewId([OperationId(Hash("00209f6b09271e1a71ae118d1db23247e3f9365a067d05a7c600f6294efe2853915a"))])), (DocumentId(OperationId(Hash("0020d0d77bc953af8d55266e3e799f5028bb795a231075c1611394cabe471c0ffb60"))), DocumentViewId([OperationId(Hash("0020d0d77bc953af8d55266e3e799f5028bb795a231075c1611394cabe471c0ffb60"))])), (DocumentId(OperationId(Hash("002070f0b4df30e70117f2e33c32ad3f8a5dad01f6619c9c0a822ddb8b59eecc2c1b"))), DocumentViewId([OperationId(Hash("002070f0b4df30e70117f2e33c32ad3f8a5dad01f6619c9c0a822ddb8b59eecc2c1b"))])), (DocumentId(OperationId(Hash("00207240a08a925afbb93cb3a5ccebfef0cc031781bcfba8d8efc943389242d8fbf0"))), DocumentViewId([OperationId(Hash("00207240a08a925afbb93cb3a5ccebfef0cc031781bcfba8d8efc943389242d8fbf0"))])), (DocumentId(OperationId(Hash("00207b1f675a0c5c810e1983734a7e2735ae9fc9e9902897c6a518e61533bfa2a199"))), DocumentViewId([OperationId(Hash("00207b1f675a0c5c810e1983734a7e2735ae9fc9e9902897c6a518e61533bfa2a199"))])), (DocumentId(OperationId(Hash("0020a222cd828dc0a23854794da35128a3e5cf7ed5bc23a2391da1a7b3a857f87d87"))), DocumentViewId([OperationId(Hash("0020a222cd828dc0a23854794da35128a3e5cf7ed5bc23a2391da1a7b3a857f87d87"))])), (DocumentId(OperationId(Hash("0020befe8ce6aa710223f4e714c0a46e9159c95e5f881cc470b6837e2c168f7b2c0f"))), DocumentViewId([OperationId(Hash("0020befe8ce6aa710223f4e714c0a46e9159c95e5f881cc470b6837e2c168f7b2c0f"))])), (DocumentId(OperationId(Hash("0020d94d8d0044d4364c1cb7625b07dd6d57e4e48690088a3216a7c836cd1bdaa8c4"))), DocumentViewId([OperationId(Hash("0020d94d8d0044d4364c1cb7625b07dd6d57e4e48690088a3216a7c836cd1bdaa8c4"))])), (DocumentId(OperationId(Hash("00200b9458f7190832f74b37644edd3b5462cce2a4129a1a4541afa90750c323d016"))), DocumentViewId([OperationId(Hash("00200b9458f7190832f74b37644edd3b5462cce2a4129a1a4541afa90750c323d016"))])), (DocumentId(OperationId(Hash("0020ae8fe89a482d8ad3595207933dd8a4b2130f3fc82be725eb6c986f1d19dfe5dd"))), DocumentViewId([OperationId(Hash("00200bdb0e71f8e3dddfc72f4ae15e703fe80b0129d28ccfc8ed87a0d37ab94a70f6"))])), (DocumentId(OperationId(Hash("0020cdf698bc210b352aa0f8984251d58de269e7e8a119f7e7eaf5c2651194960b3c"))), DocumentViewId([OperationId(Hash("0020cdf698bc210b352aa0f8984251d58de269e7e8a119f7e7eaf5c2651194960b3c"))])), (DocumentId(OperationId(Hash("00209dc8bc5f80ffa2a6ebc8e6008cf9724d50a4a639778824fc4d37f51bc2664630"))), DocumentViewId([OperationId(Hash("00206f0e9c281bc378dcc094f22a61bcd109e51ac04611045eee5611df7c0c773dd9"))]))]))
=== ENCODED CBOR ===
[131, 11, 0, 144, 130, 120, 68, 48, 48, 50, 48, 99, 97, 49, 100, 50, 98, 56, 53, 53, 54, 55, 52, 52, 51, 98, 50, 100, 98, 52, 50, 98, 98, 97, 50, 56, 54, 99, 48, 55, 102, 99, 54, 52, 98, 49, 97, 52, 54, 102, 50, 100, 51, 101, 54, 55, 98, 97, 56, 49, 57, 53, 53, 48, 98, 48, 57, 101, 49, 56, 101, 99, 99, 100, 48, 129, 120, 68, 48, 48, 50, 48, 99, 97, 49, 100, 50, 98, 56, 53, 53, 54, 55, 52, 52, 51, 98, 50, 100, 98, 52, 50, 98, 98, 97, 50, 56, 54, 99, 48, 55, 102, 99, 54, 52, 98, 49, 97, 52, 54, 102, 50, 100, 51, 101, 54, 55, 98, 97, 56, 49, 57, 53, 53, 48, 98, 48, 57, 101, 49, 56, 101, 99, 99, 100, 48, 130, 120, 68, 48, 48, 50, 48, 55, 99, 48, 100, 101, 99, 51, 51, 50, 50, 100, 55, 56, 101, 102, 99, 52, 49, 57, 52, 51, 50, 99, 52, 97, 50, 49, 53, 98, 51, 54, 51, 53, 99, 98, 49, 55, 98, 51, 99, 102, 50, 48, 54, 55, 52, 102, 102, 52, 55, 101, 99, 51, 97, 101, 100, 48, 102, 97, 51, 102, 50, 52, 101, 129, 120, 68, 48, 48, 50, 48, 55, 99, 48, 100, 101, 99, 51, 51, 50, 50, 100, 55, 56, 101, 102, 99, 52, 49, 57, 52, 51, 50, 99, 52, 97, 50, 49, 53, 98, 51, 54, 51, 53, 99, 98, 49, 55, 98, 51, 99, 102, 50, 48, 54, 55, 52, 102, 102, 52, 55, 101, 99, 51, 97, 101, 100, 48, 102, 97, 51, 102, 50, 52, 101, 130, 120, 68, 48, 48, 50, 48, 99, 51, 53, 54, 48, 102, 102, 99, 102, 97, 53, 48, 102, 49, 52, 97, 98, 48, 49, 55, 52, 48, 99, 100, 56, 102, 56, 51, 50, 101, 48, 102, 98, 51, 53, 48, 51, 53, 101, 101, 98, 56, 99, 100, 52, 97, 99, 97, 49, 50, 52, 98, 97, 99, 50, 100, 52, 50, 97, 52, 55, 97, 50, 97, 129, 120, 68, 48, 48, 50, 48, 99, 51, 53, 54, 48, 102, 102, 99, 102, 97, 53, 48, 102, 49, 52, 97, 98, 48, 49, 55, 52, 48, 99, 100, 56, 102, 56, 51, 50, 101, 48, 102, 98, 51, 53, 48, 51, 53, 101, 101, 98, 56, 99, 100, 52, 97, 99, 97, 49, 50, 52, 98, 97, 99, 50, 100, 52, 50, 97, 52, 55, 97, 50, 97, 130, 120, 68, 48, 48, 50, 48, 57, 57, 100, 100, 50, 99, 55, 97, 55, 55, 99, 101, 53, 57, 102, 100, 100, 98, 52, 56, 98, 99, 102, 100, 49, 56, 98, 97, 101, 102, 99, 55, 51, 56, 56, 56, 56, 52, 57, 52, 51, 54, 100, 52, 55, 49, 100, 52, 97, 98, 97, 52, 48, 97, 97, 56, 102, 48, 50, 55, 101, 49, 51, 97, 129, 120, 68, 48, 48, 50, 48, 57, 57, 100, 100, 50, 99, 55, 97, 55, 55, 99, 101, 53, 57, 102, 100, 100, 98, 52, 56, 98, 99, 102, 100, 49, 56, 98, 97, 101, 102, 99, 55, 51, 56, 56, 56, 56, 52, 57, 52, 51, 54, 100, 52, 55, 49, 100, 52, 97, 98, 97, 52, 48, 97, 97, 56, 102, 48, 50, 55, 101, 49, 51, 97, 130, 120, 68, 48, 48, 50, 48, 57, 102, 54, 98, 48, 57, 50, 55, 49, 101, 49, 97, 55, 49, 97, 101, 49, 49, 56, 100, 49, 100, 98, 50, 51, 50, 52, 55, 101, 51, 102, 57, 51, 54, 53, 97, 48, 54, 55, 100, 48, 53, 97, 55, 99, 54, 48, 48, 102, 54, 50, 57, 52, 101, 102, 101, 50, 56, 53, 51, 57, 49, 53, 97, 129, 120, 68, 48, 48, 50, 48, 57, 102, 54, 98, 48, 57, 50, 55, 49, 101, 49, 97, 55, 49, 97, 101, 49, 49, 56, 100, 49, 100, 98, 50, 51, 50, 52, 55, 101, 51, 102, 57, 51, 54, 53, 97, 48, 54, 55, 100, 48, 53, 97, 55, 99, 54, 48, 48, 102, 54, 50, 57, 52, 101, 102, 101, 50, 56, 53, 51, 57, 49, 53, 97, 130, 120, 68, 48, 48, 50, 48, 100, 48, 100, 55, 55, 98, 99, 57, 53, 51, 97, 102, 56, 100, 53, 53, 50, 54, 54, 101, 51, 101, 55, 57, 57, 102, 53, 48, 50, 56, 98, 98, 55, 57, 53, 97, 50, 51, 49, 48, 55, 53, 99, 49, 54, 49, 49, 51, 57, 52, 99, 97, 98, 101, 52, 55, 49, 99, 48, 102, 102, 98, 54, 48, 129, 120, 68, 48, 48, 50, 48, 100, 48, 100, 55, 55, 98, 99, 57, 53, 51, 97, 102, 56, 100, 53, 53, 50, 54, 54, 101, 51, 101, 55, 57, 57, 102, 53, 48, 50, 56, 98, 98, 55, 57, 53, 97, 50, 51, 49, 48, 55, 53, 99, 49, 54, 49, 49, 51, 57, 52, 99, 97, 98, 101, 52, 55, 49, 99, 48, 102, 102, 98, 54, 48, 130, 120, 68, 48, 48, 50, 48, 55, 48, 102, 48, 98, 52, 100, 102, 51, 48, 101, 55, 48, 49, 49, 55, 102, 50, 101, 51, 51, 99, 51, 50, 97, 100, 51, 102, 56, 97, 53, 100, 97, 100, 48, 49, 102, 54, 54, 49, 57, 99, 57, 99, 48, 97, 56, 50, 50, 100, 100, 98, 56, 98, 53, 57, 101, 101, 99, 99, 50, 99, 49, 98, 129, 120, 68, 48, 48, 50, 48, 55, 48, 102, 48, 98, 52, 100, 102, 51, 48, 101, 55, 48, 49, 49, 55, 102, 50, 101, 51, 51, 99, 51, 50, 97, 100, 51, 102, 56, 97, 53, 100, 97, 100, 48, 49, 102, 54, 54, 49, 57, 99, 57, 99, 48, 97, 56, 50, 50, 100, 100, 98, 56, 98, 53, 57, 101, 101, 99, 99, 50, 99, 49, 98, 130, 120, 68, 48, 48, 50, 48, 55, 50, 52, 48, 97, 48, 56, 97, 57, 50, 53, 97, 102, 98, 98, 57, 51, 99, 98, 51, 97, 53, 99, 99, 101, 98, 102, 101, 102, 48, 99, 99, 48, 51, 49, 55, 56, 49, 98, 99, 102, 98, 97, 56, 100, 56, 101, 102, 99, 57, 52, 51, 51, 56, 57, 50, 52, 50, 100, 56, 102, 98, 102, 48, 129, 120, 68, 48, 48, 50, 48, 55, 50, 52, 48, 97, 48, 56, 97, 57, 50, 53, 97, 102, 98, 98, 57, 51, 99, 98, 51, 97, 53, 99, 99, 101, 98, 102, 101, 102, 48, 99, 99, 48, 51, 49, 55, 56, 49, 98, 99, 102, 98, 97, 56, 100, 56, 101, 102, 99, 57, 52, 51, 51, 56, 57, 50, 52, 50, 100, 56, 102, 98, 102, 48, 130, 120, 68, 48, 48, 50, 48, 55, 98, 49, 102, 54, 55, 53, 97, 48, 99, 53, 99, 56, 49, 48, 101, 49, 57, 56, 51, 55, 51, 52, 97, 55, 101, 50, 55, 51, 53, 97, 101, 57, 102, 99, 57, 101, 57, 57, 48, 50, 56, 57, 55, 99, 54, 97, 53, 49, 56, 101, 54, 49, 53, 51, 51, 98, 102, 97, 50, 97, 49, 57, 57, 129, 120, 68, 48, 48, 50, 48, 55, 98, 49, 102, 54, 55, 53, 97, 48, 99, 53, 99, 56, 49, 48, 101, 49, 57, 56, 51, 55, 51, 52, 97, 55, 101, 50, 55, 51, 53, 97, 101, 57, 102, 99, 57, 101, 57, 57, 48, 50, 56, 57, 55, 99, 54, 97, 53, 49, 56, 101, 54, 49, 53, 51, 51, 98, 102, 97, 50, 97, 49, 57, 57, 130, 120, 68, 48, 48, 50, 48, 97, 50, 50, 50, 99, 100, 56, 50, 56, 100, 99, 48, 97, 50, 51, 56, 53, 52, 55, 57, 52, 100, 97, 51, 53, 49, 50, 56, 97, 51, 101, 53, 99, 102, 55, 101, 100, 53, 98, 99, 50, 51, 97, 50, 51, 57, 49, 100, 97, 49, 97, 55, 98, 51, 97, 56, 53, 55, 102, 56, 55, 100, 56, 55, 129, 120, 68, 48, 48, 50, 48, 97, 50, 50, 50, 99, 100, 56, 50, 56, 100, 99, 48, 97, 50, 51, 56, 53, 52, 55, 57, 52, 100, 97, 51, 53, 49, 50, 56, 97, 51, 101, 53, 99, 102, 55, 101, 100, 53, 98, 99, 50, 51, 97, 50, 51, 57, 49, 100, 97, 49, 97, 55, 98, 51, 97, 56, 53, 55, 102, 56, 55, 100, 56, 55, 130, 120, 68, 48, 48, 50, 48, 98, 101, 102, 101, 56, 99, 101, 54, 97, 97, 55, 49, 48, 50, 50, 51, 102, 52, 101, 55, 49, 52, 99, 48, 97, 52, 54, 101, 57, 49, 53, 57, 99, 57, 53, 101, 53, 102, 56, 56, 49, 99, 99, 52, 55, 48, 98, 54, 56, 51, 55, 101, 50, 99, 49, 54, 56, 102, 55, 98, 50, 99, 48, 102, 129, 120, 68, 48, 48, 50, 48, 98, 101, 102, 101, 56, 99, 101, 54, 97, 97, 55, 49, 48, 50, 50, 51, 102, 52, 101, 55, 49, 52, 99, 48, 97, 52, 54, 101, 57, 49, 53, 57, 99, 57, 53, 101, 53, 102, 56, 56, 49, 99, 99, 52, 55, 48, 98, 54, 56, 51, 55, 101, 50, 99, 49, 54, 56, 102, 55, 98, 50, 99, 48, 102, 130, 120, 68, 48, 48, 50, 48, 100, 57, 52, 100, 56, 100, 48, 48, 52, 52, 100, 52, 51, 54, 52, 99, 49, 99, 98, 55, 54, 50, 53, 98, 48, 55, 100, 100, 54, 100, 53, 55, 101, 52, 101, 52, 56, 54, 57, 48, 48, 56, 56, 97, 51, 50, 49, 54, 97, 55, 99, 56, 51, 54, 99, 100, 49, 98, 100, 97, 97, 56, 99, 52, 129, 120, 68, 48, 48, 50, 48, 100, 57, 52, 100, 56, 100, 48, 48, 52, 52, 100, 52, 51, 54, 52, 99, 49, 99, 98, 55, 54, 50, 53, 98, 48, 55, 100, 100, 54, 100, 53, 55, 101, 52, 101, 52, 56, 54, 57, 48, 48, 56, 56, 97, 51, 50, 49, 54, 97, 55, 99, 56, 51, 54, 99, 100, 49, 98, 100, 97, 97, 56, 99, 52, 130, 120, 68, 48, 48, 50, 48, 48, 98, 57, 52, 53, 56, 102, 55, 49, 57, 48, 56, 51, 50, 102, 55, 52, 98, 51, 55, 54, 52, 52, 101, 100, 100, 51, 98, 53, 52, 54, 50, 99, 99, 101, 50, 97, 52, 49, 50, 57, 97, 49, 97, 52, 53, 52, 49, 97, 102, 97, 57, 48, 55, 53, 48, 99, 51, 50, 51, 100, 48, 49, 54, 129, 120, 68, 48, 48, 50, 48, 48, 98, 57, 52, 53, 56, 102, 55, 49, 57, 48, 56, 51, 50, 102, 55, 52, 98, 51, 55, 54, 52, 52, 101, 100, 100, 51, 98, 53, 52, 54, 50, 99, 99, 101, 50, 97, 52, 49, 50, 57, 97, 49, 97, 52, 53, 52, 49, 97, 102, 97, 57, 48, 55, 53, 48, 99, 51, 50, 51, 100, 48, 49, 54, 130, 120, 68, 48, 48, 50, 48, 97, 101, 56, 102, 101, 56, 57, 97, 52, 56, 50, 100, 56, 97, 100, 51, 53, 57, 53, 50, 48, 55, 57, 51, 51, 100, 100, 56, 97, 52, 98, 50, 49, 51, 48, 102, 51, 102, 99, 56, 50, 98, 101, 55, 50, 53, 101, 98, 54, 99, 57, 56, 54, 102, 49, 100, 49, 57, 100, 102, 101, 53, 100, 100, 129, 120, 68, 48, 48, 50, 48, 48, 98, 100, 98, 48, 101, 55, 49, 102, 56, 101, 51, 100, 100, 100, 102, 99, 55, 50, 102, 52, 97, 101, 49, 53, 101, 55, 48, 51, 102, 101, 56, 48, 98, 48, 49, 50, 57, 100, 50, 56, 99, 99, 102, 99, 56, 101, 100, 56, 55, 97, 48, 100, 51, 55, 97, 98, 57, 52, 97, 55, 48, 102, 54, 130, 120, 68, 48, 48, 50, 48, 99, 100, 102, 54, 57, 56, 98, 99, 50, 49, 48, 98, 51, 53, 50, 97, 97, 48, 102, 56, 57, 56, 52, 50, 53, 49, 100, 53, 56, 100, 101, 50, 54, 57, 101, 55, 101, 56, 97, 49, 49, 57, 102, 55, 101, 55, 101, 97, 102, 53, 99, 50, 54, 53, 49, 49, 57, 52, 57, 54, 48, 98, 51, 99, 129, 120, 68, 48, 48, 50, 48, 99, 100, 102, 54, 57, 56, 98, 99, 50, 49, 48, 98, 51, 53, 50, 97, 97, 48, 102, 56, 57, 56, 52, 50, 53, 49, 100, 53, 56, 100, 101, 50, 54, 57, 101, 55, 101, 56, 97, 49, 49, 57, 102, 55, 101, 55, 101, 97, 102, 53, 99, 50, 54, 53, 49, 49, 57, 52, 57, 54, 48, 98, 51, 99, 130, 120, 68, 48, 48, 50, 48, 57, 100, 99, 56, 98, 99, 53, 102, 56, 48, 102, 102, 97, 50, 97, 54, 101, 98, 99, 56, 101, 54, 48, 48, 56, 99, 102, 57, 55, 50, 52, 100, 53, 48, 97, 52, 97, 54, 51, 57, 55, 55, 56, 56, 50, 52, 102, 99, 52, 100, 51, 55, 102, 53, 49, 98, 99, 50, 54, 54, 52, 54, 51, 48, 129, 120, 68, 48, 48, 50, 48, 54, 102, 48, 101, 57, 99, 50, 56, 49, 98, 99, 51, 55, 56, 100, 99, 99, 48, 57, 52, 102, 50, 50, 97, 54, 49, 98, 99, 100, 49, 48, 57, 101, 53, 49, 97, 99, 48, 52, 54, 49, 49, 48, 52, 53, 101, 101, 101, 53, 54, 49, 49, 100, 102, 55, 99, 48, 99, 55, 55, 51, 100, 100, 57]

logging from within decode on CborCodec

=== TIME SystemTime { tv_sec: 1688363573, tv_nsec: 862516630 } ===
=== DECODE BYTES ===
[131, 11, 0, 144, 130, 120, 68, 48, 48, 50, 48, 99, 97, 49, 100, 50, 98, 56, 53, 53, 54, 55, 52, 52, 51, 98, 50, 100, 98, 52, 50, 98, 98, 97, 50, 56, 54, 99, 48, 55, 102, 99, 54, 52, 98, 49, 97, 52, 54, 102, 50, 100, 51, 101, 54, 55, 98, 97, 56, 49, 57, 53, 53, 48, 98, 48, 57, 101, 49, 56, 101, 99, 99, 100, 48, 129, 120, 68, 48, 48, 50, 48, 99, 97, 49, 100, 50, 98, 56, 53, 53, 54, 55, 52, 52, 51, 98, 50, 100, 98, 52, 50, 98, 98, 97, 50, 56, 54, 99, 48, 55, 102, 99, 54, 52, 98, 49, 97, 52, 54, 102, 50, 100, 51, 101, 54, 55, 98, 97, 56, 49, 57, 53, 53, 48, 98, 48, 57, 101, 49, 56, 101, 99, 99, 100, 48, 130, 120, 68, 48, 48, 50, 48, 55, 99, 48, 100, 101, 99, 51, 51, 50, 50, 100, 55, 56, 101, 102, 99, 52, 49, 57, 52, 51, 50, 99, 52, 97, 50, 49, 53, 98, 51, 54, 51, 53, 99, 98, 49, 55, 98, 51, 99, 102, 50, 48, 54, 55, 52, 102, 102, 52, 55, 101, 99, 51, 97, 101, 100, 48, 102, 97, 51, 102, 50, 52, 101, 129, 120, 68, 48, 48, 50, 48, 55, 99, 48, 100, 101, 99, 51, 51, 50, 50, 100, 55, 56, 101, 102, 99, 52, 49, 57, 52, 51, 50, 99, 52, 97, 50, 49, 53, 98, 51, 54, 51, 53, 99, 98, 49, 55, 98, 51, 99, 102, 50, 48, 54, 55, 52, 102, 102, 52, 55, 101, 99, 51, 97, 101, 100, 48, 102, 97, 51, 102, 50, 52, 101, 130, 120, 68, 48, 48, 50, 48, 99, 51, 53, 54, 48, 102, 102, 99, 102, 97, 53, 48, 102, 49, 52, 97, 98, 48, 49, 55, 52, 48, 99, 100, 56, 102, 56, 51, 50, 101, 48, 102, 98, 51, 53, 48, 51, 53, 101, 101, 98, 56, 99, 100, 52, 97, 99, 97, 49, 50, 52, 98, 97, 99, 50, 100, 52, 50, 97, 52, 55, 97, 50, 97, 129, 120, 68, 48, 48, 50, 48, 99, 51, 53, 54, 48, 102, 102, 99, 102, 97, 53, 48, 102, 49, 52, 97, 98, 48, 49, 55, 52, 48, 99, 100, 56, 102, 56, 51, 50, 101, 48, 102, 98, 51, 53, 48, 51, 53, 101, 101, 98, 56, 99, 100, 52, 97, 99, 97, 49, 50, 52, 98, 97, 99, 50, 100, 52, 50, 97, 52, 55, 97, 50, 97, 130, 120, 68, 48, 48, 50, 48, 57, 57, 100, 100, 50, 99, 55, 97, 55, 55, 99, 101, 53, 57, 102, 100, 100, 98, 52, 56, 98, 99, 102, 100, 49, 56, 98, 97, 101, 102, 99, 55, 51, 56, 56, 56, 56, 52, 57, 52, 51, 54, 100, 52, 55, 49, 100, 52, 97, 98, 97, 52, 48, 97, 97, 56, 102, 48, 50, 55, 101, 49, 51, 97, 129, 120, 68, 48, 48, 50, 48, 57, 57, 100, 100, 50, 99, 55, 97, 55, 55, 99, 101, 53, 57, 102, 100, 100, 98, 52, 56, 98, 99, 102, 100, 49, 56, 98, 97, 101, 102, 99, 55, 51, 56, 56, 56, 56, 52, 57, 52, 51, 54, 100, 52, 55, 49, 100, 52, 97, 98, 97, 52, 48, 97, 97, 56, 102, 48, 50, 55, 101, 49, 51, 97, 130, 120, 68, 48, 48, 50, 48, 57, 102, 54, 98, 48, 57, 50, 55, 49, 101, 49, 97, 55, 49, 97, 101, 49, 49, 56, 100, 49, 100, 98, 50, 51, 50, 52, 55, 101, 51, 102, 57, 51, 54, 53, 97, 48, 54, 55, 100, 48, 53, 97, 55, 99, 54, 48, 48, 102, 54, 50, 57, 52, 101, 102, 101, 50, 56, 53, 51, 57, 49, 53, 97, 129, 120, 68, 48, 48, 50, 48, 57, 102, 54, 98, 48, 57, 50, 55, 49, 101, 49, 97, 55, 49, 97, 101, 49, 49, 56, 100, 49, 100, 98, 50, 51, 50, 52, 55, 101, 51, 102, 57, 51, 54, 53, 97, 48, 54, 55, 100, 48, 53, 97, 55, 99, 54, 48, 48, 102, 54, 50, 57, 52, 101, 102, 101, 50, 56, 53, 51, 57, 49, 53, 97, 130, 120, 68, 48, 48, 50, 48, 100, 48, 100, 55, 55, 98, 99, 57, 53, 51, 97, 102, 56, 100, 53, 53, 50, 54, 54, 101, 51, 101, 55, 57, 57, 102, 53, 48, 50, 56, 98, 98, 55, 57, 53, 97, 50, 51, 49, 48, 55, 53, 99, 49, 54, 49, 49, 51, 57, 52, 99, 97, 98, 101, 52, 55, 49, 99, 48, 102, 102, 98, 54, 48, 129, 120, 68, 48, 48, 50, 48, 100, 48, 100, 55, 55, 98, 99, 57, 53, 51, 97, 102, 56, 100, 53, 53, 50, 54, 54, 101, 51, 101, 55, 57, 57, 102, 53, 48, 50, 56, 98, 98, 55, 57, 53, 97, 50, 51, 49, 48, 55, 53, 99, 49, 54, 49, 49, 51, 57, 52, 99, 97, 98, 101, 52, 55, 49, 99, 48, 102, 102, 98, 54, 48, 130, 120, 68, 48, 48, 50, 48, 55, 48, 102, 48, 98, 52, 100, 102, 51, 48, 101, 55, 48, 49, 49, 55, 102, 50, 101, 51, 51, 99, 51, 50, 97, 100, 51, 102, 56, 97, 53, 100, 97, 100, 48, 49, 102, 54, 54, 49, 57, 99, 57, 99, 48, 97, 56, 50, 50, 100, 100, 98, 56, 98, 53, 57, 101, 101, 99, 99, 50, 99, 49, 98, 129, 120, 68, 48, 48, 50, 48, 55, 48, 102, 48, 98, 52, 100, 102, 51, 48, 101, 55, 48, 49, 49, 55, 102, 50, 101, 51, 51, 99, 51, 50, 97, 100, 51, 102, 56, 97, 53, 100, 97, 100, 48, 49, 102, 54, 54, 49, 57, 99, 57, 99, 48, 97, 56, 50, 50, 100, 100, 98, 56, 98, 53, 57, 101, 101, 99, 99, 50, 99, 49, 98, 130, 120, 68, 48, 48, 50, 48, 55, 50, 52, 48, 97, 48, 56, 97, 57, 50, 53, 97, 102, 98, 98, 57, 51, 99, 98, 51, 97, 53, 99, 99, 101, 98, 102, 101, 102, 48, 99, 99, 48, 51, 49, 55, 56, 49, 98, 99, 102, 98, 97, 56, 100, 56, 101, 102, 99, 57, 52, 51, 51, 56, 57, 50, 52, 50, 100, 56, 102, 98, 102, 48, 129, 120, 68, 48, 48, 50, 48, 55, 50, 52, 48, 97, 48, 56, 97, 57, 50, 53, 97, 102, 98, 98, 57, 51, 99, 98, 51, 97, 53, 99, 99, 101, 98, 102, 101, 102, 48, 99, 99, 48, 51, 49, 55, 56, 49, 98, 99, 102, 98, 97, 56, 100, 56, 101, 102, 99, 57, 52, 51, 51, 56, 57, 50, 52, 50, 100, 56, 102, 98, 102, 48, 130, 120, 68, 48, 48, 50, 48, 55, 98, 49, 102, 54, 55, 53, 97, 48, 99, 53, 99, 56, 49, 48, 101, 49, 57, 56, 51, 55, 51, 52]
=== DECODE EOF ERR ===
ErrorImpl { code: EofWhileParsingValue, offset: 1170 }
=== TIME SystemTime { tv_sec: 1688363573, tv_nsec: 862905834 } ===
=== DECODE BYTES ===
[48, 48, 50, 48, 55, 98, 49, 102, 54, 55, 53, 97, 48, 99, 53, 99, 56, 49, 48, 101, 49, 57, 56, 51, 55, 51, 52]
=== DECODE ERR ===
ErrorImpl { code: Message("invalid type: integer `-17`, expected p2panda replication message"), offset: 0 }

@sandreae
Copy link
Member Author

sandreae commented Jul 3, 2023

Easier to read version:

logging from within encode on CborCodec

=== TIME SystemTime { tv_sec: 1688365471, tv_nsec: 119830695 } ===
=== ENCODE DATA ===
SyncMessage(0, HaveDocuments([(DocumentId(OperationId(Hash("0020ca1d2b85567443b2db42bba286c07fc64b1a46f2d3e67ba819550b09e18eccd0"))), DocumentViewId([OperationId(Hash("0020ca1d2b85567443b2db42bba286c07fc64b1a46f2d3e67ba819550b09e18eccd0"))])), (DocumentId(OperationId(Hash("00207c0dec3322d78efc419432c4a215b3635cb17b3cf20674ff47ec3aed0fa3f24e"))), DocumentViewId([OperationId(Hash("00207c0dec3322d78efc419432c4a215b3635cb17b3cf20674ff47ec3aed0fa3f24e"))])), (DocumentId(OperationId(Hash("0020c3560ffcfa50f14ab01740cd8f832e0fb35035eeb8cd4aca124bac2d42a47a2a"))), DocumentViewId([OperationId(Hash("0020c3560ffcfa50f14ab01740cd8f832e0fb35035eeb8cd4aca124bac2d42a47a2a"))])), (DocumentId(OperationId(Hash("002099dd2c7a77ce59fddb48bcfd18baefc73888849436d471d4aba40aa8f027e13a"))), DocumentViewId([OperationId(Hash("002099dd2c7a77ce59fddb48bcfd18baefc73888849436d471d4aba40aa8f027e13a"))])), (DocumentId(OperationId(Hash("00209f6b09271e1a71ae118d1db23247e3f9365a067d05a7c600f6294efe2853915a"))), DocumentViewId([OperationId(Hash("00209f6b09271e1a71ae118d1db23247e3f9365a067d05a7c600f6294efe2853915a"))])), (DocumentId(OperationId(Hash("0020d0d77bc953af8d55266e3e799f5028bb795a231075c1611394cabe471c0ffb60"))), DocumentViewId([OperationId(Hash("0020d0d77bc953af8d55266e3e799f5028bb795a231075c1611394cabe471c0ffb60"))])), (DocumentId(OperationId(Hash("002070f0b4df30e70117f2e33c32ad3f8a5dad01f6619c9c0a822ddb8b59eecc2c1b"))), DocumentViewId([OperationId(Hash("002070f0b4df30e70117f2e33c32ad3f8a5dad01f6619c9c0a822ddb8b59eecc2c1b"))])), (DocumentId(OperationId(Hash("00207240a08a925afbb93cb3a5ccebfef0cc031781bcfba8d8efc943389242d8fbf0"))), DocumentViewId([OperationId(Hash("00207240a08a925afbb93cb3a5ccebfef0cc031781bcfba8d8efc943389242d8fbf0"))])), (DocumentId(OperationId(Hash("00207b1f675a0c5c810e1983734a7e2735ae9fc9e9902897c6a518e61533bfa2a199"))), DocumentViewId([OperationId(Hash("00207b1f675a0c5c810e1983734a7e2735ae9fc9e9902897c6a518e61533bfa2a199"))])), (DocumentId(OperationId(Hash("0020a222cd828dc0a23854794da35128a3e5cf7ed5bc23a2391da1a7b3a857f87d87"))), DocumentViewId([OperationId(Hash("0020a222cd828dc0a23854794da35128a3e5cf7ed5bc23a2391da1a7b3a857f87d87"))])), (DocumentId(OperationId(Hash("0020befe8ce6aa710223f4e714c0a46e9159c95e5f881cc470b6837e2c168f7b2c0f"))), DocumentViewId([OperationId(Hash("0020befe8ce6aa710223f4e714c0a46e9159c95e5f881cc470b6837e2c168f7b2c0f"))])), (DocumentId(OperationId(Hash("0020d94d8d0044d4364c1cb7625b07dd6d57e4e48690088a3216a7c836cd1bdaa8c4"))), DocumentViewId([OperationId(Hash("0020d94d8d0044d4364c1cb7625b07dd6d57e4e48690088a3216a7c836cd1bdaa8c4"))])), (DocumentId(OperationId(Hash("00200b9458f7190832f74b37644edd3b5462cce2a4129a1a4541afa90750c323d016"))), DocumentViewId([OperationId(Hash("00200b9458f7190832f74b37644edd3b5462cce2a4129a1a4541afa90750c323d016"))]))]))
=== BUFFER ===
b"\x83\x0b\0\x8d\x82xD0020ca1d2b85567443b2db42bba286c07fc64b1a46f2d3e67ba819550b09e18eccd0\x81xD0020ca1d2b85567443b2db42bba286c07fc64b1a46f2d3e67ba819550b09e18eccd0\x82xD00207c0dec3322d78efc419432c4a215b3635cb17b3cf20674ff47ec3aed0fa3f24e\x81xD00207c0dec3322d78efc419432c4a215b3635cb17b3cf20674ff47ec3aed0fa3f24e\x82xD0020c3560ffcfa50f14ab01740cd8f832e0fb35035eeb8cd4aca124bac2d42a47a2a\x81xD0020c3560ffcfa50f14ab01740cd8f832e0fb35035eeb8cd4aca124bac2d42a47a2a\x82xD002099dd2c7a77ce59fddb48bcfd18baefc73888849436d471d4aba40aa8f027e13a\x81xD002099dd2c7a77ce59fddb48bcfd18baefc73888849436d471d4aba40aa8f027e13a\x82xD00209f6b09271e1a71ae118d1db23247e3f9365a067d05a7c600f6294efe2853915a\x81xD00209f6b09271e1a71ae118d1db23247e3f9365a067d05a7c600f6294efe2853915a\x82xD0020d0d77bc953af8d55266e3e799f5028bb795a231075c1611394cabe471c0ffb60\x81xD0020d0d77bc953af8d55266e3e799f5028bb795a231075c1611394cabe471c0ffb60\x82xD002070f0b4df30e70117f2e33c32ad3f8a5dad01f6619c9c0a822ddb8b59eecc2c1b\x81xD002070f0b4df30e70117f2e33c32ad3f8a5dad01f6619c9c0a822ddb8b59eecc2c1b\x82xD00207240a08a925afbb93cb3a5ccebfef0cc031781bcfba8d8efc943389242d8fbf0\x81xD00207240a08a925afbb93cb3a5ccebfef0cc031781bcfba8d8efc943389242d8fbf0\x82xD00207b1f675a0c5c810e1983734a7e2735ae9fc9e9902897c6a518e61533bfa2a199\x81xD00207b1f675a0c5c810e1983734a7e2735ae9fc9e9902897c6a518e61533bfa2a199\x82xD0020a222cd828dc0a23854794da35128a3e5cf7ed5bc23a2391da1a7b3a857f87d87\x81xD0020a222cd828dc0a23854794da35128a3e5cf7ed5bc23a2391da1a7b3a857f87d87\x82xD0020befe8ce6aa710223f4e714c0a46e9159c95e5f881cc470b6837e2c168f7b2c0f\x81xD0020befe8ce6aa710223f4e714c0a46e9159c95e5f881cc470b6837e2c168f7b2c0f\x82xD0020d94d8d0044d4364c1cb7625b07dd6d57e4e48690088a3216a7c836cd1bdaa8c4\x81xD0020d94d8d0044d4364c1cb7625b07dd6d57e4e48690088a3216a7c836cd1bdaa8c4\x82xD00200b9458f7190832f74b37644edd3b5462cce2a4129a1a4541afa90750c323d016\x81xD00200b9458f7190832f74b37644edd3b5462cce2a4129a1a4541afa90750c323d016"

logging from within decode on CborCodec

=== TIME SystemTime { tv_sec: 1688365471, tv_nsec: 120452065 } ===
=== DECODE BYTES ===
b"\x83\x0b\0\x8d\x82xD0020ca1d2b85567443b2db42bba286c07fc64b1a46f2d3e67ba819550b09e18eccd0\x81xD0020ca1d2b85567443b2db42bba286c07fc64b1a46f2d3e67ba819550b09e18eccd0\x82xD00207c0dec3322d78efc419432c4a215b3635cb17b3cf20674ff47ec3aed0fa3f24e\x81xD00207c0dec3322d78efc419432c4a215b3635cb17b3cf20674ff47ec3aed0fa3f24e\x82xD0020c3560ffcfa50f14ab01740cd8f832e0fb35035eeb8cd4aca124bac2d42a47a2a\x81xD0020c3560ffcfa50f14ab01740cd8f832e0fb35035eeb8cd4aca124bac2d42a47a2a\x82xD002099dd2c7a77ce59fddb48bcfd18baefc73888849436d471d4aba40aa8f027e13a\x81xD002099dd2c7a77ce59fddb48bcfd18baefc73888849436d471d4aba40aa8f027e13a\x82xD00209f6b09271e1a71ae118d1db23247e3f9365a067d05a7c600f6294efe2853915a\x81xD00209f6b09271e1a71ae118d1db23247e3f9365a067d05a7c600f6294efe2853915a\x82xD0020d0d77bc953af8d55266e3e799f5028bb795a231075c1611394cabe471c0ffb60\x81xD0020d0d77bc953af8d55266e3e799f5028bb795a231075c1611394cabe471c0ffb60\x82xD002070f0b4df30e70117f2e33c32ad3f8a5dad01f6619c9c0a822ddb8b59eecc2c1b\x81xD002070f0b4df30e70117f2e33c32ad3f8a5dad01f6619c9c0a822ddb8b59eecc2c1b\x82xD00207240a08a925afbb93cb3a5ccebfef0cc031781bcfba8d8efc943389242d8fbf0\x81xD00207240a08a925afbb93cb3a5ccebfef0cc031781bcfba8d8efc943389242d8fbf0\x82xD00207b1f675a0c5c810e1983734"
=== DECODE EOF ERR ===
ErrorImpl { code: EofWhileParsingValue, offset: 1170 }
=== TIME SystemTime { tv_sec: 1688365471, tv_nsec: 120844452 } ===
=== DECODE BYTES ===
b"00207b1f675a0c5c810e1983734"
=== DECODE ERR ===
ErrorImpl { code: Message("invalid type: integer `-17`, expected p2panda replication message"), offset: 0 }

@sandreae
Copy link
Member Author

sandreae commented Jul 3, 2023

Breaking down what happened to the original message encoded on Peer B:

These bytes were sent in one message, it's an incomplete HaveDocuments message.....:

\x83\x0b\0\x8d\x82xD0020ca1d2b85567443b2db42bba286c07fc64b1a46f2d3e67ba819550b09e18eccd0\x81xD0020ca1d2b85567443b2db42bba286c07fc64b1a46f2d3e67ba819550b09e18eccd0\x82xD00207c0dec3322d78efc419432c4a215b3635cb17b3cf20674ff47ec3aed0fa3f24e\x81xD00207c0dec3322d78efc419432c4a215b3635cb17b3cf20674ff47ec3aed0fa3f24e\x82xD0020c3560ffcfa50f14ab01740cd8f832e0fb35035eeb8cd4aca124bac2d42a47a2a\x81xD0020c3560ffcfa50f14ab01740cd8f832e0fb35035eeb8cd4aca124bac2d42a47a2a\x82xD002099dd2c7a77ce59fddb48bcfd18baefc73888849436d471d4aba40aa8f027e13a\x81xD002099dd2c7a77ce59fddb48bcfd18baefc73888849436d471d4aba40aa8f027e13a\x82xD00209f6b09271e1a71ae118d1db23247e3f9365a067d05a7c600f6294efe2853915a\x81xD00209f6b09271e1a71ae118d1db23247e3f9365a067d05a7c600f6294efe2853915a\x82xD0020d0d77bc953af8d55266e3e799f5028bb795a231075c1611394cabe471c0ffb60\x81xD0020d0d77bc953af8d55266e3e799f5028bb795a231075c1611394cabe471c0ffb60\x82xD002070f0b4df30e70117f2e33c32ad3f8a5dad01f6619c9c0a822ddb8b59eecc2c1b\x81xD002070f0b4df30e70117f2e33c32ad3f8a5dad01f6619c9c0a822ddb8b59eecc2c1b\x82xD00207240a08a925afbb93cb3a5ccebfef0cc031781bcfba8d8efc943389242d8fbf0\x81xD00207240a08a925afbb93cb3a5ccebfef0cc031781bcfba8d8efc943389242d8fbf0\x82xD00207b1f675a0c5c810e1983734

Then these were sent again (last few bytes from above message), it's an incomplete hash...:

\x82xD00207b1f675a0c5c810e1983734

Then these remaining bytes were never sent:

a7e2735ae9fc9e9902897c6a518e61533bfa2a199\x81xD00207b1f675a0c5c810e1983734a7e2735ae9fc9e9902897c6a518e61533bfa2a199\x82xD0020a222cd828dc0a23854794da35128a3e5cf7ed5bc23a2391da1a7b3a857f87d87\x81xD0020a222cd828dc0a23854794da35128a3e5cf7ed5bc23a2391da1a7b3a857f87d87\x82xD0020befe8ce6aa710223f4e714c0a46e9159c95e5f881cc470b6837e2c168f7b2c0f\x81xD0020befe8ce6aa710223f4e714c0a46e9159c95e5f881cc470b6837e2c168f7b2c0f\x82xD0020d94d8d0044d4364c1cb7625b07dd6d57e4e48690088a3216a7c836cd1bdaa8c4\x81xD0020d94d8d0044d4364c1cb7625b07dd6d57e4e48690088a3216a7c836cd1bdaa8c4\x82xD00200b9458f7190832f74b37644edd3b5462cce2a4129a1a4541afa90750c323d016\x81xD00200b9458f7190832f74b37644edd3b5462cce2a4129a1a4541afa90750c323d016

@sandreae
Copy link
Member Author

sandreae commented Jul 3, 2023

In decode of CborCodec from asynchronous_codec crate. If I add a return in the eof error case (as seen below) then the above behaviour doesn't occur and replication seems proceeds happily.... Not sure if this is a fix or just hiding the problem though....

/// Decoder impl parses cbor objects from bytes
impl<Enc, Dec> Decoder for CborCodec<Enc, Dec>
where
    for<'de> Dec: Deserialize<'de> + std::fmt::Debug + 'static,
    for<'de> Enc: Serialize + std::fmt::Debug + 'static,
{
    type Item = Dec;
    type Error = CborCodecError;

    fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<Self::Item>, Self::Error> {
        println!("=== TIME {:?} ===", std::time::SystemTime::now());
        println!("=== DECODE BYTES ===");
        println!("{:?}", buf);

        // Build deserializer
        let mut de = serde_cbor::Deserializer::from_slice(&buf);

        // Attempt deserialization
        let res: Result<Dec, _> = serde::de::Deserialize::deserialize(&mut de);

        // If we ran out before parsing, return none and try again later
        let res = match res {
            Ok(v) => {
                println!("=== DECODE OK ===");
                println!("{:?}", v);
                Ok(Some(v))
            }
            Err(e) if e.is_eof() => {
                println!("=== DECODE EOF ERR ===");
                println!("{:?}", e);
                return Ok(None) // Added return here            
            }
            Err(e) => {
                println!("=== DECODE ERR ===");
                println!("{:?}", e);
                Err(e.into())
            }
        };

        // Update offset from iterator
        let offset = de.byte_offset();

        // Advance buffer
        buf.advance(offset);

        res
    }
}

@sandreae
Copy link
Member Author

sandreae commented Jul 3, 2023

Sometimes this occurs (still in the eof error block) which seems to be a completely different thing and doesn't actually trigger any unexpected behaviour in p2panda land:

=== TIME SystemTime { tv_sec: 1688372285, tv_nsec: 265683705 } ===
=== DECODE BYTES ===
b"\x84\x08\x01\x98\x88\0\x18/\x18\x8e\x18P\x18\xc2\x18\xed\x18\xe6\x18\xd9\x186\x18\xec\x18\xc3\x14\x18A\x18\x87\x18\xff\x18\x1c\x18'\x188\x08\x18\x18\x18\\\x18\xfb\x18\xc5\x18\xff\x18=\x187\x18H\x18\xd1\x18\xff\x18s\x18S\x18\xfc\x18\x96\x0f\x01\x18\xf9\x01\x18\x1a\0\x18 \x0e\x18\xe0\x18\xba\x18\xb9\x18\xd1\x18\x94\x18(\x18\xc4\x18]\x18]\x18S\x18d\x18%\x18_\x18-\x18t\x18\x8f\x18\x96\x18\xa2\x18J\x12\x18\xb2\x18\xc7\x18\x1d\x18\xd1\x18\x1c\x18e\x18f\r\x0c\x18u\x18/\x18p\x15\x18\xfe\n\x189\x18{\x18A\x18\xf7\x18\x87\x18o\x18\xe0\x181\x18\xa7\x18\x18\x18j\x18x\x02\x18\xd4\x18\xbb\x18\xbb\x18\x8f\x18[\x18>\x18\xe6\x18\xe8\x18f\x18\xd1\x18=\x18\xc4\x18\xa8\x188\x18E\x18\xa5\x189\x18\x91\x18Y\x18\x8c\x18\xd3\x18U\x18-\x18/\x18p\x18\xa0\x18\xa6\x18w\x18C\x18\xf9\x18$\x18\xe6\x18\xaa\x18\xf6\x18\xd0\x18W\x18\xba\x18\xe0\x18\xab\x18\xdd\x0f\x18(\x18b\x18\xc7\x18\xc8\x17\x06\x99\x01\x1a\x18\x84\x01\0\x18x\x18I\x18b\x18a\x18n\x18d\x18_\x180\x180\x182\x180\x187\x18c\x180\x18d\x18e\x18c\x183\x183\x182\x182\x18d\x187\x188\x18e\x18f\x18c\x184\x181\x189\x184\x183\x182\x18c\x184\x18a\x182\x181\x185\x18b\x183\x186\x183\x185\x18c\x18b\x181\x187\x18b\x183\x18c\x18f\x182\x180\x186\x187\x184\x18f\x18f\x184\x187\x18e\x18c\x183\x18a\x18e\x18d\x180\x18f\x18a\x183\x18f\x182\x184\x18e\x18\xa2\x18g\x18m"
=== DECODE EOF ERR ===
ErrorImpl { code: EofWhileParsingValue, offset: 423 }

@adzialocha
Copy link
Member

I can reproduce the error now when running the node from the implement-document-replication-strategy branch!

You've mentioned that one can set the max. byte length @sandreae? I've tried to find it but couldn't see anything. BytesMut is apparently growing as much there's memory (with some default size in the beginning to not re-allocate every time it grows).

@sandreae
Copy link
Member Author

sandreae commented Jul 3, 2023

Woah, good you could reproduce the issue!

I found this as well in Framed and FramedWriter for setting the "high_water_mark" which looked slightly interesting.

https://github.com/mxinden/asynchronous-codec/blob/43338f656f7a50a3c77b8e8ebd58bd9a1416cbd2/src/framed_write.rs#L99

@sandreae
Copy link
Member Author

sandreae commented Jul 4, 2023

mxinden/asynchronous-codec#6

@sandreae sandreae linked a pull request Jul 7, 2023 that will close this issue
4 tasks
@adzialocha
Copy link
Member

This fix got now released in 0.6.2 💖

@sandreae
Copy link
Member Author

Now we use 0.6.2 👍 10ec033

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants