diff --git a/Cargo.lock b/Cargo.lock index 18bb15af..a5d5a909 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2533,6 +2533,49 @@ dependencies = [ "tracing", ] +[[package]] +name = "layerd" +version = "0.5.0" +dependencies = [ + "bytes", + "clap", + "cosmrs", + "cosmwasm-std", + "figment", + "futures", + "hex", + "hex-literal", + "http 1.1.0", + "layer-abci", + "layer-app", + "layer-cosmos", + "layer-proto", + "layer-std", + "layer-storage", + "opentelemetry", + "opentelemetry-jaeger", + "parking_lot", + "pico-args", + "prost 0.13.3", + "serde", + "serde_json", + "sha2 0.10.8", + "tendermint 0.39.1", + "tendermint-proto 0.39.1", + "tendermint-rpc", + "thiserror", + "tokio", + "tokio-stream", + "tonic", + "tonic-reflection", + "tonic-web", + "tower 0.4.13", + "tower-http", + "tracing", + "tracing-opentelemetry", + "tracing-subscriber", +] + [[package]] name = "lazy_static" version = "1.5.0" @@ -3936,49 +3979,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "slay3rd" -version = "0.5.0" -dependencies = [ - "bytes", - "clap", - "cosmrs", - "cosmwasm-std", - "figment", - "futures", - "hex", - "hex-literal", - "http 1.1.0", - "layer-abci", - "layer-app", - "layer-cosmos", - "layer-proto", - "layer-std", - "layer-storage", - "opentelemetry", - "opentelemetry-jaeger", - "parking_lot", - "pico-args", - "prost 0.13.3", - "serde", - "serde_json", - "sha2 0.10.8", - "tendermint 0.39.1", - "tendermint-proto 0.39.1", - "tendermint-rpc", - "thiserror", - "tokio", - "tokio-stream", - "tonic", - "tonic-reflection", - "tonic-web", - "tower 0.4.13", - "tower-http", - "tracing", - "tracing-opentelemetry", - "tracing-subscriber", -] - [[package]] name = "slice-group-by" version = "0.3.1" diff --git a/Cargo.toml b/Cargo.toml index 22353420..28279013 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [workspace] -members = ["app/*", "contracts/*", "packages/*"] -exclude = ["tools/proto-compiler"] +# members = ["app/*", "contracts/*", "packages/comet/*", "packages/core/*", "packages/cosmossdk/*", "packages/utils/*"] +members = ["app/*", "contracts/*", "packages/comet/*", "packages/core/*", "packages/cosmossdk/*"] +exclude = ["packages/cosmossdk/tools", "packages/cosmossdk/tools/*"] resolver = "2" [workspace.package] @@ -45,13 +46,13 @@ http = "1" tower-http = { version = "0.5", features = ["cors"] } anyhow = { version = "1", default-features = false } -layer-abci = { path = "./packages/abci" } -layer-app = { path = "./packages/app" } -layer-cosmos = { path = "./packages/cosmos" } -layer-golem = { path = "./packages/golem" } -layer-proto = { path = "./packages/proto" } -layer-std = { path = "./packages/std" } -layer-storage = { path = "./packages/storage" } +layer-abci = { path = "./packages/comet/abci" } +layer-app = { path = "./packages/layer" } +layer-cosmos = { path = "./packages/cosmossdk/cosmos" } +layer-golem = { path = "./packages/cosmossdk/golem" } +layer-proto = { path = "./packages/cosmossdk/proto" } +layer-std = { path = "./packages/core/std" } +layer-storage = { path = "./packages/core/storage" } layer-root = { path = "./contracts/root" } tc-echo = { path = "./contracts/echo" } diff --git a/app/slay3rd/Cargo.toml b/app/layerd/Cargo.toml similarity index 96% rename from app/slay3rd/Cargo.toml rename to app/layerd/Cargo.toml index 4e6bcb16..545aad61 100644 --- a/app/slay3rd/Cargo.toml +++ b/app/layerd/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "slay3rd" -description = "Rust ABCI app to run slay3r with CometBFT 0.38" +name = "layerd" +description = "Rust ABCI app to run layer with CometBFT 0.38" version = { workspace = true } license = { workspace = true } edition = { workspace = true } diff --git a/app/slay3rd/GRPC.md b/app/layerd/GRPC.md similarity index 100% rename from app/slay3rd/GRPC.md rename to app/layerd/GRPC.md diff --git a/app/slay3rd/README.md b/app/layerd/README.md similarity index 100% rename from app/slay3rd/README.md rename to app/layerd/README.md diff --git a/app/slay3rd/TELEMETRY.md b/app/layerd/TELEMETRY.md similarity index 100% rename from app/slay3rd/TELEMETRY.md rename to app/layerd/TELEMETRY.md diff --git a/app/slay3rd/build.rs b/app/layerd/build.rs similarity index 100% rename from app/slay3rd/build.rs rename to app/layerd/build.rs diff --git a/app/slay3rd/config/pulsarium.toml b/app/layerd/config/pulsarium.toml similarity index 100% rename from app/slay3rd/config/pulsarium.toml rename to app/layerd/config/pulsarium.toml diff --git a/app/slay3rd/src/app.rs b/app/layerd/src/app.rs similarity index 100% rename from app/slay3rd/src/app.rs rename to app/layerd/src/app.rs diff --git a/app/slay3rd/src/cli.rs b/app/layerd/src/cli.rs similarity index 100% rename from app/slay3rd/src/cli.rs rename to app/layerd/src/cli.rs diff --git a/app/slay3rd/src/config.rs b/app/layerd/src/config.rs similarity index 100% rename from app/slay3rd/src/config.rs rename to app/layerd/src/config.rs diff --git a/app/slay3rd/src/convert.rs b/app/layerd/src/convert.rs similarity index 100% rename from app/slay3rd/src/convert.rs rename to app/layerd/src/convert.rs diff --git a/app/slay3rd/src/decode.rs b/app/layerd/src/decode.rs similarity index 100% rename from app/slay3rd/src/decode.rs rename to app/layerd/src/decode.rs diff --git a/app/slay3rd/src/encode.rs b/app/layerd/src/encode.rs similarity index 100% rename from app/slay3rd/src/encode.rs rename to app/layerd/src/encode.rs diff --git a/app/slay3rd/src/grpc/auth.rs b/app/layerd/src/grpc/auth.rs similarity index 100% rename from app/slay3rd/src/grpc/auth.rs rename to app/layerd/src/grpc/auth.rs diff --git a/app/slay3rd/src/grpc/bank.rs b/app/layerd/src/grpc/bank.rs similarity index 100% rename from app/slay3rd/src/grpc/bank.rs rename to app/layerd/src/grpc/bank.rs diff --git a/app/slay3rd/src/grpc/cosmwasm.rs b/app/layerd/src/grpc/cosmwasm.rs similarity index 100% rename from app/slay3rd/src/grpc/cosmwasm.rs rename to app/layerd/src/grpc/cosmwasm.rs diff --git a/app/slay3rd/src/grpc/log.rs b/app/layerd/src/grpc/log.rs similarity index 100% rename from app/slay3rd/src/grpc/log.rs rename to app/layerd/src/grpc/log.rs diff --git a/app/slay3rd/src/grpc/mod.rs b/app/layerd/src/grpc/mod.rs similarity index 100% rename from app/slay3rd/src/grpc/mod.rs rename to app/layerd/src/grpc/mod.rs diff --git a/app/slay3rd/src/grpc/sync.rs b/app/layerd/src/grpc/sync.rs similarity index 100% rename from app/slay3rd/src/grpc/sync.rs rename to app/layerd/src/grpc/sync.rs diff --git a/app/slay3rd/src/grpc/tendermint.rs b/app/layerd/src/grpc/tendermint.rs similarity index 100% rename from app/slay3rd/src/grpc/tendermint.rs rename to app/layerd/src/grpc/tendermint.rs diff --git a/app/slay3rd/src/grpc/tx.rs b/app/layerd/src/grpc/tx.rs similarity index 100% rename from app/slay3rd/src/grpc/tx.rs rename to app/layerd/src/grpc/tx.rs diff --git a/app/slay3rd/src/main.rs b/app/layerd/src/main.rs similarity index 98% rename from app/slay3rd/src/main.rs rename to app/layerd/src/main.rs index bda45bfc..3edfcacf 100644 --- a/app/slay3rd/src/main.rs +++ b/app/layerd/src/main.rs @@ -147,7 +147,7 @@ async fn run_server( let grpc_reflection = tonic_reflection::server::Builder::configure() .register_encoded_file_descriptor_set(include_bytes!( - "../../../packages/proto/src/protos/service_descriptor.bin" + "../../../packages/cosmossdk/proto/src/protos/service_descriptor.bin" )) .build_v1() .unwrap(); diff --git a/docker/Dockerfile.gateway b/docker/Dockerfile.gateway index 23b377ea..753398de 100644 --- a/docker/Dockerfile.gateway +++ b/docker/Dockerfile.gateway @@ -3,7 +3,7 @@ FROM golang:1.22-bookworm AS build-env -COPY ./gateway /src/gateway +COPY ./packages/cosmossdk/tools/gateway /src/gateway ENV CGO_ENABLED=0 RUN cd /src/gateway && go build -o /app diff --git a/docker/Dockerfile.layerd b/docker/Dockerfile.layerd new file mode 100644 index 00000000..0066f1c6 --- /dev/null +++ b/docker/Dockerfile.layerd @@ -0,0 +1,56 @@ +# docker build . -f docker/Dockerfile.slay3rd -t ghcr.io/lay3rlabs/slay3rd:latest +# docker run --rm -it ghcr.io/lay3rlabs//slay3rd:latest /bin/bash + +### BUILDING + +FROM rust:1.80-bookworm AS builder +WORKDIR /myapp + +RUN apt update && apt install -y clang + +# This whole pile will pre-build and cache the dependencies, so we just recompile local code below +COPY Cargo.lock Cargo.toml /myapp/ +COPY app/layerd/Cargo.toml /myapp/app/layerd/Cargo.toml +COPY dummy.rs /myapp/app/layerd/src/main.rs +COPY contracts/caller/Cargo.toml /myapp/contracts/caller/Cargo.toml +COPY dummy.rs /myapp/contracts/caller/src/lib.rs +COPY contracts/echo/Cargo.toml /myapp/contracts/echo/Cargo.toml +COPY dummy.rs /myapp/contracts/echo/src/lib.rs +COPY contracts/root/Cargo.toml /myapp/contracts/root/Cargo.toml +COPY dummy.rs /myapp/contracts/root/src/lib.rs +COPY packages/comet/abci/Cargo.toml /myapp/packages/comet/abci/Cargo.toml +COPY dummy.rs /myapp/packages/comet/abci/src/lib.rs +COPY packages/layer/Cargo.toml /myapp/packages/layer/Cargo.toml +COPY dummy.rs /myapp/packages/layer/src/lib.rs +COPY packages/cosmossdk/cosmos/Cargo.toml /myapp/packages/cosmossdk/cosmos/Cargo.toml +COPY dummy.rs /myapp/packages/cosmossdk/cosmos/src/lib.rs +COPY packages/cosmossdk/golem/Cargo.toml /myapp/packages/cosmossdk/golem/Cargo.toml +COPY dummy.rs /myapp/packages/cosmossdk/golem/src/lib.rs +COPY packages/cosmossdk/proto/Cargo.toml /myapp/packages/cosmossdk/proto/Cargo.toml +COPY dummy.rs /myapp/packages/cosmossdk/proto/src/lib.rs +COPY dummy.rs /myapp/packages/cosmossdk/proto/examples/sync_test.rs +COPY packages/core/std/Cargo.toml /myapp/packages/core/std/Cargo.toml +COPY dummy.rs /myapp/packages/core/std/src/lib.rs +COPY packages/core/storage/Cargo.toml /myapp/packages/core/storage/Cargo.toml +COPY dummy.rs /myapp/packages/core/storage/src/lib.rs +RUN cargo build --release --bin layerd + +# clean up these fake local deps so we compile for real later +RUN rm /myapp/*/*/src/*.rs +RUN rm -rf target/release/.fingerprint/layer-* + +# This build step should just compile the local code and be faster +COPY . . +RUN cargo build --release --bin layerd + +### PRODUCTION + +# Now, pack up that binary in a nice small image +FROM debian:bookworm-slim +RUN apt-get update && apt-get upgrade -y +RUN apt install -y libcurl4 wget +COPY --from=builder /myapp/target/release/layerd /usr/local/bin/layerd +# COPY --from=builder /myapp/Cargo.toml /usr/local/bin/layerd +EXPOSE 26658 +CMD ["layerd"] + diff --git a/docker/Dockerfile.slay3rd b/docker/Dockerfile.slay3rd deleted file mode 100644 index 33f56790..00000000 --- a/docker/Dockerfile.slay3rd +++ /dev/null @@ -1,56 +0,0 @@ -# docker build . -f docker/Dockerfile.slay3rd -t ghcr.io/lay3rlabs/slay3rd:latest -# docker run --rm -it ghcr.io/lay3rlabs//slay3rd:latest /bin/bash - -### BUILDING - -FROM rust:1.80-bookworm AS builder -WORKDIR /myapp - -RUN apt update && apt install -y clang - -# This whole pile will pre-build and cache the dependencies, so we just recompile local code below -COPY Cargo.lock Cargo.toml /myapp/ -COPY app/slay3rd/Cargo.toml /myapp/app/slay3rd/Cargo.toml -COPY dummy.rs /myapp/app/slay3rd/src/main.rs -COPY contracts/caller/Cargo.toml /myapp/contracts/caller/Cargo.toml -COPY dummy.rs /myapp/contracts/caller/src/lib.rs -COPY contracts/echo/Cargo.toml /myapp/contracts/echo/Cargo.toml -COPY dummy.rs /myapp/contracts/echo/src/lib.rs -COPY contracts/root/Cargo.toml /myapp/contracts/root/Cargo.toml -COPY dummy.rs /myapp/contracts/root/src/lib.rs -COPY packages/abci/Cargo.toml /myapp/packages/abci/Cargo.toml -COPY dummy.rs /myapp/packages/abci/src/lib.rs -COPY packages/app/Cargo.toml /myapp/packages/app/Cargo.toml -COPY dummy.rs /myapp/packages/app/src/lib.rs -COPY packages/cosmos/Cargo.toml /myapp/packages/cosmos/Cargo.toml -COPY dummy.rs /myapp/packages/cosmos/src/lib.rs -COPY packages/golem/Cargo.toml /myapp/packages/golem/Cargo.toml -COPY dummy.rs /myapp/packages/golem/src/lib.rs -COPY packages/proto/Cargo.toml /myapp/packages/proto/Cargo.toml -COPY dummy.rs /myapp/packages/proto/src/lib.rs -COPY dummy.rs /myapp/packages/proto/examples/sync_test.rs -COPY packages/std/Cargo.toml /myapp/packages/std/Cargo.toml -COPY dummy.rs /myapp/packages/std/src/lib.rs -COPY packages/storage/Cargo.toml /myapp/packages/storage/Cargo.toml -COPY dummy.rs /myapp/packages/storage/src/lib.rs -RUN cargo build --release --bin slay3rd - -# clean up these fake local deps so we compile for real later -RUN rm /myapp/*/*/src/*.rs -RUN rm -rf target/release/.fingerprint/layer-* - -# This build step should just compile the local code and be faster -COPY . . -RUN cargo build --release --bin slay3rd - -### PRODUCTION - -# Now, pack up that binary in a nice small image -FROM debian:bookworm-slim -RUN apt-get update && apt-get upgrade -y -RUN apt install -y libcurl4 wget -COPY --from=builder /myapp/target/release/slay3rd /usr/local/bin/slay3rd -# COPY --from=builder /myapp/Cargo.toml /usr/local/bin/slay3rd -EXPOSE 26658 -CMD ["slay3rd"] - diff --git a/docs/README.md b/docs/README.md index 95ca0f1b..274dffa6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -69,40 +69,38 @@ flowchart TD Applications (under `app/` directory): -* [`slay3rd`](./app/slay3rd) - this is the binary executable for an ABCI++ application that connects with CometBFT to form a blockchain node. - -Packages (under `packages/` directory): - -* [`abci`](./packages/abci) - App-generic code to run a high-performance ABCI server (to connect to CometBFT). This was based on [Tendermint ABCI](https://github.com/informalsystems/tendermint-rs/tree/main/abci), but with changes made to increase performance and concurrency. -* [`app`](./packages/app) - This is the main business logic of the blockchain. It handles the calls from the `abci` server to process transactions and queries. It has a few core modules built-in: - * [`auth`](./packages/app/src/auth) - * [`bank`](./packages/app/src/bank) - * [`wasm`](./packages/app/src/wasm) -* ^^[`cosmos`](./packages/cosmos) - Code to translate custom cosmos types and transactions to our internal format. Makes heavy use of the [`proto`](./packages/proto) package to provide the Cosmos types. -* ^^[`proto`](./packages/proto) - [Prost](https://crates.io/crates/prost) codegen of the Cosmos SDK types. Unfortunately, we could not use the types from [`cosmos-rust`](https://github.com/cosmos/cosmos-rust) as those don't support the types for our gRPC server (they were designed for clients) -* [`std`](./packages/std) - All the standard types we use throughout our system. This should import no other crate of ours and be imported by almost all the others. -* [`storage`](./packages/storage) - This is a port of the types from [`cw-storage-plus`](https://github.com/CosmWasm/cw-storage-plus) to work with our storage interfaces (which include gas metering). It allows use of type-safe `Item` and `Map` throughout the native modules in the [`app`](./packages/app) package. - -Other APIs: - -* ^^[`gateway`](./gateway) - This is [`grpc-gateway`](https://github.com/grpc-ecosystem/grpc-gateway) codegen API to provide a reverse proxy of HTTP/JSON types to the internal gRPC server. This performs the functionality of the "LCD" server in the Cosmos SDK. -* ^^[`proto`](./proto) (top-level, not `packages/proto`) - standard Cosmos protobuf types that we use for compatibility. These were copied from the upstream repos, but all the custom gogoproto and sdkproto directives removed to make them standard `.proto` files we can use in Rust. +* [`layerd`](./app/layerd) - this is the binary executable for an ABCI++ application that connects with CometBFT to form a blockchain node. + +Packages (under `packages/` directory), grouped by scope: + +* `comet` + * [`abci`](./packages/comet/abci) - App-generic code to run a high-performance ABCI server (to connect to CometBFT). This was based on [Tendermint ABCI](https://github.com/informalsystems/tendermint-rs/tree/main/abci), but with changes made to increase performance and concurrency. +* `cosmossdk` + * [`cosmos`](./packages/cosmossdk/cosmos) - Code to translate custom cosmos types and transactions to our internal format. Makes heavy use of the [`proto`](./packages/proto) package to provide the Cosmos types. + * [`golem`](./packages/cosmossdk/golem) - Equivalent of Osmosis' Test Tube. This allows inline tests with the full stack. + * [`proto`](./packages/cosmossdk/proto) - [Prost](https://crates.io/crates/prost) codegen of the Cosmos SDK types. Unfortunately, we could not use the types from [`cosmos-rust`](https://github.com/cosmos/cosmos-rust) as those don't support the types for our gRPC server. Created by `proto-compiler`. + * `tools` + * [`protospec`](./packages/cosmossdk/tools/protospec) - standard Cosmos protobuf types that we use for compatibility. These were copied from the upstream repos, but all the custom gogoproto and sdkproto directives removed to make them standard `.proto` files we can use in Rust. + * [`proto-compiler`](./packages/cosmossdk/tools/proto-compiler) - Simple script to compile the files in `protospec` into custom Rust types for our server. Outputs into `proto`. + * [`gateway`](./packages/cosmossdk/tools/protospec) - This is [`grpc-gateway`](https://github.com/grpc-ecosystem/grpc-gateway) codegen API to provide a reverse proxy of HTTP/JSON types to the internal gRPC server. This performs the functionality of the "LCD" server in the Cosmos SDK. +* `core` + * [`std`](./packages/core/std) - All the standard types we use throughout our system. This should import no other crate of ours and be imported by almost all the others. + * [`storage`](./packages/core/storage) - This is a port of the types from [`cw-storage-plus`](https://github.com/CosmWasm/cw-storage-plus) to work with our storage interfaces (which include gas metering). It allows use of type-safe `Item` and `Map` throughout the native modules in the [`app`](./packages/core/app) package. (TODO: move plus stuff to utils, keep core storage types here) +* [`layer`](./packages/layer) - This is the main business logic of the Layer blockchain. It handles the calls from the `abci` server to process transactions and queries. You could swap out a completely different state machine here, while still making use of all the other server and compatibility crates. It has a few core modules built-in: + * [`auth`](./packages/layer/src/auth) + * [`bank`](./packages/layer/src/bank) + * [`wasm`](./packages/layer/src/wasm) Testing: * [`contracts`](./contracts) - Provides a couple CosmWasm contracts, which we use in integration testing to ensure we properly implement the CosmWasm APIs. They are not meant for any useful purpose, just for internal testing. The contracts for the chain launch (staking, governance, etc) will be in a separate repo. * [`artifacts`](./artifacts) - Contains pre-built `*.wasm` files from the above contracts, created by `scripts/build_contracts.sh` * [`fixtures`](./packages/app/fixtures) - Contains our custom contracts, as well as some standard ones from the CosmWasm ecosystem, which we use in testing our blockchain implementation, specifically [the wasm module](./packages/app/src/wasm). -* [`integration`](./integration) - CosmJS based integration tests that provide full-stack test of our compatibility with the Cosmos ecosystem tooling. This is essential to ensure our transaction signature verification is compatible, and covers any Tendermint RPC queries. +* [`js`](./js) - CosmJS based integration tests that provide full-stack test of our compatibility with the Cosmos ecosystem tooling. This is essential to ensure our transaction signature verification is compatible, and covers any Tendermint RPC queries. Tooling: * [`docker`](./docker) - Docker files to containerize the various applications in our stack. These are used by [`docker-compose.yml`](./docker-compose.yml) to launch a local network for testing * [`scripts`](./scripts) - Various bash scripts to build various parts of the system, and others needed to run a local network for testing -* [`tools`](./tools) - Rust code that doesn't belong in our packages, but rather part of our build system. Currently only [`proto-compiler`](./tools/proto-compiler), which uses Prost to build `packages/proto` from the definitions in `proto` * [CometBFT](https://github.com/cometbft/cometbft) - External: the consensus engine we use to drive the `slayerd` process. Imported as a docker image from external repo. * [Jaeger](https://www.jaegertracing.io) - External: the tracing system to display default metrics on all API calls on a node. Imported as a docker image from external repo. - -## TODO - -* Reorganize packages to make it clear which are cosmos compatibility and which are "core". I marked cosmos packages with `^^` \ No newline at end of file diff --git a/img/pulsarium.png b/img/pulsarium.png deleted file mode 100644 index 12034d48..00000000 Binary files a/img/pulsarium.png and /dev/null differ diff --git a/localnode/DEMO.md b/localnode/DEMO.md deleted file mode 100644 index c435fcb7..00000000 --- a/localnode/DEMO.md +++ /dev/null @@ -1,137 +0,0 @@ -# Demo with localnode - -This shows how to deploy an AVS on localnode and setup stuff - -## Start localnode - -If you want to compile the most recent versions, try this in this repo, as well as -the [wasmatic repo](https://github.com/Lay3rLabs/wasmatic): - -```bash -./scripts/build_docker.sh -``` - -To run the faucet, you'll also need to build it: - -```bash -./scripts/build_faucet.sh -``` - -Otherwise, you can just get the most recent published images here: - -```bash -cd localnode -docker compose pull -``` - -Once the images are updated, reset everything and start fresh: - -```bash -cd localnode -./reset_volumes.sh - -./run.sh -# OR with the faucet: -./run_all.sh -``` - -The rest of this document assumes you have a well-running instance here. - -### Check Localnode - -```bash -# ensure cometbft, gateway, jaegertracing, slay3r, and wasmatic containers are running -docker ps - -curl localhost:26657/status -# see blocks are being made.. run a few times -curl localhost:26657/status | jq .result.sync_info - -# ensure wasmatic has some proper operator addresses -curl localhost:8081/info | jq . -``` - -## Deploy AVS stuff - -Check out [avs-toolkit](https://github.com/Lay3rLabs/avs-toolkit) and go into `tools/cli` dir. -More info available on the [README there](https://github.com/Lay3rLabs/avs-toolkit/blob/main/tools/cli/README.md). - -### Set Up Wallet - -```bash -M=$(cargo run wallet create | tail -1 | cut -c16-) -echo "LOCAL_MNEMONIC=\"$M\"" > .env -echo "TEST_MNEMONIC=\"$M\"" >> .env -# this should have a nice 24 word phrase -cat .env - -cargo run -- --target=local faucet tap -cargo run -- --target=local wallet show -``` - -### Deploy Contracts - -```bash -# rebuild the contracts locally -(cd ../.. && ./scripts/optimizer.sh) - -# deploy them -cargo run -- --target=local deploy -m verifier-simple contracts --operators wasmatic - -# Copy the line that says "export LOCAL_TASK_QUEUE_ADDRESS" and paste it in your shell -# For testnet, copy and paste TEST_TASK_QUEUE_ADDRESS - -# make sure we set this up properly -cargo run -- --target=local task-queue view-queue -``` - -### Deploy WASI component - -```bash -# setup wasi -(cd ../.. && ./scripts/setup_wasi.sh) - -# rebuild the component -(cd ../.. && ./scripts/build_wasi.sh) - -# Testable is optional if you want to try the next step -# Do not use for production deployments -cargo run -- --target=local wasmatic deploy --name demo1 \ - --wasm-source ../../components/cavs_square.wasm \ - --testable \ - --task $LOCAL_TASK_QUEUE_ADDRESS -``` - -Now, you can check it is installed and running properly by checking -the wasmatic logs (in another console ideally): - -```bash -docker logs -f localnode-wasmatic-1 -``` - -### Test a Component - -This can only be done if `--testable` was provided above - -```bash -cargo run -- --target=local wasmatic test --name demo1 --input '{"x": 32}' -``` - -It will parse the input as if you pushed it to the task queue and return -the result (or error) to the caller. Nothing is written on chain. - -Note: if you change state when being triggered, this will break the AVS -consensus mechanism (different results for different operators), and thus -should not be used in production. - -### Trigger Task - -```bash -cargo run -- --target=local task-queue view-queue - -cargo run -- --target=local task-queue add-task -b '{"x": 12}' -d 'test 1' - -# wait a few secords, or until the log output shows it is executed -cargo run -- --target=local task-queue view-queue -``` - diff --git a/localnode/README.md b/localnode/README.md deleted file mode 100644 index 4aa05f84..00000000 --- a/localnode/README.md +++ /dev/null @@ -1,139 +0,0 @@ -# Localnode - -The localnode directory contains configuration and scripts to run your own localnode. -It assumes you have `docker` and `docker compose` installed locally. If you can run -`docker` as your current user (not just `root`), you can remove `sudo` from the following commands. - -## Running a Node - -Before starting localnode the first time, and anytime you wish to restart the blockchain, run -the following command. Without it, we maintain the blockchain state between restarts. - -```bash -./localnode/reset_volumes.sh -``` - -We also need to build the docker images for the chain (slay3rd and gateway) one -time before running a localnode, and each time you want to update the codebase. - -```bash -./scripts/build_docker.sh -``` - -### Debugging - -Sometimes (only on OSX?), it won't automatically pull the missing packages listed -in the docker compose files and you must manually pull them before running the node, or potentially building the docker images. If you get an error like this: - -``` -ERROR: failed to solve: debian:bookworm-slim: failed to resolve source metadata for docker.io/library/debian:bookworm-slim: error getting credentials - err: exit status 1, out: `` -``` - -Do the following before building: - -```bash - -docker pull debian:bookworm-slim -docker pull rust:1.80-bookworm -docker pull golang:1.22-bookworm -docker pull alpine:latest -``` - -And the following before running a node (`./localnode/run*.sh`) - -```bash -# This may work? -docker compose -f ./localnode/docker-compose.yml -f ./localnode/jaeger-elastic-compose.yml pull - -# If not, do this manually -docker pull cometbft/cometbft:v0.38.12 -docker pull jaegertracing/all-in-one:1.59 -docker pull docker.elastic.co/elasticsearch/elasticsearch:8.15.1 -docker pull jaegertracing/jaeger-collector:1.59 -docker pull jaegertracing/jaeger-agent:1.59 -docker pull jaegertracing/jaeger-query:1.59 -``` - -### Minimal Run - -To run without a facuet and just in-memory tracing, run the following: - -```bash -# Starting -./localnode/run.sh -sudo docker ps - -# Stopping -./localnode/stop.sh -sudo docker ps -a -``` - -### Full run - -If you want to include a faucet, and also store all tracing logs in a persistent elastic search engine -(exposed at port 9200), run the following: - -```bash -# Starting -./localnode/run_all.sh -sudo docker ps - -# Show there is data in elastic search -curl localhost:9200/_search - -# Stopping -./localnode/stop.sh -sudo docker ps -a -``` - -Note: if you want elastic search but have errors running the faucet locally, try `run_elastic.sh` which serves elastic search at port 9200, -but doesn't start the faucet at all. - -## Interacting with a Node - -There are a few ways you can interact with a localnode. - -### Javascript Tests - -The [`js`](../js/) directory contains some integration tests for localnode, writing in CosmJS. -Make sure to enable the faucet to run them all, which means `run_all.sh` above. Then: - -```bash -npm ci -npm run test -``` - -See [the module's README](../js/README.md) for more information - -### Rust CLI - -There are some custom CLI tools meant for deploying certain contracts to the testnet. -These can be found in `layer-contracts` repo in the `deploy` package. - -([Full Link](https://github.com/Lay3rLabs/lay3r-contracts/tree/main/deploy)) - -### Golang CLI - -You can also use a fork of `wasmd`, which we maintain on the -[slay3r branch of our fork](https://github.com/Lay3rLabs/wasmd/tree/slay3r). - -```bash -git clone https://github.com/Lay3rLabs/wasmd.git -cd wasmd -git checkout slay3r -make install - -slay3r version -``` - -TODO: You need to configure it to point to our server, then it should work like you are used to, -at least the bank and wasm subcommands. - -Note: You must have a proper golang installation (1.20+ I think) - -### Getting tokens - -The "proper" way to get tokens is to hit the faucet. When you `run_all.sh`, the faucet will bind to port 8000, -and can be used [as described here](https://github.com/cosmos/cosmjs/blob/main/packages/faucet/README.md#using-the-faucet). - -The easy but dirty way is to look at the [test mnemonic we use for the faucet](./faucet.env) and enter that into your wallet. diff --git a/localnode/abci/config/slay3r.toml b/localnode/abci/config/slay3r.toml deleted file mode 100644 index 117d4581..00000000 --- a/localnode/abci/config/slay3r.toml +++ /dev/null @@ -1,5 +0,0 @@ -host = "0.0.0.0" -jaeger = "http://jaeger:14268" -log = "debug" -rocksdb = "/root/.slay3r/data/app" -rpc_url = "http://cometbft:26657" diff --git a/localnode/comet/config/config.toml b/localnode/comet/config/config.toml deleted file mode 100644 index 4f40d58c..00000000 --- a/localnode/comet/config/config.toml +++ /dev/null @@ -1,468 +0,0 @@ -# This is a TOML config file. -# For more information, see https://github.com/toml-lang/toml - -# NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or -# relative to the home directory (e.g. "data"). The home directory is -# "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable -# or --home cmd flag. - -####################################################################### -### Main Base Config Options ### -####################################################################### - -# TCP or UNIX socket address of the ABCI application, -# or the name of an ABCI application compiled in with the Tendermint binary -proxy_app = "tcp://127.0.0.1:26658" - -# A custom human readable name for this node -moniker = "Slay3r-local-node" - -# If this node is many blocks behind the tip of the chain, BlockSync -# allows them to catchup quickly by downloading blocks in parallel -# and verifying their commits -block_sync = true - -# Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb -# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) -# - pure go -# - stable -# * cleveldb (uses levigo wrapper) -# - fast -# - requires gcc -# - use cleveldb build tag (go build -tags cleveldb) -# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) -# - EXPERIMENTAL -# - may be faster is some use-cases (random reads - indexer) -# - use boltdb build tag (go build -tags boltdb) -# * rocksdb (uses github.com/tecbot/gorocksdb) -# - EXPERIMENTAL -# - requires gcc -# - use rocksdb build tag (go build -tags rocksdb) -# * badgerdb (uses github.com/dgraph-io/badger) -# - EXPERIMENTAL -# - use badgerdb build tag (go build -tags badgerdb) -db_backend = "goleveldb" - -# Database directory -db_dir = "data" - -# Output level for logging, including package level options -log_level = "info" - -# Output format: 'plain' (colored text) or 'json' -log_format = "plain" - -##### additional base config options ##### - -# Path to the JSON file containing the initial validator set and other meta data -genesis_file = "config/genesis.json" - -# Path to the JSON file containing the private key to use as a validator in the consensus protocol -priv_validator_key_file = "config/priv_validator_key.json" - -# Path to the JSON file containing the last sign state of a validator -priv_validator_state_file = "data/priv_validator_state.json" - -# TCP or UNIX socket address for Tendermint to listen on for -# connections from an external PrivValidator process -priv_validator_laddr = "" - -# Path to the JSON file containing the private key to use for node authentication in the p2p protocol -node_key_file = "config/node_key.json" - -# Mechanism to connect to the ABCI application: socket | grpc -abci = "socket" - -# If true, query the ABCI app on connecting to a new peer -# so the app can decide if we should keep the connection or not -filter_peers = false - - -####################################################################### -### Advanced Configuration Options ### -####################################################################### - -####################################################### -### RPC Server Configuration Options ### -####################################################### -[rpc] - -# TCP or UNIX socket address for the RPC server to listen on -laddr = "tcp://0.0.0.0:26657" - -# A list of origins a cross-domain request can be executed from -# Default value '[]' disables cors support -# Use '["*"]' to allow any origin -cors_allowed_origins = ["*"] - -# A list of methods the client is allowed to use with cross-domain requests -cors_allowed_methods = ["HEAD", "GET", "POST", ] - -# A list of non simple headers the client is allowed to use with cross-domain requests -cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] - -# TCP or UNIX socket address for the gRPC server to listen on -# NOTE: This server only supports /broadcast_tx_commit -grpc_laddr = "" - -# Maximum number of simultaneous connections. -# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections -# If you want to accept a larger number than the default, make sure -# you increase your OS limits. -# 0 - unlimited. -# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} -# 1024 - 40 - 10 - 50 = 924 = ~900 -grpc_max_open_connections = 900 - -# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool -unsafe = false - -# Maximum number of simultaneous connections (including WebSocket). -# Does not include gRPC connections. See grpc_max_open_connections -# If you want to accept a larger number than the default, make sure -# you increase your OS limits. -# 0 - unlimited. -# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} -# 1024 - 40 - 10 - 50 = 924 = ~900 -max_open_connections = 900 - -# Maximum number of unique clientIDs that can /subscribe -# If you're using /broadcast_tx_commit, set to the estimated maximum number -# of broadcast_tx_commit calls per block. -max_subscription_clients = 100 - -# Maximum number of unique queries a given client can /subscribe to -# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to -# the estimated # maximum number of broadcast_tx_commit calls per block. -max_subscriptions_per_client = 5 - -# Experimental parameter to specify the maximum number of events a node will -# buffer, per subscription, before returning an error and closing the -# subscription. Must be set to at least 100, but higher values will accommodate -# higher event throughput rates (and will use more memory). -experimental_subscription_buffer_size = 200 - -# Experimental parameter to specify the maximum number of RPC responses that -# can be buffered per WebSocket client. If clients cannot read from the -# WebSocket endpoint fast enough, they will be disconnected, so increasing this -# parameter may reduce the chances of them being disconnected (but will cause -# the node to use more memory). -# -# Must be at least the same as "experimental_subscription_buffer_size", -# otherwise connections could be dropped unnecessarily. This value should -# ideally be somewhat higher than "experimental_subscription_buffer_size" to -# accommodate non-subscription-related RPC responses. -experimental_websocket_write_buffer_size = 200 - -# If a WebSocket client cannot read fast enough, at present we may -# silently drop events instead of generating an error or disconnecting the -# client. -# -# Enabling this experimental parameter will cause the WebSocket connection to -# be closed instead if it cannot read fast enough, allowing for greater -# predictability in subscription behavior. -experimental_close_on_slow_client = false - -# How long to wait for a tx to be committed during /broadcast_tx_commit. -# WARNING: Using a value larger than 10s will result in increasing the -# global HTTP write timeout, which applies to all connections and endpoints. -# See https://github.com/tendermint/tendermint/issues/3435 -timeout_broadcast_tx_commit = "10s" - -# Maximum size of request body, in bytes -max_body_bytes = 5000000 # 5MB enough for large wasm upload - -# Maximum size of request header, in bytes -max_header_bytes = 1048576 - -# The path to a file containing certificate that is used to create the HTTPS server. -# Might be either absolute path or path related to Tendermint's config directory. -# If the certificate is signed by a certificate authority, -# the certFile should be the concatenation of the server's certificate, any intermediates, -# and the CA's certificate. -# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. -# Otherwise, HTTP server is run. -tls_cert_file = "" - -# The path to a file containing matching private key that is used to create the HTTPS server. -# Might be either absolute path or path related to Tendermint's config directory. -# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. -# Otherwise, HTTP server is run. -tls_key_file = "" - -# pprof listen address (https://golang.org/pkg/net/http/pprof) -pprof_laddr = "" - -####################################################### -### P2P Configuration Options ### -####################################################### -[p2p] - -# Address to listen for incoming connections -laddr = "tcp://0.0.0.0:26656" - -# Address to advertise to peers for them to dial -# If empty, will use the same port as the laddr, -# and will introspect on the listener or use UPnP -# to figure out the address. ip and port are required -# example: 159.89.10.97:26656 -external_address = "" - -# Comma separated list of seed nodes to connect to -seeds = "" - -# Comma separated list of nodes to keep persistent connections to -persistent_peers = "" - -# UPNP port forwarding -upnp = false - -# Path to address book -addr_book_file = "config/addrbook.json" - -# Set true for strict address routability rules -# Set false for private or local networks -addr_book_strict = true - -# Maximum number of inbound peers -max_num_inbound_peers = 40 - -# Maximum number of outbound peers to connect to, excluding persistent peers -max_num_outbound_peers = 10 - -# List of node IDs, to which a connection will be (re)established ignoring any existing limits -unconditional_peer_ids = "" - -# Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) -persistent_peers_max_dial_period = "0s" - -# Time to wait before flushing messages out on the connection -flush_throttle_timeout = "10ms" - -# Maximum size of a message packet payload, in bytes -max_packet_msg_payload_size = 1024 - -# Rate at which packets can be sent, in bytes/second -send_rate = 5120000 - -# Rate at which packets can be received, in bytes/second -recv_rate = 5120000 - -# Set true to enable the peer-exchange reactor -pex = true - -# Seed mode, in which node constantly crawls the network and looks for -# peers. If another node asks it for addresses, it responds and disconnects. -# -# Does not work if the peer-exchange reactor is disabled. -seed_mode = false - -# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) -private_peer_ids = "" - -# Toggle to disable guard against peers connecting from the same ip. -allow_duplicate_ip = false - -# Peer connection configuration. -handshake_timeout = "20s" -dial_timeout = "3s" - -####################################################### -### Mempool Configuration Option ### -####################################################### -[mempool] - -# Mempool version to use: -# 1) "v0" - (default) FIFO mempool. -# 2) "v1" - prioritized mempool. -version = "v0" - -recheck = true -broadcast = true -wal_dir = "" - -# Maximum number of transactions in the mempool -size = 5000 - -# Limit the total size of all txs in the mempool. -# This only accounts for raw transactions (e.g. given 1MB transactions and -# max_txs_bytes=5MB, mempool will only accept 5 transactions). -max_txs_bytes = 1073741824 - -# Size of the cache (used to filter transactions we saw earlier) in transactions -cache_size = 10000 - -# Do not remove invalid transactions from the cache (default: false) -# Set to true if it's not possible for any invalid transaction to become valid -# again in the future. -keep-invalid-txs-in-cache = false - -# Maximum size of a single transaction. -# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. -max_tx_bytes = 3145728 # 3 MB - -# Maximum size of a batch of transactions to send to a peer -# Including space needed by encoding (one varint per transaction). -# XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 -max_batch_bytes = 0 - -# ttl-duration, if non-zero, defines the maximum amount of time a transaction -# can exist for in the mempool. -# -# Note, if ttl-num-blocks is also defined, a transaction will be removed if it -# has existed in the mempool at least ttl-num-blocks number of blocks or if it's -# insertion time into the mempool is beyond ttl-duration. -ttl-duration = "30s" - -# ttl-num-blocks, if non-zero, defines the maximum number of blocks a transaction -# can exist for in the mempool. -# -# Note, if ttl-duration is also defined, a transaction will be removed if it -# has existed in the mempool at least ttl-num-blocks number of blocks or if -# it's insertion time into the mempool is beyond ttl-duration. -ttl-num-blocks = 30 - -####################################################### -### State Sync Configuration Options ### -####################################################### -[statesync] -# State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine -# snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in -# the network to take and serve state machine snapshots. State sync is not attempted if the node -# has any local state (LastBlockHeight > 0). The node will have a truncated block history, -# starting from the height of the snapshot. -enable = false - -# RPC servers (comma-separated) for light client verification of the synced state machine and -# retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding -# header hash obtained from a trusted source, and a period during which validators can be trusted. -# -# For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 -# weeks) during which they can be financially punished (slashed) for misbehavior. -rpc_servers = "" -trust_height = 0 -trust_hash = "" -trust_period = "168h0m0s" - -# Time to spend discovering snapshots before initiating a restore. -discovery_time = "15s" - -# Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). -# Will create a new, randomly named directory within, and remove it when done. -temp_dir = "" - -# The timeout duration before re-requesting a chunk, possibly from a different -# peer (default: 1 minute). -chunk_request_timeout = "10s" - -# The number of concurrent chunk fetchers to run (default: 1). -chunk_fetchers = "4" - -####################################################### -### Block Sync Configuration Options ### -####################################################### -[blocksync] - -# Block Sync version to use: -# -# In v0.37, v1 and v2 of the block sync protocols were deprecated. -# Please use v0 instead. -# -# 1) "v0" - the default block sync implementation -version = "v0" - -####################################################### -### Consensus Configuration Options ### -####################################################### -[consensus] - -wal_file = "data/cs.wal/wal" - -# How long we wait for a proposal block before prevoting nil -timeout_propose = "2s" -# How much timeout_propose increases with each round -timeout_propose_delta = "200ms" -# How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) -timeout_prevote = "100ms" -# How much the timeout_prevote increases with each round -timeout_prevote_delta = "200ms" -# How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) -timeout_precommit = "100ms" -# How much the timeout_precommit increases with each round -timeout_precommit_delta = "200ms" -# How long we wait after committing a block, before starting on the new -# height (this gives us a chance to receive some more precommits, even -# though we already have +2/3). -timeout_commit = "250ms" - -# How many blocks to look back to check existence of the node's consensus votes before joining consensus -# When non-zero, the node will panic upon restart -# if the same consensus key was used to sign {double_sign_check_height} last blocks. -# So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. -double_sign_check_height = 0 - -# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) -skip_timeout_commit = false - -# EmptyBlocks mode and possible interval between empty blocks -create_empty_blocks = true -create_empty_blocks_interval = "0s" - -# Reactor sleep duration parameters -peer_gossip_sleep_duration = "100ms" -peer_query_maj23_sleep_duration = "2s" - -####################################################### -### Storage Configuration Options ### -####################################################### -[storage] - -# Set to true to discard ABCI responses from the state store, which can save a -# considerable amount of disk space. Set to false to ensure ABCI responses are -# persisted. ABCI responses are required for /block_results RPC queries, and to -# reindex events in the command-line tool. -discard_abci_responses = false - -####################################################### -### Transaction Indexer Configuration Options ### -####################################################### -[tx_index] - -# What indexer to use for transactions -# -# The application will set which txs to index. In some cases a node operator will be able -# to decide which txs to index based on configuration set in the application. -# -# Options: -# 1) "null" -# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). -# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. -# 3) "psql" - the indexer services backed by PostgreSQL. -# When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. -indexer = "kv" - -# The PostgreSQL connection configuration, the connection format: -# postgresql://:@:/? -psql-conn = "" - -####################################################### -### Instrumentation Configuration Options ### -####################################################### -[instrumentation] - -# When true, Prometheus metrics are served under /metrics on -# PrometheusListenAddr. -# Check out the documentation for the list of available metrics. -prometheus = false - -# Address to listen for Prometheus collector(s) connections -prometheus_listen_addr = ":26660" - -# Maximum number of simultaneous connections. -# If you want to accept a larger number than the default, make sure -# you increase your OS limits. -# 0 - unlimited. -max_open_connections = 3 - -# Instrumentation namespace -namespace = "tendermint" diff --git a/localnode/comet/config/genesis.json b/localnode/comet/config/genesis.json deleted file mode 100644 index c21127ab..00000000 --- a/localnode/comet/config/genesis.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "genesis_time": "2023-05-23T18:35:27.386586Z", - "chain_id": "slay3r-local", - "initial_height": "0", - "consensus_params": { - "block": { - "max_bytes": "22020096", - "max_gas": "1000000000000" - }, - "evidence": { - "max_age_num_blocks": "100000", - "max_age_duration": "172800000000000", - "max_bytes": "1048576" - }, - "validator": { - "pub_key_types": [ - "ed25519" - ] - }, - "version": { - "app": "0" - } - }, - "validators": [ - { - "address": "8D7006AF50457DD53D913CA5B8260D553925E52E", - "pub_key": { - "type": "tendermint/PubKeyEd25519", - "value": "OzG8saDISr0s06nW0l/Hp/+dCJYbV3a07x6yAOSWuog=" - }, - "power": "10", - "name": "" - } - ], - "app_hash": "", - "app_state": { - "bank": [ - { - "address": "layer1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmt53rug", - "balance": [ - { - "amount": "4000000000", - "denom": "uslay" - } - ] - }, - { - "address": "layer10dyr9899g6t0pelew4nvf4j5c3jcgv0rwnkg3x", - "balance": [ - { - "amount": "4000000000", - "denom": "uslay" - } - ] - }, - { - "address": "layer1xy4yqngt0nlkdcenxymg8tenrghmek4ntzd2ty", - "balance": [ - { - "amount": "4000000000", - "denom": "uslay" - } - ] - }, - { - "address": "layer142u9fgcjdlycfcez3lw8x6x5h7rfjlnf8rc2n5", - "balance": [ - { - "amount": "4000000000", - "denom": "uslay" - } - ] - }, - { - "address": "layer1hsm76p4ahyhl5yh3ve9ur49r5kemhp2rl0wjq5", - "balance": [ - { - "amount": "4000000000", - "denom": "uslay" - } - ] - }, - { - "address": "layer1cjsxept9rkggzxztslae9ndgpdyt24080535rw", - "balance": [ - { - "amount": "1000000000", - "denom": "uslay" - } - ] - }, - { - "address": "layer1qyfn9l7w78kxcerwwwc6dpad305dulhk9jks0r", - "balance": [ - { - "amount": "2500000000", - "denom": "uslay" - } - ] - } - ], - "wasm": { - "gov_account": "layer1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmt53rug" - } - } -} \ No newline at end of file diff --git a/localnode/comet/config/node_key.json b/localnode/comet/config/node_key.json deleted file mode 100644 index 76f860c0..00000000 --- a/localnode/comet/config/node_key.json +++ /dev/null @@ -1 +0,0 @@ -{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"5M5UJOmCJBjgfkhvgKbt2iy2eSjx7vyV8voUuLKY3aFbYgVkbYN8j/rScOmgDVO4wSzdDPKNJx0xjMbHOD090g=="}} \ No newline at end of file diff --git a/localnode/comet/config/priv_validator_key.json b/localnode/comet/config/priv_validator_key.json deleted file mode 100644 index fb814c64..00000000 --- a/localnode/comet/config/priv_validator_key.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "address": "8D7006AF50457DD53D913CA5B8260D553925E52E", - "pub_key": { - "type": "tendermint/PubKeyEd25519", - "value": "OzG8saDISr0s06nW0l/Hp/+dCJYbV3a07x6yAOSWuog=" - }, - "priv_key": { - "type": "tendermint/PrivKeyEd25519", - "value": "9hrxzq4GNOvHp2sssZhLT4yYb0Z0fFsdye7lWx9NXQE7MbyxoMhKvSzTqdbSX8en/50IlhtXdrTvHrIA5Ja6iA==" - } -} \ No newline at end of file diff --git a/localnode/comet/data/priv_validator_state.json b/localnode/comet/data/priv_validator_state.json deleted file mode 100644 index 48f3b67e..00000000 --- a/localnode/comet/data/priv_validator_state.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "height": "0", - "round": 0, - "step": 0 -} \ No newline at end of file diff --git a/localnode/docker-compose.yml b/localnode/docker-compose.yml deleted file mode 100644 index bc739271..00000000 --- a/localnode/docker-compose.yml +++ /dev/null @@ -1,109 +0,0 @@ -# Usage: -# sudo ./scripts/build_docker.sh -# sudo ./scripts/reset_volumes.sh -# sudo docker compose up -# cd integration && npm ci && npm run test -# open http://localhost:8080 - -# http://localhost:26657 - Tendermint RPC -# http://localhost:9090 - gRPC -# http://localhost:1317 - "LCD" / "REST" -# http://localhost:8000 - Faucet - -# http://localhost:8080 - Jaeger UI -# http://localhost:9200 - Elastic Search API -# http://localhost:9200/_search - Check for data - - -volumes: - lay3r_data: - external: true - comet_data: - external: true - wasmatic_data: - external: true - -services: - slay3r: - image: "ghcr.io/lay3rlabs/slay3rd:0.5.0" - expose: - # abci server only for cometbft - - "26658" - ports: - # open grpc server - - "9090:9090" - volumes: - - lay3r_data:/root/.slay3r - command: ["slay3rd"] - depends_on: - - jaeger - environment: - - RUST_BACKTRACE=1 - - cometbft: - image: "cometbft/cometbft:v0.38.12" - expose: - # for slay3r grpc callbacks - - "26657" - environment: - - CMT_LOG_LEVEL = "mempool:debug,abci:debug,*:info" - ports: - - "26656:26656" - - "26657:26657" - command: ["start", "--proxy_app", "tcp://slay3r:26658"] - volumes: - - comet_data:/cometbft - depends_on: - - slay3r - - # Default all-memory Jaeger - jaeger: - image: jaegertracing/all-in-one:1.59 - expose: - - "6831/udp" - - "6832/udp" - - "14268" - ports: - - "8080:16686" - - gateway: - image: "ghcr.io/lay3rlabs/gateway:0.5.0" - ports: - # rest port - - "1317:1317" - # connect to the grpc endpoint on lay3r - command: ["/app", "-grpc-server-endpoint", "slay3r:9090"] - depends_on: - - slay3r - - # TODO: update this to the climb faucet - faucet: - image: "ghcr.io/lay3rlabs/faucet:latest" - # Setup based on https://github.com/cosmos/cosmjs/tree/main/packages/faucet#working-with-docker - env_file: - - ./faucet.env - environment: - - FAUCET_CONCURRENCY=3 - - FAUCET_ADDRESS_PREFIX=layer - - FAUCET_TOKENS=uslay - - FAUCET_GAS_PRICE=0.025uslay - ports: - - "8000:8000" - command: ["start", "http://cometbft:26657"] - depends_on: - - cometbft - restart: unless-stopped - profiles: [faucet] - - wasmatic: - image: "ghcr.io/lay3rlabs/wasmatic:0.1.0" - env_file: - - ./wasmatic.env - ports: - - "8081:8081" - depends_on: - - slay3r - - cometbft - profiles: [wasmatic] - volumes: - - wasmatic_data:/wasmatic diff --git a/localnode/faucet.env b/localnode/faucet.env deleted file mode 100644 index aaa478b4..00000000 --- a/localnode/faucet.env +++ /dev/null @@ -1 +0,0 @@ -FAUCET_MNEMONIC="economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone" diff --git a/localnode/jaeger-elastic-compose.yml b/localnode/jaeger-elastic-compose.yml deleted file mode 100644 index ca5f4577..00000000 --- a/localnode/jaeger-elastic-compose.yml +++ /dev/null @@ -1,94 +0,0 @@ -# docker compose -f docker-compose.yml -f jaeger-compose.yml up -# docker compose -f docker-compose.yml -f jaeger-compose.yml down - -# http://localhost:8080 - Jaeger UI -# http://localhost:9200 - Elastic Search API -# http://localhost:9200/_search - Check for data - -volumes: - esdata: - driver: local - -services: - elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:8.15.1 - ports: - - "127.0.0.1:9200:9200" - # - "127.0.0.1:9300:9300" - restart: on-failure - environment: - - cluster.name=jaeger-cluster - - discovery.type=single-node - - http.host=0.0.0.0 - - transport.host=127.0.0.1 - - ES_JAVA_OPTS=-Xms512m -Xmx512m - - xpack.security.enabled=false - volumes: - - esdata:/usr/share/elasticsearch/data - - # Optional ElasticSearch UI (on Port 5601 - click Discovery and create a view) - # kibana: - # image: docker.elastic.co/kibana/kibana:8.15.1 - # ports: - # - "127.0.0.1:5601:5601" - # restart: on-failure - - # Important to name this jaeger (not jaeger-collector) as this is the host slayerd is sending traces to - # Overrides the default all-in-one memory DB in the main docker-compose.yml - jaeger: - image: jaegertracing/jaeger-collector:1.59 - expose: !override - - "14269" - - "14268" - - "14267" - - "14250" - - "9411" - ports: !reset [] - restart: on-failure - environment: - - SPAN_STORAGE_TYPE=elasticsearch - command: [ - "--es.server-urls=http://elasticsearch:9200", - "--es.num-shards=1", - "--es.num-replicas=0", - "--log-level=error" - ] - depends_on: - - elasticsearch - - jaeger-agent: - image: jaegertracing/jaeger-agent:1.59 - hostname: jaeger-agent - command: ["--reporter.grpc.host-port=jaeger-collector:14250"] - expose: - - "5775/udp" - - "6831/udp" - - "6832/udp" - - "5778" - # ports: - # - "5775:5775/udp" - # - "6831:6831/udp" - # - "6832:6832/udp" - # - "5778:5778" - restart: on-failure - environment: - - SPAN_STORAGE_TYPE=elasticsearch - depends_on: - - jaeger - - jaeger-query: - image: jaegertracing/jaeger-query:1.59 - environment: - - SPAN_STORAGE_TYPE=elasticsearch - - no_proxy=localhost - ports: - - "8080:16686" - # - "16687:16687" - restart: on-failure - command: [ - "--es.server-urls=http://elasticsearch:9200", - "--span-storage.type=elasticsearch", - "--log-level=debug" - ] - depends_on: - - jaeger-agent diff --git a/localnode/reset_volumes.sh b/localnode/reset_volumes.sh deleted file mode 100755 index bf4b1452..00000000 --- a/localnode/reset_volumes.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -set -eux - -ALPINE="alpine:latest" - -SUDO="sudo" -if groups | grep -q docker; then - SUDO="" -fi - -SCRIPT_DIR="$(realpath "$(dirname "$0")")" - -# reset the elastic search data -ESDATA_VOL=localnode_esdata -$SUDO docker volume rm -f "$ESDATA_VOL" - - -ABCI_VOL=lay3r_data -$SUDO docker volume rm -f "$ABCI_VOL" -$SUDO docker volume create "$ABCI_VOL" - -# copy the data here -S=$($SUDO docker run --rm -d -v "$ABCI_VOL:/mnt" "$ALPINE" sleep 20) -$SUDO docker cp "$SCRIPT_DIR/abci/config" "$S:/mnt" -# register everything as root -$SUDO docker exec "$S" chown -R 0:0 /mnt -$SUDO docker exec "$S" ls -l /mnt/config -$SUDO docker kill "$S" - - -COMET_VOL=comet_data -$SUDO docker volume rm -f "$COMET_VOL" -$SUDO docker volume create "$COMET_VOL" - -# copy the data here -C=$($SUDO docker run --rm -d -v "$COMET_VOL:/mnt" "$ALPINE" sleep 20) -$SUDO docker cp "$SCRIPT_DIR/comet/config" "$C:/mnt" -$SUDO docker cp "$SCRIPT_DIR/comet/data" "$C:/mnt" -# register everything as tmuser -$SUDO docker exec "$C" chown -R 100:1000 /mnt -$SUDO docker exec "$C" ls -al /mnt -$SUDO docker exec "$C" ls -l /mnt/data -$SUDO docker kill "$C" - - -WASM_VOL=wasmatic_data -$SUDO docker volume rm -f "$WASM_VOL" -$SUDO docker volume create "$WASM_VOL" - -# copy the data here -W=$($SUDO docker run --rm -d -v "$WASM_VOL:/mnt" "$ALPINE" sleep 20) -$SUDO docker cp "$SCRIPT_DIR/wasmatic/"* "$W:/mnt" -# register everything as root -$SUDO docker exec "$W" chown -R 0:0 /mnt -$SUDO docker exec "$W" ls -l /mnt -$SUDO docker kill "$W" diff --git a/localnode/run.sh b/localnode/run.sh deleted file mode 100755 index 1e924c96..00000000 --- a/localnode/run.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -SCRIPT_DIR="$(realpath "$(dirname "$0")")" - -SUDO="sudo" -if groups | grep -q docker; then - SUDO="" -fi - -cd "$SCRIPT_DIR" -$SUDO docker compose --profile wasmatic up -d \ No newline at end of file diff --git a/localnode/run_all.sh b/localnode/run_all.sh deleted file mode 100755 index 79894457..00000000 --- a/localnode/run_all.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -SCRIPT_DIR="$(realpath "$(dirname "$0")")" - -SUDO="sudo" -if groups | grep -q docker; then - SUDO="" -fi - -cd "$SCRIPT_DIR" -$SUDO docker compose --profile faucet --profile wasmatic up -d diff --git a/localnode/run_elastic.sh b/localnode/run_elastic.sh deleted file mode 100755 index 4f13bf6e..00000000 --- a/localnode/run_elastic.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# Runs elastic search jaeger backend, but doesn't run the faucet - -SCRIPT_DIR="$(realpath "$(dirname "$0")")" - -SUDO="sudo" -if groups | grep -q docker; then - SUDO="" -fi - -cd "$SCRIPT_DIR" -$SUDO docker compose -f docker-compose.yml -f jaeger-elastic-compose.yml up -d - -# Increase size of tags to be indexed, so that large values like "tx" can be searched -echo -n "Increasing tag size..." - -SPAN_INDEX=$(until curl http://localhost:9200/_cat/indices 2> /dev/null | grep span | cut -d " " -f3 | grep -m 1 "jaeger-span-"; do sleep 1 ; done) - -curl -sX PUT "localhost:9200/$SPAN_INDEX/_mapping?pretty" -H 'Content-Type: application/json' -d '{"dynamic_templates": [{"span_tags_map": {"path_match": "tag.*","mapping": {"ignore_above": 2048,"type": "keyword"}}}],"properties": {"tags": {"type": "nested","dynamic": "false","properties": {"key": {"type": "keyword","ignore_above": 2048},"tagType": {"type": "keyword","ignore_above": 2048},"value": {"type": "keyword","ignore_above": 2048}}}}}' > /dev/null - -echo " done!" diff --git a/localnode/stop.sh b/localnode/stop.sh deleted file mode 100755 index 4608a1ae..00000000 --- a/localnode/stop.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -SCRIPT_DIR="$(realpath "$(dirname "$0")")" - -SUDO="sudo" -if groups | grep -q docker; then - SUDO="" -fi - -cd "$SCRIPT_DIR" -# maybe overkill (if we just did run.sh) but it will ensure we stop everything -$SUDO docker compose -f docker-compose.yml -f jaeger-elastic-compose.yml \ - --profile faucet --profile wasmatic down diff --git a/localnode/wasmatic.env b/localnode/wasmatic.env deleted file mode 100644 index 612947de..00000000 --- a/localnode/wasmatic.env +++ /dev/null @@ -1,4 +0,0 @@ -LOCAL_MNEMONIC="renew clinic elegant pulp prepare bean bitter circle dove apart solution acid follow modify keep high monster also sun zone seminar under tomato vote" -TESTNET_MNEMONIC="renew clinic elegant pulp prepare bean bitter circle dove apart solution acid follow modify keep high monster also sun zone seminar under tomato vote" - -WASMATIC_ADDRESS="layer1qyfn9l7w78kxcerwwwc6dpad305dulhk9jks0r" \ No newline at end of file diff --git a/localnode/wasmatic/wasmatic.toml b/localnode/wasmatic/wasmatic.toml deleted file mode 100644 index cac3e5c9..00000000 --- a/localnode/wasmatic/wasmatic.toml +++ /dev/null @@ -1,12 +0,0 @@ -bind = "0.0.0.0:8081" -dir = "data" -envs = [ - ["VERSION", "0.0.1"], -] - -chain_kind = "local" -grpc_url = "http://slay3r:9090" -chain_id = "slay3r-local" -gas_denom = "uslay" -gas_price = 0.01 -cors_allowed_origins = ["http://127.0.0.1", "http://localhost", "https://lay3rlabs.github.io"] \ No newline at end of file diff --git a/packages/abci/Cargo.toml b/packages/comet/abci/Cargo.toml similarity index 100% rename from packages/abci/Cargo.toml rename to packages/comet/abci/Cargo.toml diff --git a/packages/abci/README.md b/packages/comet/abci/README.md similarity index 100% rename from packages/abci/README.md rename to packages/comet/abci/README.md diff --git a/packages/abci/src/application.rs b/packages/comet/abci/src/application.rs similarity index 100% rename from packages/abci/src/application.rs rename to packages/comet/abci/src/application.rs diff --git a/packages/abci/src/codec.rs b/packages/comet/abci/src/codec.rs similarity index 100% rename from packages/abci/src/codec.rs rename to packages/comet/abci/src/codec.rs diff --git a/packages/abci/src/error.rs b/packages/comet/abci/src/error.rs similarity index 100% rename from packages/abci/src/error.rs rename to packages/comet/abci/src/error.rs diff --git a/packages/abci/src/lib.rs b/packages/comet/abci/src/lib.rs similarity index 100% rename from packages/abci/src/lib.rs rename to packages/comet/abci/src/lib.rs diff --git a/packages/abci/src/server.rs b/packages/comet/abci/src/server.rs similarity index 100% rename from packages/abci/src/server.rs rename to packages/comet/abci/src/server.rs diff --git a/packages/std/Cargo.toml b/packages/core/std/Cargo.toml similarity index 100% rename from packages/std/Cargo.toml rename to packages/core/std/Cargo.toml diff --git a/packages/std/src/account_id.rs b/packages/core/std/src/account_id.rs similarity index 100% rename from packages/std/src/account_id.rs rename to packages/core/std/src/account_id.rs diff --git a/packages/std/src/api/block.rs b/packages/core/std/src/api/block.rs similarity index 100% rename from packages/std/src/api/block.rs rename to packages/core/std/src/api/block.rs diff --git a/packages/std/src/api/consensus.rs b/packages/core/std/src/api/consensus.rs similarity index 100% rename from packages/std/src/api/consensus.rs rename to packages/core/std/src/api/consensus.rs diff --git a/packages/std/src/api/init.rs b/packages/core/std/src/api/init.rs similarity index 100% rename from packages/std/src/api/init.rs rename to packages/core/std/src/api/init.rs diff --git a/packages/std/src/api/mod.rs b/packages/core/std/src/api/mod.rs similarity index 100% rename from packages/std/src/api/mod.rs rename to packages/core/std/src/api/mod.rs diff --git a/packages/std/src/api/tx.rs b/packages/core/std/src/api/tx.rs similarity index 100% rename from packages/std/src/api/tx.rs rename to packages/core/std/src/api/tx.rs diff --git a/packages/std/src/api/validator.rs b/packages/core/std/src/api/validator.rs similarity index 100% rename from packages/std/src/api/validator.rs rename to packages/core/std/src/api/validator.rs diff --git a/packages/std/src/encode.rs b/packages/core/std/src/encode.rs similarity index 100% rename from packages/std/src/encode.rs rename to packages/core/std/src/encode.rs diff --git a/packages/std/src/gas.rs b/packages/core/std/src/gas.rs similarity index 100% rename from packages/std/src/gas.rs rename to packages/core/std/src/gas.rs diff --git a/packages/std/src/lib.rs b/packages/core/std/src/lib.rs similarity index 100% rename from packages/std/src/lib.rs rename to packages/core/std/src/lib.rs diff --git a/packages/std/src/msg.rs b/packages/core/std/src/msg.rs similarity index 100% rename from packages/std/src/msg.rs rename to packages/core/std/src/msg.rs diff --git a/packages/std/src/pubkey.rs b/packages/core/std/src/pubkey.rs similarity index 100% rename from packages/std/src/pubkey.rs rename to packages/core/std/src/pubkey.rs diff --git a/packages/std/src/query.rs b/packages/core/std/src/query.rs similarity index 100% rename from packages/std/src/query.rs rename to packages/core/std/src/query.rs diff --git a/packages/std/src/root.rs b/packages/core/std/src/root.rs similarity index 100% rename from packages/std/src/root.rs rename to packages/core/std/src/root.rs diff --git a/packages/std/src/time.rs b/packages/core/std/src/time.rs similarity index 100% rename from packages/std/src/time.rs rename to packages/core/std/src/time.rs diff --git a/packages/std/src/tx.rs b/packages/core/std/src/tx.rs similarity index 100% rename from packages/std/src/tx.rs rename to packages/core/std/src/tx.rs diff --git a/packages/std/src/utils.rs b/packages/core/std/src/utils.rs similarity index 100% rename from packages/std/src/utils.rs rename to packages/core/std/src/utils.rs diff --git a/packages/storage/Cargo.toml b/packages/core/storage/Cargo.toml similarity index 100% rename from packages/storage/Cargo.toml rename to packages/core/storage/Cargo.toml diff --git a/packages/storage/src/app_meter.rs b/packages/core/storage/src/app_meter.rs similarity index 100% rename from packages/storage/src/app_meter.rs rename to packages/core/storage/src/app_meter.rs diff --git a/packages/storage/src/fast_hash.rs b/packages/core/storage/src/fast_hash.rs similarity index 100% rename from packages/storage/src/fast_hash.rs rename to packages/core/storage/src/fast_hash.rs diff --git a/packages/storage/src/lib.rs b/packages/core/storage/src/lib.rs similarity index 100% rename from packages/storage/src/lib.rs rename to packages/core/storage/src/lib.rs diff --git a/packages/storage/src/memory/mod.rs b/packages/core/storage/src/memory/mod.rs similarity index 100% rename from packages/storage/src/memory/mod.rs rename to packages/core/storage/src/memory/mod.rs diff --git a/packages/storage/src/memory/store.rs b/packages/core/storage/src/memory/store.rs similarity index 100% rename from packages/storage/src/memory/store.rs rename to packages/core/storage/src/memory/store.rs diff --git a/packages/storage/src/plus/README.md b/packages/core/storage/src/plus/README.md similarity index 100% rename from packages/storage/src/plus/README.md rename to packages/core/storage/src/plus/README.md diff --git a/packages/storage/src/plus/error.rs b/packages/core/storage/src/plus/error.rs similarity index 100% rename from packages/storage/src/plus/error.rs rename to packages/core/storage/src/plus/error.rs diff --git a/packages/storage/src/plus/helpers.rs b/packages/core/storage/src/plus/helpers.rs similarity index 100% rename from packages/storage/src/plus/helpers.rs rename to packages/core/storage/src/plus/helpers.rs diff --git a/packages/storage/src/plus/item.rs b/packages/core/storage/src/plus/item.rs similarity index 100% rename from packages/storage/src/plus/item.rs rename to packages/core/storage/src/plus/item.rs diff --git a/packages/storage/src/plus/iter_helpers.rs b/packages/core/storage/src/plus/iter_helpers.rs similarity index 100% rename from packages/storage/src/plus/iter_helpers.rs rename to packages/core/storage/src/plus/iter_helpers.rs diff --git a/packages/storage/src/plus/map.rs b/packages/core/storage/src/plus/map.rs similarity index 100% rename from packages/storage/src/plus/map.rs rename to packages/core/storage/src/plus/map.rs diff --git a/packages/storage/src/plus/mod.rs b/packages/core/storage/src/plus/mod.rs similarity index 100% rename from packages/storage/src/plus/mod.rs rename to packages/core/storage/src/plus/mod.rs diff --git a/packages/storage/src/plus/path.rs b/packages/core/storage/src/plus/path.rs similarity index 100% rename from packages/storage/src/plus/path.rs rename to packages/core/storage/src/plus/path.rs diff --git a/packages/storage/src/plus/prefix.rs b/packages/core/storage/src/plus/prefix.rs similarity index 100% rename from packages/storage/src/plus/prefix.rs rename to packages/core/storage/src/plus/prefix.rs diff --git a/packages/storage/src/prefixed_storage/length_prefixed.rs b/packages/core/storage/src/prefixed_storage/length_prefixed.rs similarity index 100% rename from packages/storage/src/prefixed_storage/length_prefixed.rs rename to packages/core/storage/src/prefixed_storage/length_prefixed.rs diff --git a/packages/storage/src/prefixed_storage/mod.rs b/packages/core/storage/src/prefixed_storage/mod.rs similarity index 100% rename from packages/storage/src/prefixed_storage/mod.rs rename to packages/core/storage/src/prefixed_storage/mod.rs diff --git a/packages/storage/src/prefixed_storage/namespace_helpers.rs b/packages/core/storage/src/prefixed_storage/namespace_helpers.rs similarity index 100% rename from packages/storage/src/prefixed_storage/namespace_helpers.rs rename to packages/core/storage/src/prefixed_storage/namespace_helpers.rs diff --git a/packages/storage/src/prices.rs b/packages/core/storage/src/prices.rs similarity index 100% rename from packages/storage/src/prices.rs rename to packages/core/storage/src/prices.rs diff --git a/packages/storage/src/rocks/mod.rs b/packages/core/storage/src/rocks/mod.rs similarity index 100% rename from packages/storage/src/rocks/mod.rs rename to packages/core/storage/src/rocks/mod.rs diff --git a/packages/storage/src/traits.rs b/packages/core/storage/src/traits.rs similarity index 100% rename from packages/storage/src/traits.rs rename to packages/core/storage/src/traits.rs diff --git a/packages/storage/src/wrap/mod.rs b/packages/core/storage/src/wrap/mod.rs similarity index 100% rename from packages/storage/src/wrap/mod.rs rename to packages/core/storage/src/wrap/mod.rs diff --git a/packages/storage/src/wrap/reader_wrap.rs b/packages/core/storage/src/wrap/reader_wrap.rs similarity index 100% rename from packages/storage/src/wrap/reader_wrap.rs rename to packages/core/storage/src/wrap/reader_wrap.rs diff --git a/packages/storage/src/wrap/scratch_tx.rs b/packages/core/storage/src/wrap/scratch_tx.rs similarity index 100% rename from packages/storage/src/wrap/scratch_tx.rs rename to packages/core/storage/src/wrap/scratch_tx.rs diff --git a/packages/storage/src/wrap/sub_tx.rs b/packages/core/storage/src/wrap/sub_tx.rs similarity index 100% rename from packages/storage/src/wrap/sub_tx.rs rename to packages/core/storage/src/wrap/sub_tx.rs diff --git a/packages/storage/src/wrap/weak_sub_tx.rs b/packages/core/storage/src/wrap/weak_sub_tx.rs similarity index 100% rename from packages/storage/src/wrap/weak_sub_tx.rs rename to packages/core/storage/src/wrap/weak_sub_tx.rs diff --git a/packages/cosmos/Cargo.toml b/packages/cosmossdk/cosmos/Cargo.toml similarity index 100% rename from packages/cosmos/Cargo.toml rename to packages/cosmossdk/cosmos/Cargo.toml diff --git a/packages/cosmos/src/error.rs b/packages/cosmossdk/cosmos/src/error.rs similarity index 100% rename from packages/cosmos/src/error.rs rename to packages/cosmossdk/cosmos/src/error.rs diff --git a/packages/cosmos/src/legacy.rs b/packages/cosmossdk/cosmos/src/legacy.rs similarity index 100% rename from packages/cosmos/src/legacy.rs rename to packages/cosmossdk/cosmos/src/legacy.rs diff --git a/packages/cosmos/src/lib.rs b/packages/cosmossdk/cosmos/src/lib.rs similarity index 100% rename from packages/cosmos/src/lib.rs rename to packages/cosmossdk/cosmos/src/lib.rs diff --git a/packages/cosmos/src/msg.rs b/packages/cosmossdk/cosmos/src/msg.rs similarity index 100% rename from packages/cosmos/src/msg.rs rename to packages/cosmossdk/cosmos/src/msg.rs diff --git a/packages/cosmos/src/pubkey.rs b/packages/cosmossdk/cosmos/src/pubkey.rs similarity index 100% rename from packages/cosmos/src/pubkey.rs rename to packages/cosmossdk/cosmos/src/pubkey.rs diff --git a/packages/cosmos/src/query.rs b/packages/cosmossdk/cosmos/src/query.rs similarity index 100% rename from packages/cosmos/src/query.rs rename to packages/cosmossdk/cosmos/src/query.rs diff --git a/packages/cosmos/src/tx.rs b/packages/cosmossdk/cosmos/src/tx.rs similarity index 100% rename from packages/cosmos/src/tx.rs rename to packages/cosmossdk/cosmos/src/tx.rs diff --git a/packages/cosmos/src/unzip.rs b/packages/cosmossdk/cosmos/src/unzip.rs similarity index 100% rename from packages/cosmos/src/unzip.rs rename to packages/cosmossdk/cosmos/src/unzip.rs diff --git a/packages/cosmos/src/utils.rs b/packages/cosmossdk/cosmos/src/utils.rs similarity index 100% rename from packages/cosmos/src/utils.rs rename to packages/cosmossdk/cosmos/src/utils.rs diff --git a/packages/golem/Cargo.toml b/packages/cosmossdk/golem/Cargo.toml similarity index 100% rename from packages/golem/Cargo.toml rename to packages/cosmossdk/golem/Cargo.toml diff --git a/packages/golem/src/builder.rs b/packages/cosmossdk/golem/src/builder.rs similarity index 100% rename from packages/golem/src/builder.rs rename to packages/cosmossdk/golem/src/builder.rs diff --git a/packages/golem/src/core.rs b/packages/cosmossdk/golem/src/core.rs similarity index 100% rename from packages/golem/src/core.rs rename to packages/cosmossdk/golem/src/core.rs diff --git a/packages/golem/src/lib.rs b/packages/cosmossdk/golem/src/lib.rs similarity index 100% rename from packages/golem/src/lib.rs rename to packages/cosmossdk/golem/src/lib.rs diff --git a/packages/golem/src/query.rs b/packages/cosmossdk/golem/src/query.rs similarity index 100% rename from packages/golem/src/query.rs rename to packages/cosmossdk/golem/src/query.rs diff --git a/packages/golem/src/query/bank.rs b/packages/cosmossdk/golem/src/query/bank.rs similarity index 100% rename from packages/golem/src/query/bank.rs rename to packages/cosmossdk/golem/src/query/bank.rs diff --git a/packages/golem/src/query/node.rs b/packages/cosmossdk/golem/src/query/node.rs similarity index 100% rename from packages/golem/src/query/node.rs rename to packages/cosmossdk/golem/src/query/node.rs diff --git a/packages/golem/src/query/wasm.rs b/packages/cosmossdk/golem/src/query/wasm.rs similarity index 100% rename from packages/golem/src/query/wasm.rs rename to packages/cosmossdk/golem/src/query/wasm.rs diff --git a/packages/golem/src/signer.rs b/packages/cosmossdk/golem/src/signer.rs similarity index 100% rename from packages/golem/src/signer.rs rename to packages/cosmossdk/golem/src/signer.rs diff --git a/packages/golem/src/state.rs b/packages/cosmossdk/golem/src/state.rs similarity index 100% rename from packages/golem/src/state.rs rename to packages/cosmossdk/golem/src/state.rs diff --git a/packages/proto/Cargo.toml b/packages/cosmossdk/proto/Cargo.toml similarity index 100% rename from packages/proto/Cargo.toml rename to packages/cosmossdk/proto/Cargo.toml diff --git a/packages/proto/README.md b/packages/cosmossdk/proto/README.md similarity index 100% rename from packages/proto/README.md rename to packages/cosmossdk/proto/README.md diff --git a/packages/proto/examples/sync_test.rs b/packages/cosmossdk/proto/examples/sync_test.rs similarity index 100% rename from packages/proto/examples/sync_test.rs rename to packages/cosmossdk/proto/examples/sync_test.rs diff --git a/packages/proto/src/extensions.rs b/packages/cosmossdk/proto/src/extensions.rs similarity index 100% rename from packages/proto/src/extensions.rs rename to packages/cosmossdk/proto/src/extensions.rs diff --git a/packages/proto/src/lib.rs b/packages/cosmossdk/proto/src/lib.rs similarity index 100% rename from packages/proto/src/lib.rs rename to packages/cosmossdk/proto/src/lib.rs diff --git a/packages/proto/src/protos.rs b/packages/cosmossdk/proto/src/protos.rs similarity index 100% rename from packages/proto/src/protos.rs rename to packages/cosmossdk/proto/src/protos.rs diff --git a/packages/proto/src/protos/cosmos.auth.v1beta1.rs b/packages/cosmossdk/proto/src/protos/cosmos.auth.v1beta1.rs similarity index 100% rename from packages/proto/src/protos/cosmos.auth.v1beta1.rs rename to packages/cosmossdk/proto/src/protos/cosmos.auth.v1beta1.rs index cafc3441..d05338bd 100644 --- a/packages/proto/src/protos/cosmos.auth.v1beta1.rs +++ b/packages/cosmossdk/proto/src/protos/cosmos.auth.v1beta1.rs @@ -37,6 +37,16 @@ pub struct Params { #[prost(uint64, tag = "5")] pub sig_verify_cost_secp256k1: u64, } +/// GenesisState defines the auth module's genesis state. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenesisState { + /// params defines all the paramaters of the module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, + /// accounts are the accounts present at genesis. + #[prost(message, repeated, tag = "2")] + pub accounts: ::prost::alloc::vec::Vec, +} /// QueryAccountsRequest is the request type for the Query/Accounts RPC method. /// /// Since: cosmos-sdk 0.43 @@ -631,13 +641,3 @@ pub mod query_server { const NAME: &'static str = SERVICE_NAME; } } -/// GenesisState defines the auth module's genesis state. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// params defines all the paramaters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// accounts are the accounts present at genesis. - #[prost(message, repeated, tag = "2")] - pub accounts: ::prost::alloc::vec::Vec, -} diff --git a/packages/proto/src/protos/cosmos.bank.v1beta1.rs b/packages/cosmossdk/proto/src/protos/cosmos.bank.v1beta1.rs similarity index 100% rename from packages/proto/src/protos/cosmos.bank.v1beta1.rs rename to packages/cosmossdk/proto/src/protos/cosmos.bank.v1beta1.rs diff --git a/packages/proto/src/protos/cosmos.base.abci.v1beta1.rs b/packages/cosmossdk/proto/src/protos/cosmos.base.abci.v1beta1.rs similarity index 100% rename from packages/proto/src/protos/cosmos.base.abci.v1beta1.rs rename to packages/cosmossdk/proto/src/protos/cosmos.base.abci.v1beta1.rs diff --git a/packages/proto/src/protos/cosmos.base.query.v1beta1.rs b/packages/cosmossdk/proto/src/protos/cosmos.base.query.v1beta1.rs similarity index 100% rename from packages/proto/src/protos/cosmos.base.query.v1beta1.rs rename to packages/cosmossdk/proto/src/protos/cosmos.base.query.v1beta1.rs diff --git a/packages/proto/src/protos/cosmos.base.tendermint.v1beta1.rs b/packages/cosmossdk/proto/src/protos/cosmos.base.tendermint.v1beta1.rs similarity index 100% rename from packages/proto/src/protos/cosmos.base.tendermint.v1beta1.rs rename to packages/cosmossdk/proto/src/protos/cosmos.base.tendermint.v1beta1.rs diff --git a/packages/proto/src/protos/cosmos.base.v1beta1.rs b/packages/cosmossdk/proto/src/protos/cosmos.base.v1beta1.rs similarity index 100% rename from packages/proto/src/protos/cosmos.base.v1beta1.rs rename to packages/cosmossdk/proto/src/protos/cosmos.base.v1beta1.rs diff --git a/packages/proto/src/protos/cosmos.crypto.ed25519.rs b/packages/cosmossdk/proto/src/protos/cosmos.crypto.ed25519.rs similarity index 100% rename from packages/proto/src/protos/cosmos.crypto.ed25519.rs rename to packages/cosmossdk/proto/src/protos/cosmos.crypto.ed25519.rs diff --git a/packages/proto/src/protos/cosmos.crypto.secp256k1.rs b/packages/cosmossdk/proto/src/protos/cosmos.crypto.secp256k1.rs similarity index 100% rename from packages/proto/src/protos/cosmos.crypto.secp256k1.rs rename to packages/cosmossdk/proto/src/protos/cosmos.crypto.secp256k1.rs diff --git a/packages/proto/src/protos/cosmos.tx.signing.v1beta1.rs b/packages/cosmossdk/proto/src/protos/cosmos.tx.signing.v1beta1.rs similarity index 100% rename from packages/proto/src/protos/cosmos.tx.signing.v1beta1.rs rename to packages/cosmossdk/proto/src/protos/cosmos.tx.signing.v1beta1.rs diff --git a/packages/proto/src/protos/cosmos.tx.v1beta1.rs b/packages/cosmossdk/proto/src/protos/cosmos.tx.v1beta1.rs similarity index 100% rename from packages/proto/src/protos/cosmos.tx.v1beta1.rs rename to packages/cosmossdk/proto/src/protos/cosmos.tx.v1beta1.rs diff --git a/packages/proto/src/protos/cosmwasm.wasm.v1.rs b/packages/cosmossdk/proto/src/protos/cosmwasm.wasm.v1.rs similarity index 100% rename from packages/proto/src/protos/cosmwasm.wasm.v1.rs rename to packages/cosmossdk/proto/src/protos/cosmwasm.wasm.v1.rs index 60d46f00..ad2c7285 100644 --- a/packages/proto/src/protos/cosmwasm.wasm.v1.rs +++ b/packages/cosmossdk/proto/src/protos/cosmwasm.wasm.v1.rs @@ -1053,6 +1053,74 @@ pub mod msg_server { const NAME: &'static str = SERVICE_NAME; } } +/// MsgIBCSend +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgIbcSend { + /// the channel by which the packet will be sent + #[prost(string, tag = "2")] + pub channel: ::prost::alloc::string::String, + /// Timeout height relative to the current block height. + /// The timeout is disabled when set to 0. + #[prost(uint64, tag = "4")] + pub timeout_height: u64, + /// Timeout timestamp (in nanoseconds) relative to the current block timestamp. + /// The timeout is disabled when set to 0. + #[prost(uint64, tag = "5")] + pub timeout_timestamp: u64, + /// Data is the payload to transfer. We must not make assumption what format or + /// content is in here. + #[prost(bytes = "vec", tag = "6")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgIBCCloseChannel port and channel need to be owned by the contract +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgIbcCloseChannel { + #[prost(string, tag = "2")] + pub channel: ::prost::alloc::string::String, +} +/// GenesisState - genesis state of x/wasm +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenesisState { + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, + #[prost(message, repeated, tag = "2")] + pub codes: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "3")] + pub contracts: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub sequences: ::prost::alloc::vec::Vec, +} +/// Code struct encompasses CodeInfo and CodeBytes +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Code { + #[prost(uint64, tag = "1")] + pub code_id: u64, + #[prost(message, optional, tag = "2")] + pub code_info: ::core::option::Option, + #[prost(bytes = "vec", tag = "3")] + pub code_bytes: ::prost::alloc::vec::Vec, + /// Pinned to wasmvm cache + #[prost(bool, tag = "4")] + pub pinned: bool, +} +/// Contract struct encompasses ContractAddress, ContractInfo, and ContractState +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Contract { + #[prost(string, tag = "1")] + pub contract_address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub contract_info: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub contract_state: ::prost::alloc::vec::Vec, +} +/// Sequence key and value of an id generation counter +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Sequence { + #[prost(bytes = "vec", tag = "1")] + pub id_key: ::prost::alloc::vec::Vec, + #[prost(uint64, tag = "2")] + pub value: u64, +} /// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC /// method #[derive(Clone, PartialEq, ::prost::Message)] @@ -2258,71 +2326,3 @@ pub mod query_server { const NAME: &'static str = SERVICE_NAME; } } -/// GenesisState - genesis state of x/wasm -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub codes: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "3")] - pub contracts: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "4")] - pub sequences: ::prost::alloc::vec::Vec, -} -/// Code struct encompasses CodeInfo and CodeBytes -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Code { - #[prost(uint64, tag = "1")] - pub code_id: u64, - #[prost(message, optional, tag = "2")] - pub code_info: ::core::option::Option, - #[prost(bytes = "vec", tag = "3")] - pub code_bytes: ::prost::alloc::vec::Vec, - /// Pinned to wasmvm cache - #[prost(bool, tag = "4")] - pub pinned: bool, -} -/// Contract struct encompasses ContractAddress, ContractInfo, and ContractState -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Contract { - #[prost(string, tag = "1")] - pub contract_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub contract_info: ::core::option::Option, - #[prost(message, repeated, tag = "3")] - pub contract_state: ::prost::alloc::vec::Vec, -} -/// Sequence key and value of an id generation counter -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Sequence { - #[prost(bytes = "vec", tag = "1")] - pub id_key: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "2")] - pub value: u64, -} -/// MsgIBCSend -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgIbcSend { - /// the channel by which the packet will be sent - #[prost(string, tag = "2")] - pub channel: ::prost::alloc::string::String, - /// Timeout height relative to the current block height. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "4")] - pub timeout_height: u64, - /// Timeout timestamp (in nanoseconds) relative to the current block timestamp. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "5")] - pub timeout_timestamp: u64, - /// Data is the payload to transfer. We must not make assumption what format or - /// content is in here. - #[prost(bytes = "vec", tag = "6")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgIBCCloseChannel port and channel need to be owned by the contract -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgIbcCloseChannel { - #[prost(string, tag = "2")] - pub channel: ::prost::alloc::string::String, -} diff --git a/packages/proto/src/protos/google.api.rs b/packages/cosmossdk/proto/src/protos/google.api.rs similarity index 100% rename from packages/proto/src/protos/google.api.rs rename to packages/cosmossdk/proto/src/protos/google.api.rs diff --git a/packages/proto/src/protos/google.protobuf.rs b/packages/cosmossdk/proto/src/protos/google.protobuf.rs similarity index 100% rename from packages/proto/src/protos/google.protobuf.rs rename to packages/cosmossdk/proto/src/protos/google.protobuf.rs index fa8ea542..5da2cbcc 100644 --- a/packages/proto/src/protos/google.protobuf.rs +++ b/packages/cosmossdk/proto/src/protos/google.protobuf.rs @@ -1,126 +1,4 @@ // This file is @generated by prost-build. -/// `Any` contains an arbitrary serialized protocol buffer message along with a -/// URL that describes the type of the serialized message. -/// -/// Protobuf library provides support to pack/unpack Any values in the form -/// of utility functions or additional generated methods of the Any type. -/// -/// Example 1: Pack and unpack a message in C++. -/// -/// Foo foo = ...; -/// Any any; -/// any.PackFrom(foo); -/// ... -/// if (any.UnpackTo(&foo)) { -/// ... -/// } -/// -/// Example 2: Pack and unpack a message in Java. -/// -/// Foo foo = ...; -/// Any any = Any.pack(foo); -/// ... -/// if (any.is(Foo.class)) { -/// foo = any.unpack(Foo.class); -/// } -/// // or ... -/// if (any.isSameTypeAs(Foo.getDefaultInstance())) { -/// foo = any.unpack(Foo.getDefaultInstance()); -/// } -/// -/// Example 3: Pack and unpack a message in Python. -/// -/// foo = Foo(...) -/// any = Any() -/// any.Pack(foo) -/// ... -/// if any.Is(Foo.DESCRIPTOR): -/// any.Unpack(foo) -/// ... -/// -/// Example 4: Pack and unpack a message in Go -/// -/// foo := &pb.Foo{...} -/// any, err := anypb.New(foo) -/// if err != nil { -/// ... -/// } -/// ... -/// foo := &pb.Foo{} -/// if err := any.UnmarshalTo(foo); err != nil { -/// ... -/// } -/// -/// The pack methods provided by protobuf library will by default use -/// 'type.googleapis.com/full.type.name' as the type URL and the unpack -/// methods only use the fully qualified type name after the last '/' -/// in the type URL, for example "foo.bar.com/x/y.z" will yield type -/// name "y.z". -/// -/// JSON -/// ==== -/// The JSON representation of an `Any` value uses the regular -/// representation of the deserialized, embedded message, with an -/// additional field `@type` which contains the type URL. Example: -/// -/// package google.profile; -/// message Person { -/// string first_name = 1; -/// string last_name = 2; -/// } -/// -/// { -/// "@type": "type.googleapis.com/google.profile.Person", -/// "firstName": , -/// "lastName": -/// } -/// -/// If the embedded message type is well-known and has a custom JSON -/// representation, that representation will be embedded adding a field -/// `value` which holds the custom JSON in addition to the `@type` -/// field. Example (for message [google.protobuf.Duration][]): -/// -/// { -/// "@type": "type.googleapis.com/google.protobuf.Duration", -/// "value": "1.212s" -/// } -/// -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Any { - /// A URL/resource name that uniquely identifies the type of the serialized - /// protocol buffer message. This string must contain at least - /// one "/" character. The last segment of the URL's path must represent - /// the fully qualified name of the type (as in - /// `path/google.protobuf.Duration`). The name should be in a canonical form - /// (e.g., leading "." is not accepted). - /// - /// In practice, teams usually precompile into the binary all types that they - /// expect it to use in the context of Any. However, for URLs which use the - /// scheme `http`, `https`, or no scheme, one can optionally set up a type - /// server that maps type URLs to message definitions as follows: - /// - /// * If no scheme is provided, `https` is assumed. - /// * An HTTP GET on the URL must yield a [google.protobuf.Type][] - /// value in binary format, or produce an error. - /// * Applications are allowed to cache lookup results based on the - /// URL, or have them precompiled into a binary to avoid any - /// lookup. Therefore, binary compatibility needs to be preserved - /// on changes to types. (Use versioned type names to manage - /// breaking changes.) - /// - /// Note: this functionality is not currently available in the official - /// protobuf release, and it is not used for type URLs beginning with - /// type.googleapis.com. - /// - /// Schemes other than `http`, `https` (or the empty scheme) might be - /// used with implementation specific semantics. - /// - #[prost(string, tag = "1")] - pub type_url: ::prost::alloc::string::String, - /// Must be a valid serialized protocol buffer of the above specified type. - #[prost(bytes = "vec", tag = "2")] - pub value: ::prost::alloc::vec::Vec, -} /// The protocol compiler can output a FileDescriptorSet containing the .proto /// files it parses. #[derive(Clone, PartialEq, ::prost::Message)] @@ -1536,6 +1414,203 @@ pub mod generated_code_info { } } } +/// A Duration represents a signed, fixed-length span of time represented +/// as a count of seconds and fractions of seconds at nanosecond +/// resolution. It is independent of any calendar and concepts like "day" +/// or "month". It is related to Timestamp in that the difference between +/// two Timestamp values is a Duration and it can be added or subtracted +/// from a Timestamp. Range is approximately +-10,000 years. +/// +/// # Examples +/// +/// Example 1: Compute Duration from two Timestamps in pseudo code. +/// +/// Timestamp start = ...; +/// Timestamp end = ...; +/// Duration duration = ...; +/// +/// duration.seconds = end.seconds - start.seconds; +/// duration.nanos = end.nanos - start.nanos; +/// +/// if (duration.seconds < 0 && duration.nanos > 0) { +/// duration.seconds += 1; +/// duration.nanos -= 1000000000; +/// } else if (duration.seconds > 0 && duration.nanos < 0) { +/// duration.seconds -= 1; +/// duration.nanos += 1000000000; +/// } +/// +/// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +/// +/// Timestamp start = ...; +/// Duration duration = ...; +/// Timestamp end = ...; +/// +/// end.seconds = start.seconds + duration.seconds; +/// end.nanos = start.nanos + duration.nanos; +/// +/// if (end.nanos < 0) { +/// end.seconds -= 1; +/// end.nanos += 1000000000; +/// } else if (end.nanos >= 1000000000) { +/// end.seconds += 1; +/// end.nanos -= 1000000000; +/// } +/// +/// Example 3: Compute Duration from datetime.timedelta in Python. +/// +/// td = datetime.timedelta(days=3, minutes=10) +/// duration = Duration() +/// duration.FromTimedelta(td) +/// +/// # JSON Mapping +/// +/// In JSON format, the Duration type is encoded as a string rather than an +/// object, where the string ends in the suffix "s" (indicating seconds) and +/// is preceded by the number of seconds, with nanoseconds expressed as +/// fractional seconds. For example, 3 seconds with 0 nanoseconds should be +/// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should +/// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 +/// microsecond should be expressed in JSON format as "3.000001s". +/// +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct Duration { + /// Signed seconds of the span of time. Must be from -315,576,000,000 + /// to +315,576,000,000 inclusive. Note: these bounds are computed from: + /// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + #[prost(int64, tag = "1")] + pub seconds: i64, + /// Signed fractions of a second at nanosecond resolution of the span + /// of time. Durations less than one second are represented with a 0 + /// `seconds` field and a positive or negative `nanos` field. For durations + /// of one second or more, a non-zero value for the `nanos` field must be + /// of the same sign as the `seconds` field. Must be from -999,999,999 + /// to +999,999,999 inclusive. + #[prost(int32, tag = "2")] + pub nanos: i32, +} +/// `Any` contains an arbitrary serialized protocol buffer message along with a +/// URL that describes the type of the serialized message. +/// +/// Protobuf library provides support to pack/unpack Any values in the form +/// of utility functions or additional generated methods of the Any type. +/// +/// Example 1: Pack and unpack a message in C++. +/// +/// Foo foo = ...; +/// Any any; +/// any.PackFrom(foo); +/// ... +/// if (any.UnpackTo(&foo)) { +/// ... +/// } +/// +/// Example 2: Pack and unpack a message in Java. +/// +/// Foo foo = ...; +/// Any any = Any.pack(foo); +/// ... +/// if (any.is(Foo.class)) { +/// foo = any.unpack(Foo.class); +/// } +/// // or ... +/// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +/// foo = any.unpack(Foo.getDefaultInstance()); +/// } +/// +/// Example 3: Pack and unpack a message in Python. +/// +/// foo = Foo(...) +/// any = Any() +/// any.Pack(foo) +/// ... +/// if any.Is(Foo.DESCRIPTOR): +/// any.Unpack(foo) +/// ... +/// +/// Example 4: Pack and unpack a message in Go +/// +/// foo := &pb.Foo{...} +/// any, err := anypb.New(foo) +/// if err != nil { +/// ... +/// } +/// ... +/// foo := &pb.Foo{} +/// if err := any.UnmarshalTo(foo); err != nil { +/// ... +/// } +/// +/// The pack methods provided by protobuf library will by default use +/// 'type.googleapis.com/full.type.name' as the type URL and the unpack +/// methods only use the fully qualified type name after the last '/' +/// in the type URL, for example "foo.bar.com/x/y.z" will yield type +/// name "y.z". +/// +/// JSON +/// ==== +/// The JSON representation of an `Any` value uses the regular +/// representation of the deserialized, embedded message, with an +/// additional field `@type` which contains the type URL. Example: +/// +/// package google.profile; +/// message Person { +/// string first_name = 1; +/// string last_name = 2; +/// } +/// +/// { +/// "@type": "type.googleapis.com/google.profile.Person", +/// "firstName": , +/// "lastName": +/// } +/// +/// If the embedded message type is well-known and has a custom JSON +/// representation, that representation will be embedded adding a field +/// `value` which holds the custom JSON in addition to the `@type` +/// field. Example (for message [google.protobuf.Duration][]): +/// +/// { +/// "@type": "type.googleapis.com/google.protobuf.Duration", +/// "value": "1.212s" +/// } +/// +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Any { + /// A URL/resource name that uniquely identifies the type of the serialized + /// protocol buffer message. This string must contain at least + /// one "/" character. The last segment of the URL's path must represent + /// the fully qualified name of the type (as in + /// `path/google.protobuf.Duration`). The name should be in a canonical form + /// (e.g., leading "." is not accepted). + /// + /// In practice, teams usually precompile into the binary all types that they + /// expect it to use in the context of Any. However, for URLs which use the + /// scheme `http`, `https`, or no scheme, one can optionally set up a type + /// server that maps type URLs to message definitions as follows: + /// + /// * If no scheme is provided, `https` is assumed. + /// * An HTTP GET on the URL must yield a [google.protobuf.Type][] + /// value in binary format, or produce an error. + /// * Applications are allowed to cache lookup results based on the + /// URL, or have them precompiled into a binary to avoid any + /// lookup. Therefore, binary compatibility needs to be preserved + /// on changes to types. (Use versioned type names to manage + /// breaking changes.) + /// + /// Note: this functionality is not currently available in the official + /// protobuf release, and it is not used for type URLs beginning with + /// type.googleapis.com. + /// + /// Schemes other than `http`, `https` (or the empty scheme) might be + /// used with implementation specific semantics. + /// + #[prost(string, tag = "1")] + pub type_url: ::prost::alloc::string::String, + /// Must be a valid serialized protocol buffer of the above specified type. + #[prost(bytes = "vec", tag = "2")] + pub value: ::prost::alloc::vec::Vec, +} /// A Timestamp represents a point in time independent of any time zone or local /// calendar, encoded as a count of seconds and fractions of seconds at /// nanosecond resolution. The count is relative to an epoch at UTC midnight on @@ -1640,78 +1715,3 @@ pub struct Timestamp { #[prost(int32, tag = "2")] pub nanos: i32, } -/// A Duration represents a signed, fixed-length span of time represented -/// as a count of seconds and fractions of seconds at nanosecond -/// resolution. It is independent of any calendar and concepts like "day" -/// or "month". It is related to Timestamp in that the difference between -/// two Timestamp values is a Duration and it can be added or subtracted -/// from a Timestamp. Range is approximately +-10,000 years. -/// -/// # Examples -/// -/// Example 1: Compute Duration from two Timestamps in pseudo code. -/// -/// Timestamp start = ...; -/// Timestamp end = ...; -/// Duration duration = ...; -/// -/// duration.seconds = end.seconds - start.seconds; -/// duration.nanos = end.nanos - start.nanos; -/// -/// if (duration.seconds < 0 && duration.nanos > 0) { -/// duration.seconds += 1; -/// duration.nanos -= 1000000000; -/// } else if (duration.seconds > 0 && duration.nanos < 0) { -/// duration.seconds -= 1; -/// duration.nanos += 1000000000; -/// } -/// -/// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. -/// -/// Timestamp start = ...; -/// Duration duration = ...; -/// Timestamp end = ...; -/// -/// end.seconds = start.seconds + duration.seconds; -/// end.nanos = start.nanos + duration.nanos; -/// -/// if (end.nanos < 0) { -/// end.seconds -= 1; -/// end.nanos += 1000000000; -/// } else if (end.nanos >= 1000000000) { -/// end.seconds += 1; -/// end.nanos -= 1000000000; -/// } -/// -/// Example 3: Compute Duration from datetime.timedelta in Python. -/// -/// td = datetime.timedelta(days=3, minutes=10) -/// duration = Duration() -/// duration.FromTimedelta(td) -/// -/// # JSON Mapping -/// -/// In JSON format, the Duration type is encoded as a string rather than an -/// object, where the string ends in the suffix "s" (indicating seconds) and -/// is preceded by the number of seconds, with nanoseconds expressed as -/// fractional seconds. For example, 3 seconds with 0 nanoseconds should be -/// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should -/// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 -/// microsecond should be expressed in JSON format as "3.000001s". -/// -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct Duration { - /// Signed seconds of the span of time. Must be from -315,576,000,000 - /// to +315,576,000,000 inclusive. Note: these bounds are computed from: - /// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - #[prost(int64, tag = "1")] - pub seconds: i64, - /// Signed fractions of a second at nanosecond resolution of the span - /// of time. Durations less than one second are represented with a 0 - /// `seconds` field and a positive or negative `nanos` field. For durations - /// of one second or more, a non-zero value for the `nanos` field must be - /// of the same sign as the `seconds` field. Must be from -999,999,999 - /// to +999,999,999 inclusive. - #[prost(int32, tag = "2")] - pub nanos: i32, -} diff --git a/packages/proto/src/protos/layer.sync.v1.rs b/packages/cosmossdk/proto/src/protos/layer.sync.v1.rs similarity index 100% rename from packages/proto/src/protos/layer.sync.v1.rs rename to packages/cosmossdk/proto/src/protos/layer.sync.v1.rs diff --git a/packages/proto/src/protos/service_descriptor.bin b/packages/cosmossdk/proto/src/protos/service_descriptor.bin similarity index 99% rename from packages/proto/src/protos/service_descriptor.bin rename to packages/cosmossdk/proto/src/protos/service_descriptor.bin index ff3bcd02..d1bfec68 100644 Binary files a/packages/proto/src/protos/service_descriptor.bin and b/packages/cosmossdk/proto/src/protos/service_descriptor.bin differ diff --git a/packages/proto/src/protos/tendermint.abci.rs b/packages/cosmossdk/proto/src/protos/tendermint.abci.rs similarity index 100% rename from packages/proto/src/protos/tendermint.abci.rs rename to packages/cosmossdk/proto/src/protos/tendermint.abci.rs diff --git a/packages/proto/src/protos/tendermint.crypto.rs b/packages/cosmossdk/proto/src/protos/tendermint.crypto.rs similarity index 100% rename from packages/proto/src/protos/tendermint.crypto.rs rename to packages/cosmossdk/proto/src/protos/tendermint.crypto.rs diff --git a/packages/proto/src/protos/tendermint.p2p.rs b/packages/cosmossdk/proto/src/protos/tendermint.p2p.rs similarity index 100% rename from packages/proto/src/protos/tendermint.p2p.rs rename to packages/cosmossdk/proto/src/protos/tendermint.p2p.rs diff --git a/packages/proto/src/protos/tendermint.types.rs b/packages/cosmossdk/proto/src/protos/tendermint.types.rs similarity index 100% rename from packages/proto/src/protos/tendermint.types.rs rename to packages/cosmossdk/proto/src/protos/tendermint.types.rs diff --git a/packages/proto/src/protos/tendermint.version.rs b/packages/cosmossdk/proto/src/protos/tendermint.version.rs similarity index 100% rename from packages/proto/src/protos/tendermint.version.rs rename to packages/cosmossdk/proto/src/protos/tendermint.version.rs diff --git a/gateway/OpenAPI/cosmos/auth/v1beta1/auth.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/auth/v1beta1/auth.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/auth/v1beta1/auth.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/auth/v1beta1/auth.swagger.json diff --git a/gateway/OpenAPI/cosmos/auth/v1beta1/genesis.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/auth/v1beta1/genesis.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/auth/v1beta1/genesis.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/auth/v1beta1/genesis.swagger.json diff --git a/gateway/OpenAPI/cosmos/auth/v1beta1/query.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/auth/v1beta1/query.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/auth/v1beta1/query.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/auth/v1beta1/query.swagger.json diff --git a/gateway/OpenAPI/cosmos/bank/v1beta1/bank.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/bank/v1beta1/bank.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/bank/v1beta1/bank.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/bank/v1beta1/bank.swagger.json diff --git a/gateway/OpenAPI/cosmos/bank/v1beta1/query.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/bank/v1beta1/query.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/bank/v1beta1/query.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/bank/v1beta1/query.swagger.json diff --git a/gateway/OpenAPI/cosmos/bank/v1beta1/tx.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/bank/v1beta1/tx.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/bank/v1beta1/tx.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/bank/v1beta1/tx.swagger.json diff --git a/gateway/OpenAPI/cosmos/base/abci/v1beta1/abci.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/base/abci/v1beta1/abci.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/base/abci/v1beta1/abci.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/base/abci/v1beta1/abci.swagger.json diff --git a/gateway/OpenAPI/cosmos/base/query/v1beta1/pagination.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/base/query/v1beta1/pagination.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/base/query/v1beta1/pagination.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/base/query/v1beta1/pagination.swagger.json diff --git a/gateway/OpenAPI/cosmos/base/tendermint/v1beta1/query.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/base/tendermint/v1beta1/query.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/base/tendermint/v1beta1/query.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/base/tendermint/v1beta1/query.swagger.json diff --git a/gateway/OpenAPI/cosmos/base/tendermint/v1beta1/types.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/base/tendermint/v1beta1/types.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/base/tendermint/v1beta1/types.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/base/tendermint/v1beta1/types.swagger.json diff --git a/gateway/OpenAPI/cosmos/base/v1beta1/coin.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/base/v1beta1/coin.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/base/v1beta1/coin.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/base/v1beta1/coin.swagger.json diff --git a/gateway/OpenAPI/cosmos/crypto/ed25519/keys.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/crypto/ed25519/keys.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/crypto/ed25519/keys.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/crypto/ed25519/keys.swagger.json diff --git a/gateway/OpenAPI/cosmos/crypto/secp256k1/keys.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/crypto/secp256k1/keys.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/crypto/secp256k1/keys.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/crypto/secp256k1/keys.swagger.json diff --git a/gateway/OpenAPI/cosmos/tx/signing/v1beta1/signing.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/tx/signing/v1beta1/signing.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/tx/signing/v1beta1/signing.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/tx/signing/v1beta1/signing.swagger.json diff --git a/gateway/OpenAPI/cosmos/tx/v1beta1/service.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/tx/v1beta1/service.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/tx/v1beta1/service.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/tx/v1beta1/service.swagger.json diff --git a/gateway/OpenAPI/cosmos/tx/v1beta1/tx.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmos/tx/v1beta1/tx.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmos/tx/v1beta1/tx.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmos/tx/v1beta1/tx.swagger.json diff --git a/gateway/OpenAPI/cosmwasm/wasm/v1/genesis.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmwasm/wasm/v1/genesis.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmwasm/wasm/v1/genesis.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmwasm/wasm/v1/genesis.swagger.json diff --git a/gateway/OpenAPI/cosmwasm/wasm/v1/ibc.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmwasm/wasm/v1/ibc.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmwasm/wasm/v1/ibc.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmwasm/wasm/v1/ibc.swagger.json diff --git a/gateway/OpenAPI/cosmwasm/wasm/v1/query.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmwasm/wasm/v1/query.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmwasm/wasm/v1/query.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmwasm/wasm/v1/query.swagger.json diff --git a/gateway/OpenAPI/cosmwasm/wasm/v1/tx.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmwasm/wasm/v1/tx.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmwasm/wasm/v1/tx.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmwasm/wasm/v1/tx.swagger.json diff --git a/gateway/OpenAPI/cosmwasm/wasm/v1/types.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/cosmwasm/wasm/v1/types.swagger.json similarity index 100% rename from gateway/OpenAPI/cosmwasm/wasm/v1/types.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/cosmwasm/wasm/v1/types.swagger.json diff --git a/gateway/OpenAPI/google/api/annotations.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/google/api/annotations.swagger.json similarity index 100% rename from gateway/OpenAPI/google/api/annotations.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/google/api/annotations.swagger.json diff --git a/gateway/OpenAPI/google/api/http.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/google/api/http.swagger.json similarity index 100% rename from gateway/OpenAPI/google/api/http.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/google/api/http.swagger.json diff --git a/gateway/OpenAPI/google/protobuf/any.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/google/protobuf/any.swagger.json similarity index 100% rename from gateway/OpenAPI/google/protobuf/any.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/google/protobuf/any.swagger.json diff --git a/gateway/OpenAPI/google/protobuf/descriptor.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/google/protobuf/descriptor.swagger.json similarity index 100% rename from gateway/OpenAPI/google/protobuf/descriptor.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/google/protobuf/descriptor.swagger.json diff --git a/gateway/OpenAPI/google/protobuf/duration.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/google/protobuf/duration.swagger.json similarity index 100% rename from gateway/OpenAPI/google/protobuf/duration.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/google/protobuf/duration.swagger.json diff --git a/gateway/OpenAPI/google/protobuf/timestamp.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/google/protobuf/timestamp.swagger.json similarity index 100% rename from gateway/OpenAPI/google/protobuf/timestamp.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/google/protobuf/timestamp.swagger.json diff --git a/gateway/OpenAPI/layer/sync/v1/query.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/layer/sync/v1/query.swagger.json similarity index 100% rename from gateway/OpenAPI/layer/sync/v1/query.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/layer/sync/v1/query.swagger.json diff --git a/gateway/OpenAPI/tendermint/abci/types.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/tendermint/abci/types.swagger.json similarity index 100% rename from gateway/OpenAPI/tendermint/abci/types.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/tendermint/abci/types.swagger.json diff --git a/gateway/OpenAPI/tendermint/crypto/keys.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/tendermint/crypto/keys.swagger.json similarity index 100% rename from gateway/OpenAPI/tendermint/crypto/keys.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/tendermint/crypto/keys.swagger.json diff --git a/gateway/OpenAPI/tendermint/crypto/proof.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/tendermint/crypto/proof.swagger.json similarity index 100% rename from gateway/OpenAPI/tendermint/crypto/proof.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/tendermint/crypto/proof.swagger.json diff --git a/gateway/OpenAPI/tendermint/p2p/types.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/tendermint/p2p/types.swagger.json similarity index 100% rename from gateway/OpenAPI/tendermint/p2p/types.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/tendermint/p2p/types.swagger.json diff --git a/gateway/OpenAPI/tendermint/types/block.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/tendermint/types/block.swagger.json similarity index 100% rename from gateway/OpenAPI/tendermint/types/block.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/tendermint/types/block.swagger.json diff --git a/gateway/OpenAPI/tendermint/types/evidence.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/tendermint/types/evidence.swagger.json similarity index 100% rename from gateway/OpenAPI/tendermint/types/evidence.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/tendermint/types/evidence.swagger.json diff --git a/gateway/OpenAPI/tendermint/types/params.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/tendermint/types/params.swagger.json similarity index 100% rename from gateway/OpenAPI/tendermint/types/params.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/tendermint/types/params.swagger.json diff --git a/gateway/OpenAPI/tendermint/types/types.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/tendermint/types/types.swagger.json similarity index 100% rename from gateway/OpenAPI/tendermint/types/types.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/tendermint/types/types.swagger.json diff --git a/gateway/OpenAPI/tendermint/types/validator.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/tendermint/types/validator.swagger.json similarity index 100% rename from gateway/OpenAPI/tendermint/types/validator.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/tendermint/types/validator.swagger.json diff --git a/gateway/OpenAPI/tendermint/version/types.swagger.json b/packages/cosmossdk/tools/gateway/OpenAPI/tendermint/version/types.swagger.json similarity index 100% rename from gateway/OpenAPI/tendermint/version/types.swagger.json rename to packages/cosmossdk/tools/gateway/OpenAPI/tendermint/version/types.swagger.json diff --git a/gateway/TESTING.md b/packages/cosmossdk/tools/gateway/TESTING.md similarity index 100% rename from gateway/TESTING.md rename to packages/cosmossdk/tools/gateway/TESTING.md diff --git a/gateway/cosmos/auth/v1beta1/auth.pb.go b/packages/cosmossdk/tools/gateway/cosmos/auth/v1beta1/auth.pb.go similarity index 100% rename from gateway/cosmos/auth/v1beta1/auth.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/auth/v1beta1/auth.pb.go diff --git a/gateway/cosmos/auth/v1beta1/genesis.pb.go b/packages/cosmossdk/tools/gateway/cosmos/auth/v1beta1/genesis.pb.go similarity index 100% rename from gateway/cosmos/auth/v1beta1/genesis.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/auth/v1beta1/genesis.pb.go diff --git a/gateway/cosmos/auth/v1beta1/query.pb.go b/packages/cosmossdk/tools/gateway/cosmos/auth/v1beta1/query.pb.go similarity index 100% rename from gateway/cosmos/auth/v1beta1/query.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/auth/v1beta1/query.pb.go diff --git a/gateway/cosmos/auth/v1beta1/query.pb.gw.go b/packages/cosmossdk/tools/gateway/cosmos/auth/v1beta1/query.pb.gw.go similarity index 100% rename from gateway/cosmos/auth/v1beta1/query.pb.gw.go rename to packages/cosmossdk/tools/gateway/cosmos/auth/v1beta1/query.pb.gw.go diff --git a/gateway/cosmos/auth/v1beta1/query_grpc.pb.go b/packages/cosmossdk/tools/gateway/cosmos/auth/v1beta1/query_grpc.pb.go similarity index 100% rename from gateway/cosmos/auth/v1beta1/query_grpc.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/auth/v1beta1/query_grpc.pb.go diff --git a/gateway/cosmos/bank/v1beta1/bank.pb.go b/packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/bank.pb.go similarity index 100% rename from gateway/cosmos/bank/v1beta1/bank.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/bank.pb.go diff --git a/gateway/cosmos/bank/v1beta1/query.pb.go b/packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/query.pb.go similarity index 100% rename from gateway/cosmos/bank/v1beta1/query.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/query.pb.go diff --git a/gateway/cosmos/bank/v1beta1/query.pb.gw.go b/packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/query.pb.gw.go similarity index 100% rename from gateway/cosmos/bank/v1beta1/query.pb.gw.go rename to packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/query.pb.gw.go diff --git a/gateway/cosmos/bank/v1beta1/query_grpc.pb.go b/packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/query_grpc.pb.go similarity index 100% rename from gateway/cosmos/bank/v1beta1/query_grpc.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/query_grpc.pb.go diff --git a/gateway/cosmos/bank/v1beta1/tx.pb.go b/packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/tx.pb.go similarity index 100% rename from gateway/cosmos/bank/v1beta1/tx.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/tx.pb.go diff --git a/gateway/cosmos/bank/v1beta1/tx.pb.gw.go b/packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/tx.pb.gw.go similarity index 100% rename from gateway/cosmos/bank/v1beta1/tx.pb.gw.go rename to packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/tx.pb.gw.go diff --git a/gateway/cosmos/bank/v1beta1/tx_grpc.pb.go b/packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/tx_grpc.pb.go similarity index 100% rename from gateway/cosmos/bank/v1beta1/tx_grpc.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/bank/v1beta1/tx_grpc.pb.go diff --git a/gateway/cosmos/base/abci/v1beta1/abci.pb.go b/packages/cosmossdk/tools/gateway/cosmos/base/abci/v1beta1/abci.pb.go similarity index 100% rename from gateway/cosmos/base/abci/v1beta1/abci.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/base/abci/v1beta1/abci.pb.go diff --git a/gateway/cosmos/base/query/v1beta1/pagination.pb.go b/packages/cosmossdk/tools/gateway/cosmos/base/query/v1beta1/pagination.pb.go similarity index 100% rename from gateway/cosmos/base/query/v1beta1/pagination.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/base/query/v1beta1/pagination.pb.go diff --git a/gateway/cosmos/base/tendermint/v1beta1/query.pb.go b/packages/cosmossdk/tools/gateway/cosmos/base/tendermint/v1beta1/query.pb.go similarity index 100% rename from gateway/cosmos/base/tendermint/v1beta1/query.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/base/tendermint/v1beta1/query.pb.go diff --git a/gateway/cosmos/base/tendermint/v1beta1/query.pb.gw.go b/packages/cosmossdk/tools/gateway/cosmos/base/tendermint/v1beta1/query.pb.gw.go similarity index 100% rename from gateway/cosmos/base/tendermint/v1beta1/query.pb.gw.go rename to packages/cosmossdk/tools/gateway/cosmos/base/tendermint/v1beta1/query.pb.gw.go diff --git a/gateway/cosmos/base/tendermint/v1beta1/query_grpc.pb.go b/packages/cosmossdk/tools/gateway/cosmos/base/tendermint/v1beta1/query_grpc.pb.go similarity index 100% rename from gateway/cosmos/base/tendermint/v1beta1/query_grpc.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/base/tendermint/v1beta1/query_grpc.pb.go diff --git a/gateway/cosmos/base/tendermint/v1beta1/types.pb.go b/packages/cosmossdk/tools/gateway/cosmos/base/tendermint/v1beta1/types.pb.go similarity index 100% rename from gateway/cosmos/base/tendermint/v1beta1/types.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/base/tendermint/v1beta1/types.pb.go diff --git a/gateway/cosmos/base/v1beta1/coin.pb.go b/packages/cosmossdk/tools/gateway/cosmos/base/v1beta1/coin.pb.go similarity index 100% rename from gateway/cosmos/base/v1beta1/coin.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/base/v1beta1/coin.pb.go diff --git a/gateway/cosmos/crypto/ed25519/keys.pb.go b/packages/cosmossdk/tools/gateway/cosmos/crypto/ed25519/keys.pb.go similarity index 100% rename from gateway/cosmos/crypto/ed25519/keys.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/crypto/ed25519/keys.pb.go diff --git a/gateway/cosmos/crypto/secp256k1/keys.pb.go b/packages/cosmossdk/tools/gateway/cosmos/crypto/secp256k1/keys.pb.go similarity index 100% rename from gateway/cosmos/crypto/secp256k1/keys.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/crypto/secp256k1/keys.pb.go diff --git a/gateway/cosmos/tx/signing/v1beta1/signing.pb.go b/packages/cosmossdk/tools/gateway/cosmos/tx/signing/v1beta1/signing.pb.go similarity index 100% rename from gateway/cosmos/tx/signing/v1beta1/signing.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/tx/signing/v1beta1/signing.pb.go diff --git a/gateway/cosmos/tx/v1beta1/service.pb.go b/packages/cosmossdk/tools/gateway/cosmos/tx/v1beta1/service.pb.go similarity index 100% rename from gateway/cosmos/tx/v1beta1/service.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/tx/v1beta1/service.pb.go diff --git a/gateway/cosmos/tx/v1beta1/service.pb.gw.go b/packages/cosmossdk/tools/gateway/cosmos/tx/v1beta1/service.pb.gw.go similarity index 100% rename from gateway/cosmos/tx/v1beta1/service.pb.gw.go rename to packages/cosmossdk/tools/gateway/cosmos/tx/v1beta1/service.pb.gw.go diff --git a/gateway/cosmos/tx/v1beta1/service_grpc.pb.go b/packages/cosmossdk/tools/gateway/cosmos/tx/v1beta1/service_grpc.pb.go similarity index 100% rename from gateway/cosmos/tx/v1beta1/service_grpc.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/tx/v1beta1/service_grpc.pb.go diff --git a/gateway/cosmos/tx/v1beta1/tx.pb.go b/packages/cosmossdk/tools/gateway/cosmos/tx/v1beta1/tx.pb.go similarity index 100% rename from gateway/cosmos/tx/v1beta1/tx.pb.go rename to packages/cosmossdk/tools/gateway/cosmos/tx/v1beta1/tx.pb.go diff --git a/gateway/cosmwasm/wasm/v1/genesis.pb.go b/packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/genesis.pb.go similarity index 100% rename from gateway/cosmwasm/wasm/v1/genesis.pb.go rename to packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/genesis.pb.go diff --git a/gateway/cosmwasm/wasm/v1/ibc.pb.go b/packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/ibc.pb.go similarity index 100% rename from gateway/cosmwasm/wasm/v1/ibc.pb.go rename to packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/ibc.pb.go diff --git a/gateway/cosmwasm/wasm/v1/query.pb.go b/packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/query.pb.go similarity index 100% rename from gateway/cosmwasm/wasm/v1/query.pb.go rename to packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/query.pb.go diff --git a/gateway/cosmwasm/wasm/v1/query.pb.gw.go b/packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/query.pb.gw.go similarity index 100% rename from gateway/cosmwasm/wasm/v1/query.pb.gw.go rename to packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/query.pb.gw.go diff --git a/gateway/cosmwasm/wasm/v1/query_grpc.pb.go b/packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/query_grpc.pb.go similarity index 100% rename from gateway/cosmwasm/wasm/v1/query_grpc.pb.go rename to packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/query_grpc.pb.go diff --git a/gateway/cosmwasm/wasm/v1/tx.pb.go b/packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/tx.pb.go similarity index 100% rename from gateway/cosmwasm/wasm/v1/tx.pb.go rename to packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/tx.pb.go diff --git a/gateway/cosmwasm/wasm/v1/tx.pb.gw.go b/packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/tx.pb.gw.go similarity index 100% rename from gateway/cosmwasm/wasm/v1/tx.pb.gw.go rename to packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/tx.pb.gw.go diff --git a/gateway/cosmwasm/wasm/v1/tx_grpc.pb.go b/packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/tx_grpc.pb.go similarity index 100% rename from gateway/cosmwasm/wasm/v1/tx_grpc.pb.go rename to packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/tx_grpc.pb.go diff --git a/gateway/cosmwasm/wasm/v1/types.pb.go b/packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/types.pb.go similarity index 100% rename from gateway/cosmwasm/wasm/v1/types.pb.go rename to packages/cosmossdk/tools/gateway/cosmwasm/wasm/v1/types.pb.go diff --git a/gateway/devnet.json b/packages/cosmossdk/tools/gateway/devnet.json similarity index 100% rename from gateway/devnet.json rename to packages/cosmossdk/tools/gateway/devnet.json diff --git a/gateway/go.mod b/packages/cosmossdk/tools/gateway/go.mod similarity index 100% rename from gateway/go.mod rename to packages/cosmossdk/tools/gateway/go.mod diff --git a/gateway/go.sum b/packages/cosmossdk/tools/gateway/go.sum similarity index 100% rename from gateway/go.sum rename to packages/cosmossdk/tools/gateway/go.sum diff --git a/gateway/google/api/annotations.pb.go b/packages/cosmossdk/tools/gateway/google/api/annotations.pb.go similarity index 100% rename from gateway/google/api/annotations.pb.go rename to packages/cosmossdk/tools/gateway/google/api/annotations.pb.go diff --git a/gateway/google/api/http.pb.go b/packages/cosmossdk/tools/gateway/google/api/http.pb.go similarity index 100% rename from gateway/google/api/http.pb.go rename to packages/cosmossdk/tools/gateway/google/api/http.pb.go diff --git a/gateway/google/protobuf/any.pb.go b/packages/cosmossdk/tools/gateway/google/protobuf/any.pb.go similarity index 100% rename from gateway/google/protobuf/any.pb.go rename to packages/cosmossdk/tools/gateway/google/protobuf/any.pb.go diff --git a/gateway/google/protobuf/descriptor.pb.go b/packages/cosmossdk/tools/gateway/google/protobuf/descriptor.pb.go similarity index 100% rename from gateway/google/protobuf/descriptor.pb.go rename to packages/cosmossdk/tools/gateway/google/protobuf/descriptor.pb.go diff --git a/gateway/google/protobuf/duration.pb.go b/packages/cosmossdk/tools/gateway/google/protobuf/duration.pb.go similarity index 100% rename from gateway/google/protobuf/duration.pb.go rename to packages/cosmossdk/tools/gateway/google/protobuf/duration.pb.go diff --git a/gateway/google/protobuf/timestamp.pb.go b/packages/cosmossdk/tools/gateway/google/protobuf/timestamp.pb.go similarity index 100% rename from gateway/google/protobuf/timestamp.pb.go rename to packages/cosmossdk/tools/gateway/google/protobuf/timestamp.pb.go diff --git a/gateway/layer/sync/v1/query.pb.go b/packages/cosmossdk/tools/gateway/layer/sync/v1/query.pb.go similarity index 100% rename from gateway/layer/sync/v1/query.pb.go rename to packages/cosmossdk/tools/gateway/layer/sync/v1/query.pb.go diff --git a/gateway/layer/sync/v1/query.pb.gw.go b/packages/cosmossdk/tools/gateway/layer/sync/v1/query.pb.gw.go similarity index 100% rename from gateway/layer/sync/v1/query.pb.gw.go rename to packages/cosmossdk/tools/gateway/layer/sync/v1/query.pb.gw.go diff --git a/gateway/layer/sync/v1/query_grpc.pb.go b/packages/cosmossdk/tools/gateway/layer/sync/v1/query_grpc.pb.go similarity index 100% rename from gateway/layer/sync/v1/query_grpc.pb.go rename to packages/cosmossdk/tools/gateway/layer/sync/v1/query_grpc.pb.go diff --git a/gateway/localnet.json b/packages/cosmossdk/tools/gateway/localnet.json similarity index 100% rename from gateway/localnet.json rename to packages/cosmossdk/tools/gateway/localnet.json diff --git a/gateway/main.go b/packages/cosmossdk/tools/gateway/main.go similarity index 100% rename from gateway/main.go rename to packages/cosmossdk/tools/gateway/main.go diff --git a/gateway/tendermint/abci/types.pb.go b/packages/cosmossdk/tools/gateway/tendermint/abci/types.pb.go similarity index 100% rename from gateway/tendermint/abci/types.pb.go rename to packages/cosmossdk/tools/gateway/tendermint/abci/types.pb.go diff --git a/gateway/tendermint/abci/types.pb.gw.go b/packages/cosmossdk/tools/gateway/tendermint/abci/types.pb.gw.go similarity index 100% rename from gateway/tendermint/abci/types.pb.gw.go rename to packages/cosmossdk/tools/gateway/tendermint/abci/types.pb.gw.go diff --git a/gateway/tendermint/abci/types_grpc.pb.go b/packages/cosmossdk/tools/gateway/tendermint/abci/types_grpc.pb.go similarity index 100% rename from gateway/tendermint/abci/types_grpc.pb.go rename to packages/cosmossdk/tools/gateway/tendermint/abci/types_grpc.pb.go diff --git a/gateway/tendermint/crypto/keys.pb.go b/packages/cosmossdk/tools/gateway/tendermint/crypto/keys.pb.go similarity index 100% rename from gateway/tendermint/crypto/keys.pb.go rename to packages/cosmossdk/tools/gateway/tendermint/crypto/keys.pb.go diff --git a/gateway/tendermint/crypto/proof.pb.go b/packages/cosmossdk/tools/gateway/tendermint/crypto/proof.pb.go similarity index 100% rename from gateway/tendermint/crypto/proof.pb.go rename to packages/cosmossdk/tools/gateway/tendermint/crypto/proof.pb.go diff --git a/gateway/tendermint/p2p/types.pb.go b/packages/cosmossdk/tools/gateway/tendermint/p2p/types.pb.go similarity index 100% rename from gateway/tendermint/p2p/types.pb.go rename to packages/cosmossdk/tools/gateway/tendermint/p2p/types.pb.go diff --git a/gateway/tendermint/types/block.pb.go b/packages/cosmossdk/tools/gateway/tendermint/types/block.pb.go similarity index 100% rename from gateway/tendermint/types/block.pb.go rename to packages/cosmossdk/tools/gateway/tendermint/types/block.pb.go diff --git a/gateway/tendermint/types/evidence.pb.go b/packages/cosmossdk/tools/gateway/tendermint/types/evidence.pb.go similarity index 100% rename from gateway/tendermint/types/evidence.pb.go rename to packages/cosmossdk/tools/gateway/tendermint/types/evidence.pb.go diff --git a/gateway/tendermint/types/params.pb.go b/packages/cosmossdk/tools/gateway/tendermint/types/params.pb.go similarity index 100% rename from gateway/tendermint/types/params.pb.go rename to packages/cosmossdk/tools/gateway/tendermint/types/params.pb.go diff --git a/gateway/tendermint/types/types.pb.go b/packages/cosmossdk/tools/gateway/tendermint/types/types.pb.go similarity index 100% rename from gateway/tendermint/types/types.pb.go rename to packages/cosmossdk/tools/gateway/tendermint/types/types.pb.go diff --git a/gateway/tendermint/types/validator.pb.go b/packages/cosmossdk/tools/gateway/tendermint/types/validator.pb.go similarity index 100% rename from gateway/tendermint/types/validator.pb.go rename to packages/cosmossdk/tools/gateway/tendermint/types/validator.pb.go diff --git a/gateway/tendermint/version/types.pb.go b/packages/cosmossdk/tools/gateway/tendermint/version/types.pb.go similarity index 100% rename from gateway/tendermint/version/types.pb.go rename to packages/cosmossdk/tools/gateway/tendermint/version/types.pb.go diff --git a/tools/proto-compiler/Cargo.lock b/packages/cosmossdk/tools/proto-compiler/Cargo.lock similarity index 100% rename from tools/proto-compiler/Cargo.lock rename to packages/cosmossdk/tools/proto-compiler/Cargo.lock diff --git a/tools/proto-compiler/Cargo.toml b/packages/cosmossdk/tools/proto-compiler/Cargo.toml similarity index 100% rename from tools/proto-compiler/Cargo.toml rename to packages/cosmossdk/tools/proto-compiler/Cargo.toml diff --git a/tools/proto-compiler/README.md b/packages/cosmossdk/tools/proto-compiler/README.md similarity index 100% rename from tools/proto-compiler/README.md rename to packages/cosmossdk/tools/proto-compiler/README.md diff --git a/tools/proto-compiler/src/main.rs b/packages/cosmossdk/tools/proto-compiler/src/main.rs similarity index 67% rename from tools/proto-compiler/src/main.rs rename to packages/cosmossdk/tools/proto-compiler/src/main.rs index 645a22f9..1e29f450 100644 --- a/tools/proto-compiler/src/main.rs +++ b/packages/cosmossdk/tools/proto-compiler/src/main.rs @@ -3,8 +3,8 @@ use std::path::PathBuf; fn main() { - let includes = "../../proto"; - let out_dir = PathBuf::from("../../packages/proto/src/protos"); + let includes = "../protospec"; + let out_dir = PathBuf::from("../../proto/src/protos"); let ext = std::ffi::OsStr::new("proto"); let protos: Vec<_> = walkdir::WalkDir::new(includes) @@ -16,17 +16,16 @@ fn main() { println!("[info ] Compiling {} ...", includes); - // prost_build::compile_protos(&protos, &[includes]).unwrap(); - tonic_build::configure() - .file_descriptor_set_path(out_dir.join("service_descriptor.bin")) + .file_descriptor_set_path(out_dir.join("service_descriptor.bin")) .build_client(true) .compile_well_known_types(true) .client_mod_attribute(".", r#"#[cfg(feature = "client")]"#) .build_server(true) .server_mod_attribute(".", r#"#[cfg(feature = "server")]"#) - .disable_comments("../../proto/google/protobuf/any.proto") - .disable_comments("../../proto/google/api/http.proto") + .disable_comments("../protospec/google/protobuf/any.proto") + .disable_comments("../protospec/google/api/http.proto") .out_dir(out_dir) - .compile(&protos, &[includes]).unwrap(); + .compile(&protos, &[includes]) + .unwrap(); } diff --git a/proto/buf.gen.yaml b/packages/cosmossdk/tools/protospec/buf.gen.yaml similarity index 100% rename from proto/buf.gen.yaml rename to packages/cosmossdk/tools/protospec/buf.gen.yaml diff --git a/proto/buf.lock b/packages/cosmossdk/tools/protospec/buf.lock similarity index 100% rename from proto/buf.lock rename to packages/cosmossdk/tools/protospec/buf.lock diff --git a/proto/buf.yaml b/packages/cosmossdk/tools/protospec/buf.yaml similarity index 100% rename from proto/buf.yaml rename to packages/cosmossdk/tools/protospec/buf.yaml diff --git a/proto/cosmos/auth/v1beta1/auth.proto b/packages/cosmossdk/tools/protospec/cosmos/auth/v1beta1/auth.proto similarity index 100% rename from proto/cosmos/auth/v1beta1/auth.proto rename to packages/cosmossdk/tools/protospec/cosmos/auth/v1beta1/auth.proto diff --git a/proto/cosmos/auth/v1beta1/genesis.proto b/packages/cosmossdk/tools/protospec/cosmos/auth/v1beta1/genesis.proto similarity index 100% rename from proto/cosmos/auth/v1beta1/genesis.proto rename to packages/cosmossdk/tools/protospec/cosmos/auth/v1beta1/genesis.proto diff --git a/proto/cosmos/auth/v1beta1/query.proto b/packages/cosmossdk/tools/protospec/cosmos/auth/v1beta1/query.proto similarity index 100% rename from proto/cosmos/auth/v1beta1/query.proto rename to packages/cosmossdk/tools/protospec/cosmos/auth/v1beta1/query.proto diff --git a/proto/cosmos/bank/v1beta1/bank.proto b/packages/cosmossdk/tools/protospec/cosmos/bank/v1beta1/bank.proto similarity index 100% rename from proto/cosmos/bank/v1beta1/bank.proto rename to packages/cosmossdk/tools/protospec/cosmos/bank/v1beta1/bank.proto diff --git a/proto/cosmos/bank/v1beta1/query.proto b/packages/cosmossdk/tools/protospec/cosmos/bank/v1beta1/query.proto similarity index 100% rename from proto/cosmos/bank/v1beta1/query.proto rename to packages/cosmossdk/tools/protospec/cosmos/bank/v1beta1/query.proto diff --git a/proto/cosmos/bank/v1beta1/tx.proto b/packages/cosmossdk/tools/protospec/cosmos/bank/v1beta1/tx.proto similarity index 100% rename from proto/cosmos/bank/v1beta1/tx.proto rename to packages/cosmossdk/tools/protospec/cosmos/bank/v1beta1/tx.proto diff --git a/proto/cosmos/base/abci/v1beta1/abci.proto b/packages/cosmossdk/tools/protospec/cosmos/base/abci/v1beta1/abci.proto similarity index 100% rename from proto/cosmos/base/abci/v1beta1/abci.proto rename to packages/cosmossdk/tools/protospec/cosmos/base/abci/v1beta1/abci.proto diff --git a/proto/cosmos/base/query/v1beta1/pagination.proto b/packages/cosmossdk/tools/protospec/cosmos/base/query/v1beta1/pagination.proto similarity index 100% rename from proto/cosmos/base/query/v1beta1/pagination.proto rename to packages/cosmossdk/tools/protospec/cosmos/base/query/v1beta1/pagination.proto diff --git a/proto/cosmos/base/tendermint/v1beta1/query.proto b/packages/cosmossdk/tools/protospec/cosmos/base/tendermint/v1beta1/query.proto similarity index 100% rename from proto/cosmos/base/tendermint/v1beta1/query.proto rename to packages/cosmossdk/tools/protospec/cosmos/base/tendermint/v1beta1/query.proto diff --git a/proto/cosmos/base/tendermint/v1beta1/types.proto b/packages/cosmossdk/tools/protospec/cosmos/base/tendermint/v1beta1/types.proto similarity index 100% rename from proto/cosmos/base/tendermint/v1beta1/types.proto rename to packages/cosmossdk/tools/protospec/cosmos/base/tendermint/v1beta1/types.proto diff --git a/proto/cosmos/base/v1beta1/coin.proto b/packages/cosmossdk/tools/protospec/cosmos/base/v1beta1/coin.proto similarity index 100% rename from proto/cosmos/base/v1beta1/coin.proto rename to packages/cosmossdk/tools/protospec/cosmos/base/v1beta1/coin.proto diff --git a/proto/cosmos/crypto/ed25519/keys.proto b/packages/cosmossdk/tools/protospec/cosmos/crypto/ed25519/keys.proto similarity index 100% rename from proto/cosmos/crypto/ed25519/keys.proto rename to packages/cosmossdk/tools/protospec/cosmos/crypto/ed25519/keys.proto diff --git a/proto/cosmos/crypto/secp256k1/keys.proto b/packages/cosmossdk/tools/protospec/cosmos/crypto/secp256k1/keys.proto similarity index 100% rename from proto/cosmos/crypto/secp256k1/keys.proto rename to packages/cosmossdk/tools/protospec/cosmos/crypto/secp256k1/keys.proto diff --git a/proto/cosmos/tx/signing/v1beta1/signing.proto b/packages/cosmossdk/tools/protospec/cosmos/tx/signing/v1beta1/signing.proto similarity index 100% rename from proto/cosmos/tx/signing/v1beta1/signing.proto rename to packages/cosmossdk/tools/protospec/cosmos/tx/signing/v1beta1/signing.proto diff --git a/proto/cosmos/tx/v1beta1/service.proto b/packages/cosmossdk/tools/protospec/cosmos/tx/v1beta1/service.proto similarity index 100% rename from proto/cosmos/tx/v1beta1/service.proto rename to packages/cosmossdk/tools/protospec/cosmos/tx/v1beta1/service.proto diff --git a/proto/cosmos/tx/v1beta1/tx.proto b/packages/cosmossdk/tools/protospec/cosmos/tx/v1beta1/tx.proto similarity index 100% rename from proto/cosmos/tx/v1beta1/tx.proto rename to packages/cosmossdk/tools/protospec/cosmos/tx/v1beta1/tx.proto diff --git a/proto/cosmwasm/wasm/v1/genesis.proto b/packages/cosmossdk/tools/protospec/cosmwasm/wasm/v1/genesis.proto similarity index 100% rename from proto/cosmwasm/wasm/v1/genesis.proto rename to packages/cosmossdk/tools/protospec/cosmwasm/wasm/v1/genesis.proto diff --git a/proto/cosmwasm/wasm/v1/ibc.proto b/packages/cosmossdk/tools/protospec/cosmwasm/wasm/v1/ibc.proto similarity index 100% rename from proto/cosmwasm/wasm/v1/ibc.proto rename to packages/cosmossdk/tools/protospec/cosmwasm/wasm/v1/ibc.proto diff --git a/proto/cosmwasm/wasm/v1/query.proto b/packages/cosmossdk/tools/protospec/cosmwasm/wasm/v1/query.proto similarity index 100% rename from proto/cosmwasm/wasm/v1/query.proto rename to packages/cosmossdk/tools/protospec/cosmwasm/wasm/v1/query.proto diff --git a/proto/cosmwasm/wasm/v1/tx.proto b/packages/cosmossdk/tools/protospec/cosmwasm/wasm/v1/tx.proto similarity index 100% rename from proto/cosmwasm/wasm/v1/tx.proto rename to packages/cosmossdk/tools/protospec/cosmwasm/wasm/v1/tx.proto diff --git a/proto/cosmwasm/wasm/v1/types.proto b/packages/cosmossdk/tools/protospec/cosmwasm/wasm/v1/types.proto similarity index 100% rename from proto/cosmwasm/wasm/v1/types.proto rename to packages/cosmossdk/tools/protospec/cosmwasm/wasm/v1/types.proto diff --git a/proto/google/api/annotations.proto b/packages/cosmossdk/tools/protospec/google/api/annotations.proto similarity index 100% rename from proto/google/api/annotations.proto rename to packages/cosmossdk/tools/protospec/google/api/annotations.proto diff --git a/proto/google/api/http.proto b/packages/cosmossdk/tools/protospec/google/api/http.proto similarity index 100% rename from proto/google/api/http.proto rename to packages/cosmossdk/tools/protospec/google/api/http.proto diff --git a/proto/google/protobuf/any.proto b/packages/cosmossdk/tools/protospec/google/protobuf/any.proto similarity index 100% rename from proto/google/protobuf/any.proto rename to packages/cosmossdk/tools/protospec/google/protobuf/any.proto diff --git a/proto/google/protobuf/descriptor.proto b/packages/cosmossdk/tools/protospec/google/protobuf/descriptor.proto similarity index 100% rename from proto/google/protobuf/descriptor.proto rename to packages/cosmossdk/tools/protospec/google/protobuf/descriptor.proto diff --git a/proto/google/protobuf/duration.proto b/packages/cosmossdk/tools/protospec/google/protobuf/duration.proto similarity index 100% rename from proto/google/protobuf/duration.proto rename to packages/cosmossdk/tools/protospec/google/protobuf/duration.proto diff --git a/proto/google/protobuf/timestamp.proto b/packages/cosmossdk/tools/protospec/google/protobuf/timestamp.proto similarity index 100% rename from proto/google/protobuf/timestamp.proto rename to packages/cosmossdk/tools/protospec/google/protobuf/timestamp.proto diff --git a/proto/layer/sync/v1/query.proto b/packages/cosmossdk/tools/protospec/layer/sync/v1/query.proto similarity index 100% rename from proto/layer/sync/v1/query.proto rename to packages/cosmossdk/tools/protospec/layer/sync/v1/query.proto diff --git a/proto/tendermint/abci/types.proto b/packages/cosmossdk/tools/protospec/tendermint/abci/types.proto similarity index 100% rename from proto/tendermint/abci/types.proto rename to packages/cosmossdk/tools/protospec/tendermint/abci/types.proto diff --git a/proto/tendermint/crypto/keys.proto b/packages/cosmossdk/tools/protospec/tendermint/crypto/keys.proto similarity index 100% rename from proto/tendermint/crypto/keys.proto rename to packages/cosmossdk/tools/protospec/tendermint/crypto/keys.proto diff --git a/proto/tendermint/crypto/proof.proto b/packages/cosmossdk/tools/protospec/tendermint/crypto/proof.proto similarity index 100% rename from proto/tendermint/crypto/proof.proto rename to packages/cosmossdk/tools/protospec/tendermint/crypto/proof.proto diff --git a/proto/tendermint/p2p/types.proto b/packages/cosmossdk/tools/protospec/tendermint/p2p/types.proto similarity index 100% rename from proto/tendermint/p2p/types.proto rename to packages/cosmossdk/tools/protospec/tendermint/p2p/types.proto diff --git a/proto/tendermint/types/block.proto b/packages/cosmossdk/tools/protospec/tendermint/types/block.proto similarity index 100% rename from proto/tendermint/types/block.proto rename to packages/cosmossdk/tools/protospec/tendermint/types/block.proto diff --git a/proto/tendermint/types/evidence.proto b/packages/cosmossdk/tools/protospec/tendermint/types/evidence.proto similarity index 100% rename from proto/tendermint/types/evidence.proto rename to packages/cosmossdk/tools/protospec/tendermint/types/evidence.proto diff --git a/proto/tendermint/types/params.proto b/packages/cosmossdk/tools/protospec/tendermint/types/params.proto similarity index 100% rename from proto/tendermint/types/params.proto rename to packages/cosmossdk/tools/protospec/tendermint/types/params.proto diff --git a/proto/tendermint/types/types.proto b/packages/cosmossdk/tools/protospec/tendermint/types/types.proto similarity index 100% rename from proto/tendermint/types/types.proto rename to packages/cosmossdk/tools/protospec/tendermint/types/types.proto diff --git a/proto/tendermint/types/validator.proto b/packages/cosmossdk/tools/protospec/tendermint/types/validator.proto similarity index 100% rename from proto/tendermint/types/validator.proto rename to packages/cosmossdk/tools/protospec/tendermint/types/validator.proto diff --git a/proto/tendermint/version/types.proto b/packages/cosmossdk/tools/protospec/tendermint/version/types.proto similarity index 100% rename from proto/tendermint/version/types.proto rename to packages/cosmossdk/tools/protospec/tendermint/version/types.proto diff --git a/packages/app/Cargo.toml b/packages/layer/Cargo.toml similarity index 100% rename from packages/app/Cargo.toml rename to packages/layer/Cargo.toml diff --git a/packages/app/README.md b/packages/layer/README.md similarity index 100% rename from packages/app/README.md rename to packages/layer/README.md diff --git a/packages/app/fixtures/abstract_manager.wasm b/packages/layer/fixtures/abstract_manager.wasm similarity index 100% rename from packages/app/fixtures/abstract_manager.wasm rename to packages/layer/fixtures/abstract_manager.wasm diff --git a/packages/app/fixtures/cw20_base.wasm b/packages/layer/fixtures/cw20_base.wasm similarity index 100% rename from packages/app/fixtures/cw20_base.wasm rename to packages/layer/fixtures/cw20_base.wasm diff --git a/packages/app/fixtures/cw20_base.wasm.gz b/packages/layer/fixtures/cw20_base.wasm.gz similarity index 100% rename from packages/app/fixtures/cw20_base.wasm.gz rename to packages/layer/fixtures/cw20_base.wasm.gz diff --git a/packages/app/fixtures/download.sh b/packages/layer/fixtures/download.sh similarity index 100% rename from packages/app/fixtures/download.sh rename to packages/layer/fixtures/download.sh diff --git a/packages/app/fixtures/hackatom.wasm b/packages/layer/fixtures/hackatom.wasm similarity index 100% rename from packages/app/fixtures/hackatom.wasm rename to packages/layer/fixtures/hackatom.wasm diff --git a/packages/app/fixtures/layer_root.wasm b/packages/layer/fixtures/layer_root.wasm similarity index 100% rename from packages/app/fixtures/layer_root.wasm rename to packages/layer/fixtures/layer_root.wasm diff --git a/packages/app/fixtures/tc_caller.wasm b/packages/layer/fixtures/tc_caller.wasm similarity index 100% rename from packages/app/fixtures/tc_caller.wasm rename to packages/layer/fixtures/tc_caller.wasm diff --git a/packages/app/fixtures/tc_echo.wasm b/packages/layer/fixtures/tc_echo.wasm similarity index 100% rename from packages/app/fixtures/tc_echo.wasm rename to packages/layer/fixtures/tc_echo.wasm diff --git a/packages/app/src/app.rs b/packages/layer/src/app.rs similarity index 100% rename from packages/app/src/app.rs rename to packages/layer/src/app.rs diff --git a/packages/app/src/auth/error.rs b/packages/layer/src/auth/error.rs similarity index 100% rename from packages/app/src/auth/error.rs rename to packages/layer/src/auth/error.rs diff --git a/packages/app/src/auth/keeper.rs b/packages/layer/src/auth/keeper.rs similarity index 100% rename from packages/app/src/auth/keeper.rs rename to packages/layer/src/auth/keeper.rs diff --git a/packages/app/src/auth/mod.rs b/packages/layer/src/auth/mod.rs similarity index 100% rename from packages/app/src/auth/mod.rs rename to packages/layer/src/auth/mod.rs diff --git a/packages/app/src/bank/error.rs b/packages/layer/src/bank/error.rs similarity index 100% rename from packages/app/src/bank/error.rs rename to packages/layer/src/bank/error.rs diff --git a/packages/app/src/bank/keeper.rs b/packages/layer/src/bank/keeper.rs similarity index 100% rename from packages/app/src/bank/keeper.rs rename to packages/layer/src/bank/keeper.rs diff --git a/packages/app/src/bank/mod.rs b/packages/layer/src/bank/mod.rs similarity index 100% rename from packages/app/src/bank/mod.rs rename to packages/layer/src/bank/mod.rs diff --git a/packages/app/src/error.rs b/packages/layer/src/error.rs similarity index 100% rename from packages/app/src/error.rs rename to packages/layer/src/error.rs diff --git a/packages/app/src/genesis.rs b/packages/layer/src/genesis.rs similarity index 100% rename from packages/app/src/genesis.rs rename to packages/layer/src/genesis.rs diff --git a/packages/app/src/lib.rs b/packages/layer/src/lib.rs similarity index 100% rename from packages/app/src/lib.rs rename to packages/layer/src/lib.rs diff --git a/packages/app/src/sm.rs b/packages/layer/src/sm.rs similarity index 100% rename from packages/app/src/sm.rs rename to packages/layer/src/sm.rs diff --git a/packages/app/src/sync.rs b/packages/layer/src/sync.rs similarity index 100% rename from packages/app/src/sync.rs rename to packages/layer/src/sync.rs diff --git a/packages/app/src/testing.rs b/packages/layer/src/testing.rs similarity index 100% rename from packages/app/src/testing.rs rename to packages/layer/src/testing.rs diff --git a/packages/app/src/testing/bank_cw20.rs b/packages/layer/src/testing/bank_cw20.rs similarity index 100% rename from packages/app/src/testing/bank_cw20.rs rename to packages/layer/src/testing/bank_cw20.rs diff --git a/packages/app/src/testing/hackatom.rs b/packages/layer/src/testing/hackatom.rs similarity index 100% rename from packages/app/src/testing/hackatom.rs rename to packages/layer/src/testing/hackatom.rs diff --git a/packages/app/src/testing/replies.rs b/packages/layer/src/testing/replies.rs similarity index 100% rename from packages/app/src/testing/replies.rs rename to packages/layer/src/testing/replies.rs diff --git a/packages/app/src/testing/utils.rs b/packages/layer/src/testing/utils.rs similarity index 100% rename from packages/app/src/testing/utils.rs rename to packages/layer/src/testing/utils.rs diff --git a/packages/app/src/testing/wasm.rs b/packages/layer/src/testing/wasm.rs similarity index 100% rename from packages/app/src/testing/wasm.rs rename to packages/layer/src/testing/wasm.rs diff --git a/packages/app/src/wasm/error.rs b/packages/layer/src/wasm/error.rs similarity index 100% rename from packages/app/src/wasm/error.rs rename to packages/layer/src/wasm/error.rs diff --git a/packages/app/src/wasm/events.rs b/packages/layer/src/wasm/events.rs similarity index 100% rename from packages/app/src/wasm/events.rs rename to packages/layer/src/wasm/events.rs diff --git a/packages/app/src/wasm/keeper.rs b/packages/layer/src/wasm/keeper.rs similarity index 100% rename from packages/app/src/wasm/keeper.rs rename to packages/layer/src/wasm/keeper.rs diff --git a/packages/app/src/wasm/mod.rs b/packages/layer/src/wasm/mod.rs similarity index 100% rename from packages/app/src/wasm/mod.rs rename to packages/layer/src/wasm/mod.rs diff --git a/packages/app/src/wasm/utils.rs b/packages/layer/src/wasm/utils.rs similarity index 100% rename from packages/app/src/wasm/utils.rs rename to packages/layer/src/wasm/utils.rs diff --git a/packages/app/src/wasm/vm/backend.rs b/packages/layer/src/wasm/vm/backend.rs similarity index 100% rename from packages/app/src/wasm/vm/backend.rs rename to packages/layer/src/wasm/vm/backend.rs diff --git a/packages/app/src/wasm/vm/cache.rs b/packages/layer/src/wasm/vm/cache.rs similarity index 100% rename from packages/app/src/wasm/vm/cache.rs rename to packages/layer/src/wasm/vm/cache.rs diff --git a/packages/app/src/wasm/vm/mod.rs b/packages/layer/src/wasm/vm/mod.rs similarity index 100% rename from packages/app/src/wasm/vm/mod.rs rename to packages/layer/src/wasm/vm/mod.rs diff --git a/peernode/README.md b/peernode/README.md deleted file mode 100644 index d5573fac..00000000 --- a/peernode/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# Peernode - -The peernode directory contains configuration and scripts to run a non-signing "peer node", -which can connect to localnode (default), or devnet. - -It assumes you have `docker` and `docker compose` installed locally. If you can run -`docker` as your current user (not just `root`), you can remove `sudo` from the following commands. - -It also assumes you have `curl` and `jq` installed locally - -## Running a Node - -Before starting peernode the first time, and anytime you wish to restart the blockchain, run -the following command. Without it, we maintain the blockchain state between restarts. - -```bash -./peernode/reset_volumes.sh -``` - -We also need to build the docker images for the chain (slay3rd and gateway) one -time before running a peernode, and each time you want to update the codebase. - -```bash -./scripts/build_docker.sh -``` - -### Executing a node - -To run without a facuet and just in-memory tracing, run the following: - -```bash -# Starting -./peernode/run.sh -sudo docker ps - -# Stopping -./peernode/stop.sh -sudo docker ps -a -``` - -### Connecting to dev net - -Dev-net has a different config, so you need to reset volumes to prepare it for that. Try the following: - -```bash -RPC=https://rpc.dev-cav3.net P2P=p2p.dev-cav3.net:26656 ./peernode/reset_volumes.sh -``` - -(TODO: enable p2p url and firewall on dev-net) - -## Interacting with a Node - -There are a few ways you can interact with a peernode. - -### Javascript Tests - -The [`js`](../js/) directory contains some integration tests for peernode, writing in CosmJS. -However, they are targeting the localnode. First, we need to edit [`testutils.spec.ts`](../js/src/testutils.spec.ts) -and replace all the `:26657` in `localNet` with `:36657`. - -Now, you can execute them against the local node - -```bash -npm ci -npm run test -``` - -See [the module's README](../js/README.md) for more information diff --git a/peernode/abci/config/slay3r.toml b/peernode/abci/config/slay3r.toml deleted file mode 100644 index 2cd8c4ec..00000000 --- a/peernode/abci/config/slay3r.toml +++ /dev/null @@ -1,6 +0,0 @@ -host = "0.0.0.0" -port = 36658 -jaeger = "http://jaeger:14268" -log = "debug" -rocksdb = "/root/.slay3r/data/app" -rpc_url = "http://cometbft:36657" diff --git a/peernode/comet/config/config.toml b/peernode/comet/config/config.toml deleted file mode 100644 index 95279356..00000000 --- a/peernode/comet/config/config.toml +++ /dev/null @@ -1,468 +0,0 @@ -# This is a TOML config file. -# For more information, see https://github.com/toml-lang/toml - -# NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or -# relative to the home directory (e.g. "data"). The home directory is -# "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable -# or --home cmd flag. - -####################################################################### -### Main Base Config Options ### -####################################################################### - -# TCP or UNIX socket address of the ABCI application, -# or the name of an ABCI application compiled in with the Tendermint binary -proxy_app = "tcp://127.0.0.1:36658" - -# A custom human readable name for this node -moniker = "Slay3r-peer-node" - -# If this node is many blocks behind the tip of the chain, BlockSync -# allows them to catchup quickly by downloading blocks in parallel -# and verifying their commits -block_sync = true - -# Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb -# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) -# - pure go -# - stable -# * cleveldb (uses levigo wrapper) -# - fast -# - requires gcc -# - use cleveldb build tag (go build -tags cleveldb) -# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) -# - EXPERIMENTAL -# - may be faster is some use-cases (random reads - indexer) -# - use boltdb build tag (go build -tags boltdb) -# * rocksdb (uses github.com/tecbot/gorocksdb) -# - EXPERIMENTAL -# - requires gcc -# - use rocksdb build tag (go build -tags rocksdb) -# * badgerdb (uses github.com/dgraph-io/badger) -# - EXPERIMENTAL -# - use badgerdb build tag (go build -tags badgerdb) -db_backend = "goleveldb" - -# Database directory -db_dir = "data" - -# Output level for logging, including package level options -log_level = "info" - -# Output format: 'plain' (colored text) or 'json' -log_format = "plain" - -##### additional base config options ##### - -# Path to the JSON file containing the initial validator set and other meta data -genesis_file = "config/genesis.json" - -# Path to the JSON file containing the private key to use as a validator in the consensus protocol -priv_validator_key_file = "config/priv_validator_key.json" - -# Path to the JSON file containing the last sign state of a validator -priv_validator_state_file = "data/priv_validator_state.json" - -# TCP or UNIX socket address for Tendermint to listen on for -# connections from an external PrivValidator process -priv_validator_laddr = "" - -# Path to the JSON file containing the private key to use for node authentication in the p2p protocol -node_key_file = "config/node_key.json" - -# Mechanism to connect to the ABCI application: socket | grpc -abci = "socket" - -# If true, query the ABCI app on connecting to a new peer -# so the app can decide if we should keep the connection or not -filter_peers = false - - -####################################################################### -### Advanced Configuration Options ### -####################################################################### - -####################################################### -### RPC Server Configuration Options ### -####################################################### -[rpc] - -# TCP or UNIX socket address for the RPC server to listen on -laddr = "tcp://0.0.0.0:36657" - -# A list of origins a cross-domain request can be executed from -# Default value '[]' disables cors support -# Use '["*"]' to allow any origin -cors_allowed_origins = ["*"] - -# A list of methods the client is allowed to use with cross-domain requests -cors_allowed_methods = ["HEAD", "GET", "POST", ] - -# A list of non simple headers the client is allowed to use with cross-domain requests -cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] - -# TCP or UNIX socket address for the gRPC server to listen on -# NOTE: This server only supports /broadcast_tx_commit -grpc_laddr = "" - -# Maximum number of simultaneous connections. -# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections -# If you want to accept a larger number than the default, make sure -# you increase your OS limits. -# 0 - unlimited. -# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} -# 1024 - 40 - 10 - 50 = 924 = ~900 -grpc_max_open_connections = 900 - -# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool -unsafe = false - -# Maximum number of simultaneous connections (including WebSocket). -# Does not include gRPC connections. See grpc_max_open_connections -# If you want to accept a larger number than the default, make sure -# you increase your OS limits. -# 0 - unlimited. -# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} -# 1024 - 40 - 10 - 50 = 924 = ~900 -max_open_connections = 900 - -# Maximum number of unique clientIDs that can /subscribe -# If you're using /broadcast_tx_commit, set to the estimated maximum number -# of broadcast_tx_commit calls per block. -max_subscription_clients = 100 - -# Maximum number of unique queries a given client can /subscribe to -# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to -# the estimated # maximum number of broadcast_tx_commit calls per block. -max_subscriptions_per_client = 5 - -# Experimental parameter to specify the maximum number of events a node will -# buffer, per subscription, before returning an error and closing the -# subscription. Must be set to at least 100, but higher values will accommodate -# higher event throughput rates (and will use more memory). -experimental_subscription_buffer_size = 200 - -# Experimental parameter to specify the maximum number of RPC responses that -# can be buffered per WebSocket client. If clients cannot read from the -# WebSocket endpoint fast enough, they will be disconnected, so increasing this -# parameter may reduce the chances of them being disconnected (but will cause -# the node to use more memory). -# -# Must be at least the same as "experimental_subscription_buffer_size", -# otherwise connections could be dropped unnecessarily. This value should -# ideally be somewhat higher than "experimental_subscription_buffer_size" to -# accommodate non-subscription-related RPC responses. -experimental_websocket_write_buffer_size = 200 - -# If a WebSocket client cannot read fast enough, at present we may -# silently drop events instead of generating an error or disconnecting the -# client. -# -# Enabling this experimental parameter will cause the WebSocket connection to -# be closed instead if it cannot read fast enough, allowing for greater -# predictability in subscription behavior. -experimental_close_on_slow_client = false - -# How long to wait for a tx to be committed during /broadcast_tx_commit. -# WARNING: Using a value larger than 10s will result in increasing the -# global HTTP write timeout, which applies to all connections and endpoints. -# See https://github.com/tendermint/tendermint/issues/3435 -timeout_broadcast_tx_commit = "10s" - -# Maximum size of request body, in bytes -max_body_bytes = 5000000 # 5MB enough for large wasm upload - -# Maximum size of request header, in bytes -max_header_bytes = 1048576 - -# The path to a file containing certificate that is used to create the HTTPS server. -# Might be either absolute path or path related to Tendermint's config directory. -# If the certificate is signed by a certificate authority, -# the certFile should be the concatenation of the server's certificate, any intermediates, -# and the CA's certificate. -# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. -# Otherwise, HTTP server is run. -tls_cert_file = "" - -# The path to a file containing matching private key that is used to create the HTTPS server. -# Might be either absolute path or path related to Tendermint's config directory. -# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server. -# Otherwise, HTTP server is run. -tls_key_file = "" - -# pprof listen address (https://golang.org/pkg/net/http/pprof) -pprof_laddr = "" - -####################################################### -### P2P Configuration Options ### -####################################################### -[p2p] - -# Address to listen for incoming connections -laddr = "tcp://0.0.0.0:36656" - -# Address to advertise to peers for them to dial -# If empty, will use the same port as the laddr, -# and will introspect on the listener or use UPnP -# to figure out the address. ip and port are required -# example: 159.89.10.97:26656 -external_address = "" - -# Comma separated list of seed nodes to connect to -seeds = "" - -# Comma separated list of nodes to keep persistent connections to -persistent_peers = "PEERS_HERE" - -# UPNP port forwarding -upnp = false - -# Path to address book -addr_book_file = "config/addrbook.json" - -# Set true for strict address routability rules -# Set false for private or local networks -addr_book_strict = true - -# Maximum number of inbound peers -max_num_inbound_peers = 40 - -# Maximum number of outbound peers to connect to, excluding persistent peers -max_num_outbound_peers = 10 - -# List of node IDs, to which a connection will be (re)established ignoring any existing limits -unconditional_peer_ids = "" - -# Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) -persistent_peers_max_dial_period = "0s" - -# Time to wait before flushing messages out on the connection -flush_throttle_timeout = "10ms" - -# Maximum size of a message packet payload, in bytes -max_packet_msg_payload_size = 1024 - -# Rate at which packets can be sent, in bytes/second -send_rate = 5120000 - -# Rate at which packets can be received, in bytes/second -recv_rate = 5120000 - -# Set true to enable the peer-exchange reactor -pex = true - -# Seed mode, in which node constantly crawls the network and looks for -# peers. If another node asks it for addresses, it responds and disconnects. -# -# Does not work if the peer-exchange reactor is disabled. -seed_mode = false - -# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) -private_peer_ids = "" - -# Toggle to disable guard against peers connecting from the same ip. -allow_duplicate_ip = false - -# Peer connection configuration. -handshake_timeout = "20s" -dial_timeout = "3s" - -####################################################### -### Mempool Configuration Option ### -####################################################### -[mempool] - -# Mempool version to use: -# 1) "v0" - (default) FIFO mempool. -# 2) "v1" - prioritized mempool. -version = "v0" - -recheck = true -broadcast = true -wal_dir = "" - -# Maximum number of transactions in the mempool -size = 5000 - -# Limit the total size of all txs in the mempool. -# This only accounts for raw transactions (e.g. given 1MB transactions and -# max_txs_bytes=5MB, mempool will only accept 5 transactions). -max_txs_bytes = 1073741824 - -# Size of the cache (used to filter transactions we saw earlier) in transactions -cache_size = 10000 - -# Do not remove invalid transactions from the cache (default: false) -# Set to true if it's not possible for any invalid transaction to become valid -# again in the future. -keep-invalid-txs-in-cache = false - -# Maximum size of a single transaction. -# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. -max_tx_bytes = 3145728 # 3 MB - -# Maximum size of a batch of transactions to send to a peer -# Including space needed by encoding (one varint per transaction). -# XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 -max_batch_bytes = 0 - -# ttl-duration, if non-zero, defines the maximum amount of time a transaction -# can exist for in the mempool. -# -# Note, if ttl-num-blocks is also defined, a transaction will be removed if it -# has existed in the mempool at least ttl-num-blocks number of blocks or if it's -# insertion time into the mempool is beyond ttl-duration. -ttl-duration = "30s" - -# ttl-num-blocks, if non-zero, defines the maximum number of blocks a transaction -# can exist for in the mempool. -# -# Note, if ttl-duration is also defined, a transaction will be removed if it -# has existed in the mempool at least ttl-num-blocks number of blocks or if -# it's insertion time into the mempool is beyond ttl-duration. -ttl-num-blocks = 30 - -####################################################### -### State Sync Configuration Options ### -####################################################### -[statesync] -# State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine -# snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in -# the network to take and serve state machine snapshots. State sync is not attempted if the node -# has any local state (LastBlockHeight > 0). The node will have a truncated block history, -# starting from the height of the snapshot. -enable = false - -# RPC servers (comma-separated) for light client verification of the synced state machine and -# retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding -# header hash obtained from a trusted source, and a period during which validators can be trusted. -# -# For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 -# weeks) during which they can be financially punished (slashed) for misbehavior. -rpc_servers = "" -trust_height = 0 -trust_hash = "" -trust_period = "168h0m0s" - -# Time to spend discovering snapshots before initiating a restore. -discovery_time = "15s" - -# Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). -# Will create a new, randomly named directory within, and remove it when done. -temp_dir = "" - -# The timeout duration before re-requesting a chunk, possibly from a different -# peer (default: 1 minute). -chunk_request_timeout = "10s" - -# The number of concurrent chunk fetchers to run (default: 1). -chunk_fetchers = "4" - -####################################################### -### Block Sync Configuration Options ### -####################################################### -[blocksync] - -# Block Sync version to use: -# -# In v0.37, v1 and v2 of the block sync protocols were deprecated. -# Please use v0 instead. -# -# 1) "v0" - the default block sync implementation -version = "v0" - -####################################################### -### Consensus Configuration Options ### -####################################################### -[consensus] - -wal_file = "data/cs.wal/wal" - -# How long we wait for a proposal block before prevoting nil -timeout_propose = "2s" -# How much timeout_propose increases with each round -timeout_propose_delta = "200ms" -# How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) -timeout_prevote = "100ms" -# How much the timeout_prevote increases with each round -timeout_prevote_delta = "200ms" -# How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) -timeout_precommit = "100ms" -# How much the timeout_precommit increases with each round -timeout_precommit_delta = "200ms" -# How long we wait after committing a block, before starting on the new -# height (this gives us a chance to receive some more precommits, even -# though we already have +2/3). -timeout_commit = "250ms" - -# How many blocks to look back to check existence of the node's consensus votes before joining consensus -# When non-zero, the node will panic upon restart -# if the same consensus key was used to sign {double_sign_check_height} last blocks. -# So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. -double_sign_check_height = 0 - -# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) -skip_timeout_commit = false - -# EmptyBlocks mode and possible interval between empty blocks -create_empty_blocks = true -create_empty_blocks_interval = "0s" - -# Reactor sleep duration parameters -peer_gossip_sleep_duration = "100ms" -peer_query_maj23_sleep_duration = "2s" - -####################################################### -### Storage Configuration Options ### -####################################################### -[storage] - -# Set to true to discard ABCI responses from the state store, which can save a -# considerable amount of disk space. Set to false to ensure ABCI responses are -# persisted. ABCI responses are required for /block_results RPC queries, and to -# reindex events in the command-line tool. -discard_abci_responses = false - -####################################################### -### Transaction Indexer Configuration Options ### -####################################################### -[tx_index] - -# What indexer to use for transactions -# -# The application will set which txs to index. In some cases a node operator will be able -# to decide which txs to index based on configuration set in the application. -# -# Options: -# 1) "null" -# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). -# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. -# 3) "psql" - the indexer services backed by PostgreSQL. -# When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. -indexer = "kv" - -# The PostgreSQL connection configuration, the connection format: -# postgresql://:@:/? -psql-conn = "" - -####################################################### -### Instrumentation Configuration Options ### -####################################################### -[instrumentation] - -# When true, Prometheus metrics are served under /metrics on -# PrometheusListenAddr. -# Check out the documentation for the list of available metrics. -prometheus = false - -# Address to listen for Prometheus collector(s) connections -prometheus_listen_addr = ":36660" - -# Maximum number of simultaneous connections. -# If you want to accept a larger number than the default, make sure -# you increase your OS limits. -# 0 - unlimited. -max_open_connections = 3 - -# Instrumentation namespace -namespace = "tendermint" diff --git a/peernode/docker-compose.yml b/peernode/docker-compose.yml deleted file mode 100644 index 588ab3c0..00000000 --- a/peernode/docker-compose.yml +++ /dev/null @@ -1,64 +0,0 @@ -# Usage: -# sudo ./scripts/build_docker.sh -# sudo ./scripts/reset_volumes.sh -# sudo docker compose up -# cd integration && npm ci && npm run test -# open http://localhost:18080 - -# http://localhost:36657 - Tendermint RPC -# http://localhost:19090 - gRPC -# http://localhost:11317 - "LCD" / "REST" - -volumes: - peer_lay3r_data: - external: true - peer_comet_data: - external: true - -services: - slay3r: - image: "ghcr.io/lay3rlabs/slay3rd:latest" - expose: - # abci server only for cometbft - - "36658" - ports: - # open grpc server - - "19090:9090" - volumes: - - peer_lay3r_data:/root/.slay3r - command: ["slay3rd"] - depends_on: - - jaeger - environment: - - RUST_BACKTRACE=1 - - cometbft: - image: "cometbft/cometbft:v0.38.12" - ports: - - "36656:36656" - - "36657:36657" - command: ["start", "--proxy_app", "tcp://slay3r:36658"] - volumes: - - peer_comet_data:/cometbft - depends_on: - - slay3r - - # Default all-memory Jaeger - jaeger: - image: jaegertracing/all-in-one:1.59 - expose: - - "6831/udp" - - "6832/udp" - - "14268" - ports: - - "18080:16686" - - gateway: - image: "ghcr.io/lay3rlabs/gateway:latest" - ports: - # rest port - - "11317:1317" - # connect to the grpc endpoint on lay3r - command: ["/app", "-grpc-server-endpoint", "slay3r:19090"] - depends_on: - - slay3r diff --git a/peernode/reset_volumes.sh b/peernode/reset_volumes.sh deleted file mode 100755 index 9fdb26f7..00000000 --- a/peernode/reset_volumes.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -set -eux - -ALPINE="alpine/curl:latest" -COMET="cometbft/cometbft:v0.38.12" - -# NOTE: override network to connect to by selecting this -# RPC=${RPC:-https://rpc.dev-cav3.net} -# RPC=${RPC:-http://172.17.0.1:26657} -RPC=${RPC:-http://localhost:26657} # from host perspective -P2P=${P2P:-172.17.0.1:26656} # from docker perspective - -SUDO="sudo" -if groups | grep -q docker; then - SUDO="" -fi - -SCRIPT_DIR="$(realpath "$(dirname "$0")")" - -# TODO: get the proper node to sync to - where do we set this? - -ABCI_VOL=peer_lay3r_data -$SUDO docker volume rm -f "$ABCI_VOL" -$SUDO docker volume create "$ABCI_VOL" - -# copy the data here -S=$($SUDO docker run --rm -d -v "$ABCI_VOL:/mnt" "$ALPINE" sleep 100) -$SUDO docker cp "$SCRIPT_DIR/abci/config" "$S:/mnt" -# register everything as root -$SUDO docker exec "$S" chown -R 0:0 /mnt -$SUDO docker kill "$S" - -COMET_VOL=peer_comet_data -$SUDO docker volume rm -f "$COMET_VOL" -$SUDO docker volume create "$COMET_VOL" - -# initialize data -$SUDO docker run --rm -d -v "$COMET_VOL:/cometbft" "$COMET" init - -# download the genesis here (requires curl and jq locally...) -curl -s "$RPC/genesis" | jq .result.genesis > "$SCRIPT_DIR/genesis.json" -PEER=$(curl -s "$RPC/status" | jq -r .result.node_info.id) -cat genesis.json - -# copy the config here -C=$($SUDO docker run --rm -d -v "$COMET_VOL:/mnt" "$ALPINE" sleep 100) -$SUDO docker cp "$SCRIPT_DIR/comet/config/config.toml" "$C:/mnt/config" -$SUDO docker cp "$SCRIPT_DIR/genesis.json" "$C:/mnt/config" -$SUDO rm "$SCRIPT_DIR/genesis.json" -# udpate the persistent peers -$SUDO docker exec "$C" sed -i -e "s/PEERS_HERE/$PEER@$P2P/" /mnt/config/config.toml -# register everything as tmuser -$SUDO docker exec "$C" chown -R 100:1000 /mnt - -$SUDO docker kill "$C" - - - diff --git a/peernode/run.sh b/peernode/run.sh deleted file mode 100755 index 2c6d8452..00000000 --- a/peernode/run.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -SCRIPT_DIR="$(realpath "$(dirname "$0")")" - -SUDO="sudo" -if groups | grep -q docker; then - SUDO="" -fi - -cd "$SCRIPT_DIR" -$SUDO docker compose up -d \ No newline at end of file diff --git a/peernode/stop.sh b/peernode/stop.sh deleted file mode 100755 index 5c309bf7..00000000 --- a/peernode/stop.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -SCRIPT_DIR="$(realpath "$(dirname "$0")")" - -SUDO="sudo" -if groups | grep -q docker; then - SUDO="" -fi - -cd "$SCRIPT_DIR" -$SUDO docker compose down diff --git a/scripts/build_docker.sh b/scripts/build_docker.sh index d7397e6c..d85a2679 100755 --- a/scripts/build_docker.sh +++ b/scripts/build_docker.sh @@ -6,6 +6,6 @@ if groups | grep -q docker; then SUDO="" fi -for img in gateway slay3rd; do +for img in gateway layerd; do $SUDO docker build . -f docker/Dockerfile.${img} -t ghcr.io/lay3rlabs/${img}:latest done diff --git a/scripts/build_proto_gateway.sh b/scripts/build_proto_gateway.sh index 3ff1d848..e4dd7263 100755 --- a/scripts/build_proto_gateway.sh +++ b/scripts/build_proto_gateway.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -eux +set -eu # This generates grpc-gateway bindings in the gateway directory @@ -10,11 +10,14 @@ if groups | grep -q docker; then SUDO="" fi -$SUDO docker run --rm -w /buf/proto -v $(pwd)/proto:/buf/proto -v $(pwd)/gateway:/buf/gateway "$IMAGE" ls-files -$SUDO docker run --rm -w /buf/proto -v $(pwd)/proto:/buf/proto -v $(pwd)/gateway:/buf/gateway "$IMAGE" generate +PROTOSPEC=$(pwd)/packages/cosmossdk/tools/protospec +GATEWAY=$(pwd)/packages/cosmossdk/tools/gateway + +$SUDO docker run --rm -w /buf/proto -v "$PROTOSPEC:/buf/proto" -v "$GATEWAY:/buf/gateway" "$IMAGE" ls-files +$SUDO docker run --rm -w /buf/proto -v "$PROTOSPEC:/buf/proto" -v "$GATEWAY:/buf/gateway" "$IMAGE" generate # change it back if we ran as root before if [ -n "$SUDO" ]; then WHOAMI=$(whoami) - sudo chown -R $WHOAMI:$WHOAMI ./gateway + sudo chown -R $WHOAMI:$WHOAMI "$GATEWAY" fi diff --git a/scripts/push_docker.sh b/scripts/push_docker.sh index d4de72eb..448a3808 100755 --- a/scripts/push_docker.sh +++ b/scripts/push_docker.sh @@ -12,7 +12,7 @@ fi TAG=${TAG:-} -for img in gateway slay3rd; do +for img in gateway layerd; do $SUDO docker push ghcr.io/lay3rlabs/${img}:latest if [ -n "$TAG" ]; then diff --git a/scripts/tag_docker.sh b/scripts/tag_docker.sh index 86bc4037..5f73e550 100755 --- a/scripts/tag_docker.sh +++ b/scripts/tag_docker.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eux -TAG=0.4.0 +TAG=0.5.1 # You need a personal access token (classic) from github. # https://github.com/settings/tokens @@ -12,7 +12,7 @@ if groups | grep -q docker; then SUDO="" fi -for img in gateway slay3rd faucet; do +for img in gateway layerd faucet; do $SUDO docker tag ghcr.io/lay3rlabs/$img:latest ghcr.io/lay3rlabs/$img:$TAG $SUDO docker push ghcr.io/lay3rlabs/$img:$TAG done