Files
evm/peer
5d1b0d8a14 Remove legacy gossip (#1435)
* Began #1428 by removing legacy gossip handler from network.go and its test file.

* Completed all recommended removals in #1428. Did not address any other changes in the original PR outside the scope of this issue

* Skip registration in Codec for removed EthTxsGossip type to ensure that numbering is consistent

* Fixed small RELEASES.md error incorrectly denoting version

* Apply suggestions from code review

Nit - typo, reduce git diffs

Co-authored-by: Quentin McGaw <[email protected]>
Signed-off-by: Austin Larson <[email protected]>

* Changed test codec version name for clarity

* Removed testCodecVersion due to later comparison with message.Version - use this for tests instead

---------

Signed-off-by: Austin Larson <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: Quentin McGaw <[email protected]>
2025-01-29 13:15:55 -05:00
..
2024-08-15 12:18:23 -07:00
2025-01-29 13:15:55 -05:00
2025-01-29 13:15:55 -05:00
2022-12-06 18:09:37 -07:00
2022-09-22 18:42:37 +09:00
2023-11-24 15:46:22 +00:00

Peer Package

The peer package handles networking for the VM.

Network

The Network interface implements the networking portion of the required VM interface. The VM utilizes the Network interface to:

  • Set an App Gossip handler for incoming VM gossip messages
  • Set an App Request handler for incoming VM request messages
  • Send App Requests to peers in the network and specify a response handler to be called upon receiving a response or failure notification
  • Send App Gossip messages to the network

Client

The client utilizes the Network interface to send requests to peers on the network and utilizes the waitingHandler to wait until a response or failure is received from the AvalancheGo networking layer.

This allows the user of Client to treat it as if it were returning results from the network synchronously.

result, err := client.Request(nodeID, request) // Blocks until receiving a response from the network
if err != nil {
    return err
}

foo(result) // do something with the result