| Crates.io | near-network-primitives |
| lib.rs | near-network-primitives |
| version | 0.15.0 |
| created_at | 2021-10-04 06:44:01.90885+00 |
| updated_at | 2022-09-23 14:21:48.450796+00 |
| description | This crate hosts NEAR network-related primitive types |
| homepage | |
| repository | https://github.com/near/nearcore |
| max_upload_size | |
| id | 459987 |
| size | 72,230 |
TODO - already in another PR
network_protocol.rs - contains types, which are part of network protocol, they should be changed with care.
All of them derive BorshSerialize / BorshDeserializetypes.rs - TODOconfig.rs - TODOactix.rs - TODOnear-network-primitivesnear-network-primitives is a package that contains network types that are meant to be shared
between multiple crates, without having to import near-network.
Note that, the current split doesn't follow that logic.
We have a few use cases:
ClientActor, ViewClientActor, near-network.near-network, importing just network types should be enough for themDependencies:
deepsize - optional - provides api for counting sizes of structsactix - required - provides implementation actix Message - we could make it optionalborsh - required - serialization / deserialization of network messages - could be made optionalnear-networknear-network exports the following to the outside:
PeerManagerActorPeerManagerActor related Actix messagesborsh serialized network messages exchanged between nodes.Actors below, their related messages, are considered private:
PeerActor
RoutingTableActor
EdgeValidatorActor
near-network-primitivesnear-network-primitives provides
ClientActor related Actix messagesViewClientActor related Actix messagesborsh serialized network messages exchanged between nodes.NetworkConfig - its logic is split between utils.rs and types.rs.