Coder Social home page Coder Social logo

tendermintx's Introduction

Tendermint X

Implementation of zero-knowledge proof circuits for Tendermint.

Overview

Tendermint X's core contract is TendermintX, which stores the headers of Tendermint blocks. Users can query a TendermintX contract for the header of a specific block height, or for the latest header.

There are two entrypoints to a TendermintX contract, step and skip.

skip

skip is used to jump from the current header to a non-consecutive header.

For example, let's say block N has already been proven in the light client, and we want to prove block N+10. If validators from block N represent more than 1/3 of the voting power in block N+10, then we can skip from block N to block N+10, as long as 1) the validators from the trusted block have signed the new block, and 2) the new block is valid.

The methodology for doing so is described in the section 2.3 of A Tendermint Light Client.

step

step is used to sequentially verify the next header after the current header.

This is rarely used, as step will only be invoked when the validator set changes by more than 2/3 in a single block.

Deployment

The circuits are currently available on Succinct X here.

There are currently TendermintX light clients tracking the following networks on Goerli:

Integrate

Deploy a TendermintX contract.

forge create --rpc-url $RPC_URL --private-key $PRIVATE_KEY --constructor-args 0x6e4f1e9ea315ebfd69d18c2db974eef6105fb803 --etherscan-api-key $ETHERSCAN_API_KEY --verify TendermintX

Initialize the TendermintX contract with genesis parameters.

forge script script/Genesis.s.sol --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast

Update the function ID's on the TendermintX contract.

forge script script/FunctionId.s.sol --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast

Run TendermintX script to update the light client continuously.

Note: Update .env with the necessary variables before running.

cargo run --bin tendermintx --release

tendermintx's People

Contributors

ratankaliani avatar puma314 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.