From fd82cf4f3ded99066441b2e6ab5656eae4600eab Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Sat, 31 Aug 2024 18:54:14 -0400 Subject: [PATCH] chore: simplify build scripts --- devbox.json | 6 +++--- new.Dockerfile | 15 +++++++++++++++ proto/did/v1/genesis.proto | 32 ++++++++++++++++++++------------ 3 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 new.Dockerfile diff --git a/devbox.json b/devbox.json index 00c605fbd..0d4d00570 100644 --- a/devbox.json +++ b/devbox.json @@ -1,15 +1,15 @@ { "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json", - "packages": ["golangci-lint@latest", "go@1.21", "air@latest"], + "packages": ["go@1.21", "air@latest"], "env": { "GOPATH": "$HOME/go", "PATH": "$HOME/go/bin:$PATH" }, "shell": { "scripts": { - "install": ["make install"], + "init": ["make install", "sonrd init"], "proto": ["make proto-gen"], - "build": ["go build -o ./bin/sonrd ./cmd/sonrd"], + "build": ["make build", "make local-image"], "testnet": ["make sh-testnet"] } } diff --git a/new.Dockerfile b/new.Dockerfile new file mode 100644 index 000000000..411dd5e3d --- /dev/null +++ b/new.Dockerfile @@ -0,0 +1,15 @@ +FROM jetpackio/devbox:latest + +# Installing your devbox project +WORKDIR /code +USER root:root + +RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code + +USER ${DEVBOX_USER}:${DEVBOX_USER} + +COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json + +RUN devbox run -- echo "Installed Packages." + +ENTRYPOINT ["devbox", "run"] diff --git a/proto/did/v1/genesis.proto b/proto/did/v1/genesis.proto index a847f1d3d..92a75192c 100644 --- a/proto/did/v1/genesis.proto +++ b/proto/did/v1/genesis.proto @@ -26,6 +26,9 @@ message Params { // Whitelisted Key Types repeated KeyInfo allowed_public_keys = 3; + + // Whitlested Validator nodes with Public DID Resolvers + repeated ValidatorInfo public_validators = 4; } // AssetInfo defines the asset info @@ -54,11 +57,23 @@ message ChainInfo { string symbol = 4; string bech32_prefix = 5; string genesis_time = 6; - repeated Endpoint grpc_endpoints = 7; - repeated Endpoint rest_endpoints = 8; - ExplorerInfo explorer = 9; - FeeInfo fee_info = 10; - + } + +// KeyInfo defines information for accepted PubKey types +message KeyInfo { + KeyType kind = 1; + string algorithm = 2; // e.g., "ES256", "EdDSA", "ES256K" + string curve = 3; // e.g., "P-256", "Ed25519", "secp256k1" + string encoding = 4; // e.g., "hex", "base64", "multibase" +} + +// ValidatorInfo defines information for accepted Validator nodes +message ValidatorInfo { + repeated Endpoint grpc_endpoints = 5; + repeated Endpoint rest_endpoints = 6; + ExplorerInfo explorer = 7; + FeeInfo fee_info = 8; + // Endpoint defines an endpoint message Endpoint { string url = 1; @@ -81,13 +96,6 @@ message ChainInfo { } } -// KeyInfo defines information for accepted PubKey types -message KeyInfo { - KeyType kind = 1; - string algorithm = 2; // e.g., "ES256", "EdDSA", "ES256K" - string curve = 3; // e.g., "P-256", "Ed25519", "secp256k1" - string encoding = 4; // e.g., "hex", "base64", "multibase" -} // DIDNamespace define the different namespaces of DID enum DIDNamespace {