zeta-node

module
v0.0.0-...-2da98db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2024 License: MIT

README

ZetaChain

ZetaChain is an EVM-compatible L1 blockchain that enables omnichain, generic smart contracts and messaging between any blockchain.

Prerequisites

  • Go 1.22
  • Docker and Docker Compose (optional, for running tests locally)
  • buf (optional, for processing protocol buffer files)
  • jq (optional, for running scripts)

Components of ZetaChain

ZetaChain is built with Cosmos SDK, a modular framework for building blockchain and Ethermint, a module that implements EVM-compatibility.

  • zeta-node (this repository) contains the source code for the ZetaChain node (zetacored) and the ZetaChain client (zetaclientd).
  • protocol-contracts contains the source code for the Solidity smart contracts that implement the core functionality of ZetaChain.

Building the zetacored/zetaclientd binaries

Clone this repository, checkout the latest release tag, and type the following command to build the binaries:

make install

to build.

This command will install the zetacored and zetaclientd binaries in your $GOPATH/bin directory.

Verify that the version of the binaries match the release tag.

zetacored version
zetaclientd version

Making changes to the source code

After making changes to any of the protocol buffer files, run the following command to run generated files generation (ProtoBuf, OpenAPI and docs):

make generate

This command will use buf to generate the Go files from the protocol buffer files and move them to the correct directories inside x/. It will also generate an OpenAPI spec.

This command will run a script to update the modules' documentation. The script uses static code analysis to read the protocol buffer files and identify all Cosmos SDK messages. It then searches the source code for the corresponding message handler functions and retrieves the documentation for those functions. Finally, it creates a messages.md file for each module, which contains the documentation for all the messages in that module.

Further Reading

Find below further documentation for development and running your own ZetaChain node:

Community

Twitter | Discord | Telegram | Website

Directories

Path Synopsis
app
cmd
contrib
e2e
pkg
bg
Package bg provides primitives for the background tasks
Package bg provides primitives for the background tasks
gas
retry
Package retry provides a generic retry mechanism with exponential backoff.
Package retry provides a generic retry mechanism with exponential backoff.
rpc
nullify
Package nullify provides methods to init nil values structs for test assertion.
Package nullify provides methods to init nil values structs for test assertion.
x
authority/types
Package types is a reverse proxy.
Package types is a reverse proxy.
crosschain/types
Package types is a reverse proxy.
Package types is a reverse proxy.
emissions/types
NOTE: Usage of x/params to manage parameters is deprecated in favor of x/gov controlled execution of MsgUpdateParams messages.
NOTE: Usage of x/params to manage parameters is deprecated in favor of x/gov controlled execution of MsgUpdateParams messages.
fungible/types
Package types is a reverse proxy.
Package types is a reverse proxy.
lightclient/types
Package types is a reverse proxy.
Package types is a reverse proxy.
observer/types
Package types is a reverse proxy.
Package types is a reverse proxy.
zetaclient
authz
Package authz provides a signer object for transactions using grants grants are used to allow a hotkey to sign transactions on behalf of the observers
Package authz provides a signer object for transactions using grants grants are used to allow a hotkey to sign transactions on behalf of the observers
chains/bitcoin/observer
Package observer implements the Bitcoin chain observer
Package observer implements the Bitcoin chain observer
chains/bitcoin/signer
Package signer implements the ChainSigner interface for BTC
Package signer implements the ChainSigner interface for BTC
chains/evm/observer
Package observer implements the EVM chain observer
Package observer implements the EVM chain observer
chains/evm/signer
Package signer implements the ChainSigner interface for EVM chains
Package signer implements the ChainSigner interface for EVM chains
chains/interfaces
Package interfaces provides interfaces for clients and signers for the chain to interact with
Package interfaces provides interfaces for clients and signers for the chain to interact with
compliance
Package compliance provides functions to check for compliance of cross-chain transactions
Package compliance provides functions to check for compliance of cross-chain transactions
config
Package config provides functions to load and save ZetaClient config
Package config provides functions to load and save ZetaClient config
context
Package context provides global app context for ZetaClient
Package context provides global app context for ZetaClient
hsm
Package hsm is used to interact with chains with a HSM it is currently not used
Package hsm is used to interact with chains with a HSM it is currently not used
metrics
Package metrics provides metrics functionalities for the zetaclient
Package metrics provides metrics functionalities for the zetaclient
orchestrator
Package orchestrator provides the orchestrator for orchestrating cross-chain transactions
Package orchestrator provides the orchestrator for orchestrating cross-chain transactions
outboundprocessor
Package outboundprocessor provides functionalities to track outbound processing
Package outboundprocessor provides functionalities to track outbound processing
ratelimiter
Package ratelimiter provides functionalities for rate limiting the cross-chain transactions
Package ratelimiter provides functionalities for rate limiting the cross-chain transactions
supplychecker
Package supplychecker provides functionalities to check the total supply of Zeta tokens Currently not used in the codebase
Package supplychecker provides functionalities to check the total supply of Zeta tokens Currently not used in the codebase
tss
Package tss provides the TSS signer functionalities for the zetaclient to sign transactions on external chains
Package tss provides the TSS signer functionalities for the zetaclient to sign transactions on external chains
zetacore
Package zetacore provides the client to interact with zetacore node via GRPC.
Package zetacore provides the client to interact with zetacore node via GRPC.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL