You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a peer-to-peer network project using Raft for consensus and libp2p for peer-to-peer communication. I encountered an issue where the RequestVote RPC in Raft is failing with a Msgpack decode error. Here are the error logs:
2024-06-12T23:16:22.856Z [ERROR] raft: failed to make requestVote RPC: target="{Voter QmWaqhWAmGpg4GRTJTQYxrfHHTnz2h2C144VsiRpcxp67K 127.0.0.1:8080}" error="msgpack decode error [pos 1]: invalid byte descriptor for decoding bytes, got: 0x13" term=17
...
Here are some verbose logs (includes output from bits of code I deem not related to this issue, but I don't see a point in pruning their output):
I think it could be: msgpack package error, differing protocols between lib-p2p and Raft, TCP vs. HTTP encoding issues, some invalid character passed, or something perhaps completely different.
Question:
What could be causing the msgpack decode error [pos 1]: invalid byte descriptor for decoding bytes, got: 0x13? How can I fix this issue?
Any help or pointers would be greatly appreciated! Let me know if more context is needed. I've spent almost an entire day trying to debug this.
The text was updated successfully, but these errors were encountered:
Persistent bug seemingly with
msgpack
Stackoverflow version of post (with bounty).
I'm working on a peer-to-peer network project using Raft for consensus and libp2p for peer-to-peer communication. I encountered an issue where the RequestVote RPC in Raft is failing with a Msgpack decode error. Here are the error logs:
Here are some verbose logs (includes output from bits of code I deem not related to this issue, but I don't see a point in pruning their output):
The relevant parts of my code where I handle the FSM (Finite State Machine) and Msgpack encoding/decoding are as follows:
Additionally, here is the part of my code where I initialize and start Raft:
Attempted Solutions:
MsgpackUseNewTimeFormat: true
. I saw a similar post that said to do this. It didn't work.Environment:
Go version: 1.21
Libraries:
Steps to Reproduce:
Suspected Reasons for Issue:
I think it could be:
msgpack
package error, differing protocols between lib-p2p and Raft, TCP vs. HTTP encoding issues, some invalid character passed, or something perhaps completely different.Question:
What could be causing the
msgpack decode error [pos 1]: invalid byte descriptor for decoding bytes, got: 0x13
? How can I fix this issue?Any help or pointers would be greatly appreciated! Let me know if more context is needed. I've spent almost an entire day trying to debug this.
The text was updated successfully, but these errors were encountered: