AlveyChain Documents
  • Alveychain Docs
  • Get-Started
    • Alveychain
    • Installation
    • Local Setup
    • Cloud Setup
    • Full Node
    • CLI Commands
    • JSON RPC Commands
    • Performance Reports
  • Configuration
    • Manage private keys
    • Set up Hashicorp Vault
    • Enable Prometheus metrics
  • Working-With-Node
    • Query JSON RPC endpoints
    • Query operator information
    • Backup/restore node instance
  • Consensus
    • Proof of Authority (PoA)
    • Proof of Stake
    • Set up and use Proof of Stake (PoS)
    • Migration from PoA to PoS
  • Additional Features
    • Alveycoin bridge
    • Network stress testing
    • Blockscout
  • Architecture
    • Architecture Overview
    • modules
      • Blockchain
      • Consensus
      • JSON RPC
      • Minimal
      • Networking
      • Other modules
      • Protocol
      • Sealer
      • State
      • Storage
      • TxPool
      • Types
  • Concepts
    • State in Ethereum
  • Community
    • Propose a new feature
    • Report an issue
  • Docs
    • Server Config File
    • how-tos
      • How to set up and use Proof of Stake (PoS)
Powered by GitBook
On this page
  • Overview
  • GRPC for Other Nodes
  1. Architecture
  2. modules

Protocol

Overview

The Protocol module contains the logic for the synchronization protocol.

The alveychain uses libp2p as the networking layer, and on top of that runs gRPC.

GRPC for Other Nodes

service V1 {
    // Returns status information regarding the specific point in time
    rpc GetCurrent(google.protobuf.Empty) returns (V1Status);
    
    // Returns any type of object (Header, Body, Receipts...)
    rpc GetObjectsByHash(HashRequest) returns (Response);
    
    // Returns a range of headers
    rpc GetHeaders(GetHeadersRequest) returns (Response);
    
    // Watches what new blocks get included
    rpc Watch(google.protobuf.Empty) returns (stream V1Status);
}

Status Object

message V1Status {
    string difficulty = 1;
    string hash = 2;
    int64 number = 3;
}
PreviousOther modulesNextSealer

Last updated 2 years ago