ZChains Whitepaper
  • Overview
  • Tokenomics
    • Glossary
    • Tokenomics
  • Get started
    • Installation
    • Local Setup
    • Cloud Setup
    • CLI Command
  • Additional Features
    • Explorer
    • Network stress testing
  • Architecture
    • Architecture Overview
    • Modules
      • Blockchain
      • Consensus
      • JSON RPC
      • Minimal
      • Networking
      • Other modules
      • Protocol
      • Sealer
      • State
      • Storage
      • TxPool
      • Types
  • Community
    • Propose a new feature
    • Report an issue
  • Concepts
    • State in Ethereum
  • Configuration
    • Manage private keys
    • Server configuration file
    • Secret Managers
      • Set up AWS SSM (Systems Manager)
      • Set up GCP Secrets Manager
      • Set up Hashicorp Vault
  • Consensus
    • Proof of Stake
    • Set up and use Proof of Stake (PoS)
  • Working with node
    • Backup/restore node instance
    • Query JSON RPC endpoints
    • Query operator information
  • Development Roadmap
Powered by GitBook
On this page
  • Overview
  • GRPC for Other Nodes
Export as PDF
  1. Architecture
  2. Modules

Protocol

Overview

The Protocol module contains the logic for the synchronization protocol.

The Zchains 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 10 months ago