-
Notifications
You must be signed in to change notification settings - Fork 632
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
Add borsh support for PeerMessage::DistanceVector #9348
Conversation
As a sidenote, there is a different PeerMessage variant called Tier1Handshake which does not have borsh support implemented: nearcore/chain/network/src/network_protocol/borsh_conv.rs Lines 168 to 170 in 6cdee7c
It does not pose the same issue because Tier1Handshake is only sent over TIER1 connections, and there is some special handling which forces TIER1 connections to use protobuf encoding (and not borsh): nearcore/chain/network/src/peer/peer_actor.rs Lines 280 to 281 in 6cdee7c
|
In near#9187 we introduced the first new PeerMessage variant in a long time, called DistanceVector. I got a little over-zealous about our plans to deprecate borsh and [skipped implementing borsh support for the new message variant](https://github.com/saketh-are/nearcore/blob/2093819d414bd38c73574c681715e3a544daa945/chain/network/src/network_protocol/borsh_conv.rs#L180-L182). However, it turns out we have some test infrastructure still reliant on borsh-encoded connections: https://github.com/near/nearcore/blob/6cdee7cc123bdeb00f0d9029b10f8c1448eab54f/pytest/lib/proxy.py#L89-L90 In particular, the nayduck test `pytest/tests/sanity/sync_chunks_from_archival.py` makes use of the proxy tool and [is failing]( https://nayduck.near.org/#/test/497500) after near#9187. This PR implements borsh support for DistanceVector as an immediate fix for the failing test. In the long run we aim to deprecate borsh entirely, at which time this code (and a bunch of other code much like it) will be removed.
In #9187 we introduced the first new PeerMessage variant in a long time, called DistanceVector. I got a little over-zealous about our plans to deprecate borsh and [skipped implementing borsh support for the new message variant](https://github.com/saketh-are/nearcore/blob/2093819d414bd38c73574c681715e3a544daa945/chain/network/src/network_protocol/borsh_conv.rs#L180-L182). However, it turns out we have some test infrastructure still reliant on borsh-encoded connections: https://github.com/near/nearcore/blob/6cdee7cc123bdeb00f0d9029b10f8c1448eab54f/pytest/lib/proxy.py#L89-L90 In particular, the nayduck test `pytest/tests/sanity/sync_chunks_from_archival.py` makes use of the proxy tool and [is failing]( https://nayduck.near.org/#/test/497500) after #9187. This PR implements borsh support for DistanceVector as an immediate fix for the failing test. In the long run we aim to deprecate borsh entirely, at which time this code (and a bunch of other code much like it) will be removed.
In near#9187 we introduced the first new PeerMessage variant in a long time, called DistanceVector. I got a little over-zealous about our plans to deprecate borsh and [skipped implementing borsh support for the new message variant](https://github.com/saketh-are/nearcore/blob/2093819d414bd38c73574c681715e3a544daa945/chain/network/src/network_protocol/borsh_conv.rs#L180-L182). However, it turns out we have some test infrastructure still reliant on borsh-encoded connections: https://github.com/near/nearcore/blob/6cdee7cc123bdeb00f0d9029b10f8c1448eab54f/pytest/lib/proxy.py#L89-L90 In particular, the nayduck test `pytest/tests/sanity/sync_chunks_from_archival.py` makes use of the proxy tool and [is failing]( https://nayduck.near.org/#/test/497500) after near#9187. This PR implements borsh support for DistanceVector as an immediate fix for the failing test. In the long run we aim to deprecate borsh entirely, at which time this code (and a bunch of other code much like it) will be removed.
In #9187 we introduced the first new PeerMessage variant in a long time, called DistanceVector.
I got a little over-zealous about our plans to deprecate borsh and skipped implementing borsh support for the new message variant.
However, it turns out we have some test infrastructure still reliant on borsh-encoded connections:
nearcore/pytest/lib/proxy.py
Lines 89 to 90 in 6cdee7c
In particular, the nayduck test
pytest/tests/sanity/sync_chunks_from_archival.py
makes use of the proxy tool and is failing after #9187.This PR implements borsh support for DistanceVector as an immediate fix for the failing test.
In the long run we aim to deprecate borsh entirely, at which time this code (and a bunch of other code much like it) will be removed.