Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.
/ zenith-rs Public archive

rust types and services for Zenith πŸŽ€

Notifications You must be signed in to change notification settings

init4tech/zenith-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ee1e8aa Β· Oct 24, 2024
May 29, 2024
Oct 18, 2024
Oct 21, 2024
Oct 21, 2024
Oct 24, 2024
May 29, 2024
Oct 21, 2024
Aug 28, 2024
May 18, 2024
May 18, 2024

Repository files navigation

zenith-rs

Rust utilites for working with Zenith.

rust ecr

Crates

  • zenith-types: Common types used by other crates.
  • zenith-builder-example: a block building example that uses the builder library.

Development

This crate contains an example block builder in the Signet ecosystem.

Requirements

  • Rust 1.79.0
  • Cargo Lambda
  • AWS CLI and credentials

Environment

The following environment variables are exposed to configure the Builder:

# Builder Configs
HOST_CHAIN_ID="17000" # Holesky Testnet
RU_CHAIN_ID="17001"
HOST_RPC_URL="http://host.url.here"
ZENITH_ADDRESS="ZENITH_ADDRESS_HERE"
QUINCEY_URL="http://signer.url.here"
BUILDER_PORT="8080"
BUILDER_KEY="YOUR_BUILDER_KEY_HERE"
INCOMING_TRANSACTIONS_BUFFER="10"
BLOCK_CONFIRMATION_BUFFER="10"
BUILDER_REWARDS_ADDRESS="BUILDER_REWARDS_ADDRESS_HERE"
ROLLUP_BLOCK_GAS_LIMIT="30000000"
# Transaction Pool Configs
TX_POOL_URL="http://pool.url.here/" # trailing slash is required
TX_POOL_POLL_INTERVAL="5" # seconds
TX_POOL_CACHE_DURATION="600" # seconds

API

SignRequest

Sign request example payload:

{
  "hostBlockNumber": "0x0",
  "hostChainId": "0x1",
  "ruChainId": "0x2",
  "gasLimit": "0x5",
  "ruRewardAddress": "0x0606060606060606060606060606060606060606",
  "contents": "0x0707070707070707070707070707070707070707070707070707070707070707"
}