Giter Site home page Giter Site logo

zenith's Introduction

Zenith

Mekatek's block builder API lives here for posterity.

Operations

Database

# connect
hack/psql-prod

# show tables
\dt;

# describe a table
\d+ chains;

# update a text[]
BEGIN;
UPDATE chains
 SET node_uris = '{http://hostname:26657}'
 WHERE id = 'whatever-chain-id';
COMMIT;

# reset a localnet
BEGIN;
DELETE FROM bids     WHERE chain_id = 'localnet-chain-id';
DELETE FROM auctions WHERE chain_id = 'localnet-chain-id';
COMMIT;

Releases

To release a new tag of our Tendermint fork you check out the tracking branch with the patches, and give it a tag of the format mekatek/REPO@VERSION-PATCH where REPO is the upstream e.g. github.com/tendermint/tendermint, VERSION is the upstream version tag that our branch is tracking e.g. v0.34.19, and PATCH is an integer representing Mekatek's changes on that VERSION e.g. 3.

cd meka-dev/tendermint
git checkout v0.34.19-mekatek
git tag mekatek/github.com/tendermint/[email protected]
git push --tags origin

To produce a patched binary, see the build-NETWORK scripts in hack.

tmkms

meka-dev/tmkms is a fork of iqlusion/tmkms that supports the builder API for validators that use a sentry architecture.

# build
git clone https://github.com/meka-dev/tmkms --branch v0.34.19-mekatek
cd tmkms
cargo build --release --features=softsign
ls -ltar target/release/tmkms

A localnet full node can be configured to use tmkms for signing. Initialize a tmkms instance on the localnet host.

tmkms init --networks osmosis /var/meka/tmkms

tmkms softsign import \
    /path/to/config/priv_validator_key.json \
    /var/meka/tmkms/secrets/priv_validator_key

Write this config file to /var/meka/tmkms/tmkms.toml. Here the key prefixes assume Osmosis, they'll be different for other networks.

[[chain]]
id = "localnet-chain-id"
key_format = { type = "bech32", account_key_prefix = "osmopub", consensus_key_prefix = "osmovalconspub" }
state_file = "/var/meka/tmkms/state/localosmosis-consensus.json"

[[providers.softsign]]
chain_ids = ["localosmosis"]
key_type = "consensus"
path = "/var/meka/tmkms/secrets/priv_validator_key"

[[validator]]
chain_id = "localnet-chain-id"
addr = "tcp://localnet-full-node:26659" # <-- CHANGE THE HOST HERE AS NECESSARY
secret_key = "/var/meka/tmkms/secrets/kms-identity.key"
protocol_version = "v0.34"
reconnect = true

Modify the localnet full node's config.toml like this.

# priv_validator_key_file = "config/priv_validator_key.json"   # <-- COMMENT THIS OUT
# priv_validator_state_file = "data/priv_validator_state.json" # <-- COMMENT THIS OUT
priv_validator_laddr = "tcp://0.0.0.0:26659"                   # <-- SET THIS

Start tmkms like this.

tmkms start --config=/var/meka/tmkms/tmkms.toml

Restart the localnet full node. It should bind to priv_validator_laddr, accept a connection from tmkms, and then use that connection whenever it needs to sign anything.

zenith's People

Contributors

dependabot[bot] avatar tsenart avatar

Stargazers

monty avatar xpara avatar

Watchers

Sean Braithwaite avatar xla 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.