Skip to content

Validator Interface requirements

Junha Yang(양준하) edited this page Jul 20, 2020 · 1 revision

Goal

Design a simple and customizable interface of Application (Coordinator) for Host.

Requirement

Role of Host and Application

Host

Host is responsible for ensuring that every blockchain machine has the same state. To do this, the host runs the Tendermint consensus engine. Thus, the host has to support the Tendermint engine functionalities. Also, the host is responsible for gossiping messages through the network. It is responsible for gossiping application-level transactions as well as consensus-related messages.

  • engine-related requirement
    • Signing on blocks
    • Verifying block headers
      • Some parts of the header verification can be done on the application-side
    • Creating blocks
      • This is not necessary because applications can create blocks as well. If we want to maintain MemPool in the host, however, the host should be responsible for creating blocks.
  • Gossiping transactions through the network
    • Consensus messages
    • Application-level transactions
  • Providing some blockchain-level information to the application
    • Height
    • Time
    • Validator set & state root on a certain height (ICS requires)
  • BlockSync
  • Light client
  • The host MUST be agnostic to application-level concepts
    • Account
      • Transaction signatures
      • Transaction sequence numbers
    • Stake
    • Governance
    • Etc
  • MemPool requirements
    • The application should be able to order transactions in the MemPool
    • If there are sequentially dependent transactions, they should be able to be inserted into a single block

Application

Application developers can build a state machine on top of the host. They can do whatever they want, but they have to provide some interface to the host.

  • Executing/Verifying transactions
  • Computing block hashes based on application state
    • If the host is responsible for creating blocks, the application must provide block hashes to the host since the host cannot compute them by itself.
  • Penalizing validators based on reported consensus-level evidence
    • Since the consensus engine itself cannot penalize validators, it is mandatory.
  • Rewarding block authors

Discussion

MemPool

should be in the host side

Block Creation

should be in the host side

Header Verification

should be in the host side