From 5ceb038a0a77e322ff661670a7e91aee59075976 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Sun, 5 Jan 2025 00:13:43 -0600 Subject: [PATCH 01/31] bump version --- .drone.yml | 2 +- Dockerfile | 4 ++-- cmd/starsd/cmd/start.go | 2 +- e2e/go.sum | 2 +- go.mod | 2 +- go.sum | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index f72f9ac23..700787a80 100644 --- a/.drone.yml +++ b/.drone.yml @@ -48,7 +48,7 @@ steps: path: /go commands: - apk add --no-cache ca-certificates build-base git - - wget https://github.com/CosmWasm/wasmvm/releases/download/v2.1.4/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a + - wget https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a - echo "a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac /lib/libwasmvm_muslc.x86_64.a" | sha256sum -c - LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build - echo "Ensuring binary is statically linked ..." && (file $PWD/bin/starsd | grep "statically linked") diff --git a/Dockerfile b/Dockerfile index 545f26bfb..655caa4a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,8 +16,8 @@ COPY . /code/ # See https://github.com/CosmWasm/wasmvm/releases # Download the correct version of libwasmvm for the given platform and verify checksum -ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.4/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a -ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.1.4/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a +ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a +ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a RUN echo "a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac /lib/libwasmvm_muslc.x86_64.a" | sha256sum -c RUN echo "faea4e15390e046d2ca8441c21a88dba56f9a0363f92c5d94015df0ac6da1f2d /lib/libwasmvm_muslc.aarch64.a" | sha256sum -c diff --git a/cmd/starsd/cmd/start.go b/cmd/starsd/cmd/start.go index b8ac4051c..a74ba904d 100644 --- a/cmd/starsd/cmd/start.go +++ b/cmd/starsd/cmd/start.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" ) -var LibwasmVersion = "2.1.4" +var LibwasmVersion = "2.2.1" func CheckLibwasmVersion(_ *cobra.Command, _ []string) error { version, err := wasmvmapi.LibwasmvmVersion() diff --git a/e2e/go.sum b/e2e/go.sum index 579b3d9fc..4d3f8e62a 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -244,7 +244,7 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEV github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/Shopify/toxiproxy v2.2.1+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/StirlingMarketingGroup/go-namecase v1.0.0 h1:2CzaNtCzc4iNHirR+5ru9OzGg8rQp860gqLBFqRI02Y= diff --git a/go.mod b/go.mod index fbf90d3b1..9a7506be3 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.22.8 require ( github.com/CosmWasm/wasmd v0.53.2 - github.com/CosmWasm/wasmvm/v2 v2.1.4 + github.com/CosmWasm/wasmvm/v2 v2.2.1 github.com/cometbft/cometbft v0.38.15 github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.50.11 diff --git a/go.sum b/go.sum index 297c60676..6c2c5b7d4 100644 --- a/go.sum +++ b/go.sum @@ -229,8 +229,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CosmWasm/wasmd v0.53.2 h1:c3MQjeQq+r+Zj2rPeW+c9kJmTevuNnZOIkiiCP/3bg4= github.com/CosmWasm/wasmd v0.53.2/go.mod h1:gP10E56tuToU5rsZR7vZLBL5ssW2mie6KN/WrQLG7/I= -github.com/CosmWasm/wasmvm/v2 v2.1.4 h1:7EUVQjBxXHkVjL2AqqXD7hMEe0dmoNn2li9E4PWRAnA= -github.com/CosmWasm/wasmvm/v2 v2.1.4/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg= +github.com/CosmWasm/wasmvm/v2 v2.2.1 h1:7EUVQjBxXHkVjL2AqqXD7hMEe0dmoNn2li9E4PWRAnA= +github.com/CosmWasm/wasmvm/v2 v2.2.1/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= @@ -242,7 +242,7 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEV github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/Shopify/toxiproxy v2.2.1+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.6 h1:k1/zc2jNfeiZBA5aFTRy37jlBIuCkXCm0XmvpzCKI9I= From 2d46988bbfd2874d410d15aab642a2d77efffa3b Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Sun, 5 Jan 2025 12:06:21 -0600 Subject: [PATCH 02/31] update shasum --- .drone.yml | 4 ++-- Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 700787a80..518589f58 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,7 +49,7 @@ steps: commands: - apk add --no-cache ca-certificates build-base git - wget https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a - - echo "a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac /lib/libwasmvm_muslc.x86_64.a" | sha256sum -c + - echo "b3bd755efac0ff39c01b59b8110f961c48aa3eb93588071d7a628270cc1f2326 /lib/libwasmvm_muslc.x86_64.a" | sha256sum -c - LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build - echo "Ensuring binary is statically linked ..." && (file $PWD/bin/starsd | grep "statically linked") environment: @@ -424,6 +424,6 @@ volumes: --- kind: signature -hmac: 96ed0e338ac7808aa42bdaae8e19f2fc75693763951efa5f8d9c9cca3afb3d9e +hmac: 3cd46999a6c2073a766eb4b250389aec4f13169adac843f5c6b8927207cbb4d1 ... diff --git a/Dockerfile b/Dockerfile index 655caa4a1..d308003ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,8 @@ COPY . /code/ # Download the correct version of libwasmvm for the given platform and verify checksum ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a -RUN echo "a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac /lib/libwasmvm_muslc.x86_64.a" | sha256sum -c -RUN echo "faea4e15390e046d2ca8441c21a88dba56f9a0363f92c5d94015df0ac6da1f2d /lib/libwasmvm_muslc.aarch64.a" | sha256sum -c +RUN echo "b3bd755efac0ff39c01b59b8110f961c48aa3eb93588071d7a628270cc1f2326 /lib/libwasmvm_muslc.x86_64.a" | sha256sum -c +RUN echo "ba6cb5db6b14a265c8556326c045880908db9b1d2ffb5d4aa9f09ac09b24cecc /lib/libwasmvm_muslc.aarch64.a" | sha256sum -c # force it to use static lib (from above) not standard libgo_cosmwasm.so file RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build From 5fe49459d873faf04cacd1b24021385afa056d1d Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Sun, 5 Jan 2025 12:17:55 -0600 Subject: [PATCH 03/31] bump wasmvm --- go.sum | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.sum b/go.sum index 6c2c5b7d4..68ba4f135 100644 --- a/go.sum +++ b/go.sum @@ -229,7 +229,7 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CosmWasm/wasmd v0.53.2 h1:c3MQjeQq+r+Zj2rPeW+c9kJmTevuNnZOIkiiCP/3bg4= github.com/CosmWasm/wasmd v0.53.2/go.mod h1:gP10E56tuToU5rsZR7vZLBL5ssW2mie6KN/WrQLG7/I= -github.com/CosmWasm/wasmvm/v2 v2.2.1 h1:7EUVQjBxXHkVjL2AqqXD7hMEe0dmoNn2li9E4PWRAnA= +github.com/CosmWasm/wasmvm/v2 v2.2.1 h1:cmOnM+TDfUl2VRugeo1eJBw4U/Lw0WLviuQHKSo9DVQ= github.com/CosmWasm/wasmvm/v2 v2.2.1/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= @@ -242,7 +242,7 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEV github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.2.1+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.6 h1:k1/zc2jNfeiZBA5aFTRy37jlBIuCkXCm0XmvpzCKI9I= From bdc4df4ee0946b2dac4441d9ca1cc37a1c7a9db9 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Sun, 5 Jan 2025 15:03:36 -0600 Subject: [PATCH 04/31] test inintial file --- .drone.star | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .drone.star diff --git a/.drone.star b/.drone.star new file mode 100644 index 000000000..4ac60c2c0 --- /dev/null +++ b/.drone.star @@ -0,0 +1,20 @@ +def main(ctx): + return[ + test_and_build(ctx), + ] + +def test_and_build(ctx): + return { + "kind": "pipeline", + "type": "docker", + "name": "test_and_build", + "steps": [ + { + "name": "build", + "image": "alpine", + "commands": [ + "echo hello world" + ] + } + ] + } From e8e22b46e17748dade65a8d1373c46a609e2c382 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Sun, 5 Jan 2025 15:21:41 -0600 Subject: [PATCH 05/31] add test step --- .drone.star | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/.drone.star b/.drone.star index 4ac60c2c0..a7076b101 100644 --- a/.drone.star +++ b/.drone.star @@ -1,20 +1,36 @@ def main(ctx): return[ - test_and_build(ctx), + pipeline_test_and_build(ctx), ] -def test_and_build(ctx): + +def pipeline_test_and_build(ctx): return { "kind": "pipeline", "type": "docker", "name": "test_and_build", "steps": [ - { - "name": "build", - "image": "alpine", - "commands": [ - "echo hello world" - ] - } + step_fetch(ctx), ] } + +# Fetch the latest tags from the repository +def step_fetch(ctx): + return { + "name": "fetch", + "image": "alpine/git", + "commands": [ + "git fetch --tags" + ] + } +def step_test(ctx): + return { + "name": "test", + "image": "publicawesome/golang:1.22.7-devtooling", + "commands": [ + "./scripts/go-test.sh" + ], + "environment": { + "GOPROXY": "http://goproxy" + } + } From a16ac8485893534160e1af8c125b9e16cf7782fe Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Sun, 5 Jan 2025 15:22:10 -0600 Subject: [PATCH 06/31] add to pipeline --- .drone.star | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.star b/.drone.star index a7076b101..7227e1402 100644 --- a/.drone.star +++ b/.drone.star @@ -11,6 +11,7 @@ def pipeline_test_and_build(ctx): "name": "test_and_build", "steps": [ step_fetch(ctx), + step_test(ctx), ] } From b28eab9ecda5b6392152aab2d5b354e322d01061 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Sun, 5 Jan 2025 15:27:59 -0600 Subject: [PATCH 07/31] add build step --- .drone.star | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.drone.star b/.drone.star index 7227e1402..a640ac746 100644 --- a/.drone.star +++ b/.drone.star @@ -1,3 +1,6 @@ + +go_dev_image = "publicawesome/golang:1.22.7-devtooling" +go_image = "golang:1.22.7-alpine3.19" def main(ctx): return[ pipeline_test_and_build(ctx), @@ -27,7 +30,7 @@ def step_fetch(ctx): def step_test(ctx): return { "name": "test", - "image": "publicawesome/golang:1.22.7-devtooling", + "image": go_dev_image, "commands": [ "./scripts/go-test.sh" ], @@ -35,3 +38,19 @@ def step_test(ctx): "GOPROXY": "http://goproxy" } } + +def step_build(ctx): + return { + "name": "build", + "image": go_image, + "commands": [ + "apk add --no-cache ca-certificates build-base git", + "wget https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a", + "echo 'b3bd755efac0ff39c01b59b8110f961c48aa3eb93588071d7a628270cc1f2326 /lib/libwasmvm_muslc.x86_64.a' | sha256sum -c", + "LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build", + "echo 'Ensuring binary is statically linked ...' && (file $PWD/bin/starsd | grep 'statically linked')" + ], + "environment": { + "GOPROXY": "http://goproxy" + } + } From 76022eb7c6a377aaf274901ca53ff886937cc292 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Sun, 5 Jan 2025 15:28:25 -0600 Subject: [PATCH 08/31] add build step --- .drone.star | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.star b/.drone.star index a640ac746..162a8cc82 100644 --- a/.drone.star +++ b/.drone.star @@ -15,6 +15,7 @@ def pipeline_test_and_build(ctx): "steps": [ step_fetch(ctx), step_test(ctx), + step_build(ctx), ] } From 7795cabda71c633f3b272ea253e43ac6bcd0e95a Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Mon, 6 Jan 2025 09:51:54 -0600 Subject: [PATCH 09/31] split pipelinne --- .drone.star | 57 ++------------------- scripts/drone/pipelines/test_and_build.star | 54 +++++++++++++++++++ 2 files changed, 57 insertions(+), 54 deletions(-) create mode 100644 scripts/drone/pipelines/test_and_build.star diff --git a/.drone.star b/.drone.star index 162a8cc82..8b8e81bdc 100644 --- a/.drone.star +++ b/.drone.star @@ -1,57 +1,6 @@ +load("scripts/drone/pipelines/test_and_build.star", "pipeline_test_and_build") -go_dev_image = "publicawesome/golang:1.22.7-devtooling" -go_image = "golang:1.22.7-alpine3.19" def main(ctx): - return[ - pipeline_test_and_build(ctx), + return [ + pipeline_test_and_build(ctx) ] - - -def pipeline_test_and_build(ctx): - return { - "kind": "pipeline", - "type": "docker", - "name": "test_and_build", - "steps": [ - step_fetch(ctx), - step_test(ctx), - step_build(ctx), - ] - } - -# Fetch the latest tags from the repository -def step_fetch(ctx): - return { - "name": "fetch", - "image": "alpine/git", - "commands": [ - "git fetch --tags" - ] - } -def step_test(ctx): - return { - "name": "test", - "image": go_dev_image, - "commands": [ - "./scripts/go-test.sh" - ], - "environment": { - "GOPROXY": "http://goproxy" - } - } - -def step_build(ctx): - return { - "name": "build", - "image": go_image, - "commands": [ - "apk add --no-cache ca-certificates build-base git", - "wget https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a", - "echo 'b3bd755efac0ff39c01b59b8110f961c48aa3eb93588071d7a628270cc1f2326 /lib/libwasmvm_muslc.x86_64.a' | sha256sum -c", - "LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build", - "echo 'Ensuring binary is statically linked ...' && (file $PWD/bin/starsd | grep 'statically linked')" - ], - "environment": { - "GOPROXY": "http://goproxy" - } - } diff --git a/scripts/drone/pipelines/test_and_build.star b/scripts/drone/pipelines/test_and_build.star new file mode 100644 index 000000000..3991f3fd9 --- /dev/null +++ b/scripts/drone/pipelines/test_and_build.star @@ -0,0 +1,54 @@ + +go_dev_image = "publicawesome/golang:1.22.7-devtooling" +go_image = "golang:1.22.7-alpine3.19" + + +def pipeline_test_and_build(ctx): + return { + "kind": "pipeline", + "type": "docker", + "name": "test_and_build", + "steps": [ + step_fetch(ctx), + step_test(ctx), + step_build(ctx), + ] + + } + +# Fetch the latest tags from the repository +def step_fetch(ctx): + return { + "name": "fetch", + "image": "alpine/git", + "commands": [ + "git fetch --tags" + ] + } +def step_test(ctx): + return { + "name": "test", + "image": go_dev_image, + "commands": [ + "./scripts/go-test.sh" + ], + "environment": { + "GOPROXY": "http://goproxy" + } + } + +def step_build(ctx): + return { + "name": "build", + "image": go_image, + "commands": [ + "apk add --no-cache ca-certificates build-base git", + "wget https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a", + "echo 'b3bd755efac0ff39c01b59b8110f961c48aa3eb93588071d7a628270cc1f2326 /lib/libwasmvm_muslc.x86_64.a' | sha256sum -c", + "LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build", + "echo 'Ensuring binary is statically linked ...' && (file $PWD/bin/starsd | grep 'statically linked')" + ], + "environment": { + "GOPROXY": "http://goproxy" + } + } From dbfd87568bbb58e6975d9f3da4cdd0e1519875ba Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Mon, 6 Jan 2025 10:01:23 -0600 Subject: [PATCH 10/31] convert to yml to support imports --- .drone.star.yml | 28 ++++++++++++++++++++++++++++ Makefile | 4 ++++ 2 files changed, 32 insertions(+) create mode 100644 .drone.star.yml diff --git a/.drone.star.yml b/.drone.star.yml new file mode 100644 index 000000000..65944a878 --- /dev/null +++ b/.drone.star.yml @@ -0,0 +1,28 @@ +--- +kind: pipeline +name: test_and_build +steps: +- commands: + - git fetch --tags + image: alpine/git + name: fetch +- commands: + - ./scripts/go-test.sh + environment: + GOPROXY: http://goproxy + image: publicawesome/golang:1.22.7-devtooling + name: test +- commands: + - apk add --no-cache ca-certificates build-base git + - wget https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.x86_64.a + -O /lib/libwasmvm_muslc.x86_64.a + - echo 'b3bd755efac0ff39c01b59b8110f961c48aa3eb93588071d7a628270cc1f2326 /lib/libwasmvm_muslc.x86_64.a' + | sha256sum -c + - LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build + - echo 'Ensuring binary is statically linked ...' && (file $PWD/bin/starsd | grep + 'statically linked') + environment: + GOPROXY: http://goproxy + image: golang:1.22.7-alpine3.19 + name: build +type: docker diff --git a/Makefile b/Makefile index 724f808e5..6dafcc2f0 100644 --- a/Makefile +++ b/Makefile @@ -188,3 +188,7 @@ proto-format: proto-lint: @$(protoImage) buf lint --error-format=json + + +drone-generate: + drone starlark --format --target .drone.star.yml From 14f427a2dd7170440a247760ff70444d8f0975e7 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 20:10:55 -0600 Subject: [PATCH 11/31] bump to go 1.23 --- .drone.star.yml | 8 ++++---- .drone.yml | 10 +++++----- Dockerfile | 2 +- Makefile | 4 ++-- docker/Dockerfile.go-devtools | 4 ++-- scripts/drone/pipelines/test_and_build.star | 11 ++++++----- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.drone.star.yml b/.drone.star.yml index 65944a878..dac843790 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -10,19 +10,19 @@ steps: - ./scripts/go-test.sh environment: GOPROXY: http://goproxy - image: publicawesome/golang:1.22.7-devtooling + image: publicawesome/golang:1.23.5-devtooling name: test - commands: - apk add --no-cache ca-certificates build-base git - - wget https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.x86_64.a + - wget https://github.com/CosmWasm/wasmvm/releases/download/v2.1.4/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a - - echo 'b3bd755efac0ff39c01b59b8110f961c48aa3eb93588071d7a628270cc1f2326 /lib/libwasmvm_muslc.x86_64.a' + - echo 'a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac' /lib/libwasmvm_muslc.x86_64.a' | sha256sum -c - LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build - echo 'Ensuring binary is statically linked ...' && (file $PWD/bin/starsd | grep 'statically linked') environment: GOPROXY: http://goproxy - image: golang:1.22.7-alpine3.19 + image: golang:1.23.5-alpine3.19 name: build type: docker diff --git a/.drone.yml b/.drone.yml index f8ec1b054..248e54dd3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -33,7 +33,7 @@ steps: branch: no-cache - name: test - image: publicawesome/golang:1.22.7-devtooling + image: publicawesome/golang:1.23.5-devtooling volumes: - name: cache path: /go @@ -42,7 +42,7 @@ steps: environment: GOPROXY: http://goproxy - name: build - image: golang:1.22.7-alpine3.19 + image: golang:1.23.5-alpine3.19 volumes: - name: cache path: /go @@ -99,7 +99,7 @@ steps: - tag - name: release - image: golang:1.22.7 + image: golang:1.23.5 environment: GITHUB_TOKEN: from_secret: github_token @@ -194,7 +194,7 @@ steps: environment: GOPROXY: http://goproxy - name: stargaze - image: publicawesome/golang:1.22.7-devtooling + image: publicawesome/golang:1.23.5-devtooling volumes: - name: cache path: /go @@ -282,7 +282,7 @@ steps: when: branch: no-cache - name: build-wrapper - image: publicawesome/golang:1.22.7-devtooling + image: publicawesome/golang:1.23.5-devtooling volumes: - name: cache path: /go diff --git a/Dockerfile b/Dockerfile index a01ec166b..06f877aea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # docker build . -t publicawesome/stargaze:latest # docker run --rm -it publicawesome/stargaze:latest /bin/sh -FROM golang:1.22.7-alpine3.19 AS go-builder +FROM golang:1.23.5-alpine3.19 AS go-builder RUN set -eux; apk add --no-cache ca-certificates build-base git; diff --git a/Makefile b/Makefile index 6dafcc2f0..2614fc6c5 100644 --- a/Makefile +++ b/Makefile @@ -86,8 +86,8 @@ endif check_go_version: @echo "Go version: $(GO_MAJOR_VERSION).$(GO_MINOR_VERSION)" -ifneq ($(GO_MINOR_VERSION),22) - @echo "ERROR: Go version 1.22 is required for this version of Stargaze" +ifneq ($(GO_MINOR_VERSION),23) + @echo "ERROR: Go version 1.23 is required for this version of Stargaze" exit 1 endif diff --git a/docker/Dockerfile.go-devtools b/docker/Dockerfile.go-devtools index 7ab01c880..4e869ae95 100644 --- a/docker/Dockerfile.go-devtools +++ b/docker/Dockerfile.go-devtools @@ -1,5 +1,5 @@ -# docker build . -t publicawesome/golang:1.22.7-devtooling -f docker/Dockerfile.go-devtools -FROM golang:1.22.7 +# docker build . -t publicawesome/golang:1.23.5-devtooling -f docker/Dockerfile.go-devtools +FROM golang:1.23.5 RUN apt-get update && \ apt-get install -y cmake && \ apt-get -y clean && \ diff --git a/scripts/drone/pipelines/test_and_build.star b/scripts/drone/pipelines/test_and_build.star index 3991f3fd9..36fdfe7c5 100644 --- a/scripts/drone/pipelines/test_and_build.star +++ b/scripts/drone/pipelines/test_and_build.star @@ -1,7 +1,8 @@ -go_dev_image = "publicawesome/golang:1.22.7-devtooling" -go_image = "golang:1.22.7-alpine3.19" - +go_dev_image = "publicawesome/golang:1.23.5-devtooling" +go_image = "golang:1.23.5-alpine3.19" +wasmvm_version = "v2.1.4" +wasmvm_x86_84_hash = "a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac" def pipeline_test_and_build(ctx): return { @@ -43,8 +44,8 @@ def step_build(ctx): "image": go_image, "commands": [ "apk add --no-cache ca-certificates build-base git", - "wget https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a", - "echo 'b3bd755efac0ff39c01b59b8110f961c48aa3eb93588071d7a628270cc1f2326 /lib/libwasmvm_muslc.x86_64.a' | sha256sum -c", + "wget https://github.com/CosmWasm/wasmvm/releases/download/{}/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a".format(wasmvm_version), + "echo '{}' /lib/libwasmvm_muslc.x86_64.a' | sha256sum -c".format(wasmvm_x86_84_hash), "LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build", "echo 'Ensuring binary is statically linked ...' && (file $PWD/bin/starsd | grep 'statically linked')" ], From 4391ae75b897dbca1f43b8ffb2604f16d7a9545a Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 20:18:33 -0600 Subject: [PATCH 12/31] bump go alpine --- .drone.star.yml | 2 +- scripts/drone/pipelines/test_and_build.star | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.star.yml b/.drone.star.yml index dac843790..0a01cdb70 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -23,6 +23,6 @@ steps: 'statically linked') environment: GOPROXY: http://goproxy - image: golang:1.23.5-alpine3.19 + image: golang:1.23.5-alpine3.20 name: build type: docker diff --git a/scripts/drone/pipelines/test_and_build.star b/scripts/drone/pipelines/test_and_build.star index 36fdfe7c5..479525b7b 100644 --- a/scripts/drone/pipelines/test_and_build.star +++ b/scripts/drone/pipelines/test_and_build.star @@ -1,6 +1,6 @@ go_dev_image = "publicawesome/golang:1.23.5-devtooling" -go_image = "golang:1.23.5-alpine3.19" +go_image = "golang:1.23.5-alpine3.20" wasmvm_version = "v2.1.4" wasmvm_x86_84_hash = "a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac" From 1cc2a9ddee87d6e9d2db13f1db365d617cc8ff2e Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 20:54:23 -0600 Subject: [PATCH 13/31] fix build script --- .drone.star.yml | 2 +- scripts/drone/pipelines/test_and_build.star | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.star.yml b/.drone.star.yml index 0a01cdb70..a057702e8 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -16,7 +16,7 @@ steps: - apk add --no-cache ca-certificates build-base git - wget https://github.com/CosmWasm/wasmvm/releases/download/v2.1.4/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a - - echo 'a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac' /lib/libwasmvm_muslc.x86_64.a' + - echo 'a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac /lib/libwasmvm_muslc.x86_64.a' | sha256sum -c - LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build - echo 'Ensuring binary is statically linked ...' && (file $PWD/bin/starsd | grep diff --git a/scripts/drone/pipelines/test_and_build.star b/scripts/drone/pipelines/test_and_build.star index 479525b7b..df6fb6e74 100644 --- a/scripts/drone/pipelines/test_and_build.star +++ b/scripts/drone/pipelines/test_and_build.star @@ -26,6 +26,7 @@ def step_fetch(ctx): "git fetch --tags" ] } + def step_test(ctx): return { "name": "test", @@ -45,7 +46,7 @@ def step_build(ctx): "commands": [ "apk add --no-cache ca-certificates build-base git", "wget https://github.com/CosmWasm/wasmvm/releases/download/{}/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a".format(wasmvm_version), - "echo '{}' /lib/libwasmvm_muslc.x86_64.a' | sha256sum -c".format(wasmvm_x86_84_hash), + "echo '{} /lib/libwasmvm_muslc.x86_64.a' | sha256sum -c".format(wasmvm_x86_84_hash), "LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build", "echo 'Ensuring binary is statically linked ...' && (file $PWD/bin/starsd | grep 'statically linked')" ], From 8228ceb38064bbc27a1e7a084a9be7b9b09ded4f Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 20:57:35 -0600 Subject: [PATCH 14/31] add docker dind service --- .drone.star.yml | 10 ++++++++ scripts/drone/pipelines/test_and_build.star | 27 ++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.drone.star.yml b/.drone.star.yml index a057702e8..9a68294bd 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -1,6 +1,13 @@ --- kind: pipeline name: test_and_build +services: +- image: docker:dind + name: dind + privileged: true + volumes: + - name: dockersock + path: /var/run steps: - commands: - git fetch --tags @@ -26,3 +33,6 @@ steps: image: golang:1.23.5-alpine3.20 name: build type: docker +volumes: +- name: dockersock + path: /var/run diff --git a/scripts/drone/pipelines/test_and_build.star b/scripts/drone/pipelines/test_and_build.star index df6fb6e74..d091fc13f 100644 --- a/scripts/drone/pipelines/test_and_build.star +++ b/scripts/drone/pipelines/test_and_build.star @@ -13,8 +13,13 @@ def pipeline_test_and_build(ctx): step_fetch(ctx), step_test(ctx), step_build(ctx), + ], + "volumes": [ + volume_dockersock(ctx) + ], + "services": [ + service_dind(ctx) ] - } # Fetch the latest tags from the repository @@ -54,3 +59,23 @@ def step_build(ctx): "GOPROXY": "http://goproxy" } } + + +def service_dind(ctx): + return { + "name": "dind", + "image": "docker:dind", + "privileged": True, + "volumes": [ + { + "name": "dockersock", + "path": "/var/run" + } + ] + } + +def volume_dockersock(ctx): + return { + "name": "dockersock", + "path": "/var/run" + } From 2bd47cb5ee00ac4c44bd1a64ecbf7b78585ae908 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 21:01:36 -0600 Subject: [PATCH 15/31] build docker --- .drone.star.yml | 7 +++++++ scripts/drone/pipelines/test_and_build.star | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/.drone.star.yml b/.drone.star.yml index 9a68294bd..995db2de5 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -32,6 +32,13 @@ steps: GOPROXY: http://goproxy image: golang:1.23.5-alpine3.20 name: build +- commands: + - docker build -t publicawesome/stargaze:latest . + image: docker:24.0.7-alpine3.20 + name: build_docker + volumes: + - name: dockersock + path: /var/run type: docker volumes: - name: dockersock diff --git a/scripts/drone/pipelines/test_and_build.star b/scripts/drone/pipelines/test_and_build.star index d091fc13f..799ae0948 100644 --- a/scripts/drone/pipelines/test_and_build.star +++ b/scripts/drone/pipelines/test_and_build.star @@ -13,6 +13,7 @@ def pipeline_test_and_build(ctx): step_fetch(ctx), step_test(ctx), step_build(ctx), + step_build_docker(ctx) ], "volumes": [ volume_dockersock(ctx) @@ -61,6 +62,18 @@ def step_build(ctx): } +def step_build_docker(ctx): + return { + "name": "build_docker", + "image": "docker:24.0.7-alpine3.20", + "commands": [ + "docker build -t publicawesome/stargaze:latest ." + ], + "volumes": [ + volume_dockersock(ctx) + ] + } + def service_dind(ctx): return { "name": "dind", From 38afd2afbe732ef67138a98c1a0260b00a8653c7 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 21:07:47 -0600 Subject: [PATCH 16/31] update docker version --- .drone.star.yml | 2 +- .drone.yml | 2 +- scripts/drone/pipelines/test_and_build.star | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.drone.star.yml b/.drone.star.yml index 995db2de5..6aba58fc9 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -34,7 +34,7 @@ steps: name: build - commands: - docker build -t publicawesome/stargaze:latest . - image: docker:24.0.7-alpine3.20 + image: docker:24 name: build_docker volumes: - name: dockersock diff --git a/.drone.yml b/.drone.yml index 248e54dd3..0293a1e40 100644 --- a/.drone.yml +++ b/.drone.yml @@ -424,6 +424,6 @@ volumes: --- kind: signature -hmac: 3f3de8b4a74ad66ba3729c9ba7799d2ca37680d68376ca8ce61faf11ac1c049b +hmac: af1d0bc62183b8e4e5701a0ad3eefa0d6eab0719a8d3805152dfdd6cdd0d4578 ... diff --git a/scripts/drone/pipelines/test_and_build.star b/scripts/drone/pipelines/test_and_build.star index 799ae0948..b5917e58f 100644 --- a/scripts/drone/pipelines/test_and_build.star +++ b/scripts/drone/pipelines/test_and_build.star @@ -65,7 +65,7 @@ def step_build(ctx): def step_build_docker(ctx): return { "name": "build_docker", - "image": "docker:24.0.7-alpine3.20", + "image": "docker:24", "commands": [ "docker build -t publicawesome/stargaze:latest ." ], @@ -92,3 +92,9 @@ def volume_dockersock(ctx): "name": "dockersock", "path": "/var/run" } + +def volume_docker_export(ctx): + return { + "name": "docker_export", + "path": "/containers/export" + } From f73270a739e35417792e7962520a6f7373fa919a Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 21:28:44 -0600 Subject: [PATCH 17/31] debug docker --- .drone.star.yml | 7 +++++++ scripts/drone/pipelines/test_and_build.star | 22 ++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.drone.star.yml b/.drone.star.yml index 6aba58fc9..836a78a1b 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -13,6 +13,13 @@ steps: - git fetch --tags image: alpine/git name: fetch +- commands: + - ls -ltrah /var/run + image: alpine + name: debug_dind + volumes: + - name: dockersock + path: /var/run - commands: - ./scripts/go-test.sh environment: diff --git a/scripts/drone/pipelines/test_and_build.star b/scripts/drone/pipelines/test_and_build.star index b5917e58f..56b91476d 100644 --- a/scripts/drone/pipelines/test_and_build.star +++ b/scripts/drone/pipelines/test_and_build.star @@ -3,6 +3,8 @@ go_dev_image = "publicawesome/golang:1.23.5-devtooling" go_image = "golang:1.23.5-alpine3.20" wasmvm_version = "v2.1.4" wasmvm_x86_84_hash = "a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac" +docker_image = "docker:24" +docker_dind_image = "docker:dind" def pipeline_test_and_build(ctx): return { @@ -11,9 +13,11 @@ def pipeline_test_and_build(ctx): "name": "test_and_build", "steps": [ step_fetch(ctx), + step_debug_dind(ctx), step_test(ctx), step_build(ctx), - step_build_docker(ctx) + step_build_docker(ctx), + ], "volumes": [ volume_dockersock(ctx) @@ -65,7 +69,7 @@ def step_build(ctx): def step_build_docker(ctx): return { "name": "build_docker", - "image": "docker:24", + "image": docker_image, "commands": [ "docker build -t publicawesome/stargaze:latest ." ], @@ -74,10 +78,22 @@ def step_build_docker(ctx): ] } +def step_debug_dind(ctx): + return { + "name": "debug_dind", + "image": "alpine", + "commands": [ + "ls -ltrah /var/run" + ], + "volumes": [ + volume_dockersock(ctx) + ] + } + def service_dind(ctx): return { "name": "dind", - "image": "docker:dind", + "image": docker_dind_image, "privileged": True, "volumes": [ { From be37107c3689de0039db26a86700feffa1056bd4 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 21:30:09 -0600 Subject: [PATCH 18/31] test --- .drone.star.yml | 4 +++- scripts/drone/pipelines/test_and_build.star | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.drone.star.yml b/.drone.star.yml index 836a78a1b..a72ee54c6 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -14,7 +14,9 @@ steps: image: alpine/git name: fetch - commands: - - ls -ltrah /var/run + - ls -l /var/run/docker.sock + - test -S /var/run/docker.sock && echo 'Docker socket found' || echo 'Docker socket + missing' image: alpine name: debug_dind volumes: diff --git a/scripts/drone/pipelines/test_and_build.star b/scripts/drone/pipelines/test_and_build.star index 56b91476d..3a4a4436f 100644 --- a/scripts/drone/pipelines/test_and_build.star +++ b/scripts/drone/pipelines/test_and_build.star @@ -83,7 +83,8 @@ def step_debug_dind(ctx): "name": "debug_dind", "image": "alpine", "commands": [ - "ls -ltrah /var/run" + "ls -l /var/run/docker.sock", + "test -S /var/run/docker.sock && echo 'Docker socket found' || echo 'Docker socket missing'" ], "volumes": [ volume_dockersock(ctx) From 757022829b193f2317b9db1c46054f65e05bb3b7 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 21:32:53 -0600 Subject: [PATCH 19/31] test direct path --- .drone.star.yml | 8 ++++---- scripts/drone/pipelines/test_and_build.star | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.drone.star.yml b/.drone.star.yml index a72ee54c6..2372ae790 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -7,7 +7,7 @@ services: privileged: true volumes: - name: dockersock - path: /var/run + path: /var/run/docker.sock steps: - commands: - git fetch --tags @@ -21,7 +21,7 @@ steps: name: debug_dind volumes: - name: dockersock - path: /var/run + path: /var/run/docker.sock - commands: - ./scripts/go-test.sh environment: @@ -47,8 +47,8 @@ steps: name: build_docker volumes: - name: dockersock - path: /var/run + path: /var/run/docker.sock type: docker volumes: - name: dockersock - path: /var/run + path: /var/run/docker.sock diff --git a/scripts/drone/pipelines/test_and_build.star b/scripts/drone/pipelines/test_and_build.star index 3a4a4436f..8ee121a67 100644 --- a/scripts/drone/pipelines/test_and_build.star +++ b/scripts/drone/pipelines/test_and_build.star @@ -99,7 +99,7 @@ def service_dind(ctx): "volumes": [ { "name": "dockersock", - "path": "/var/run" + "path": "/var/run/docker.sock" } ] } @@ -107,7 +107,7 @@ def service_dind(ctx): def volume_dockersock(ctx): return { "name": "dockersock", - "path": "/var/run" + "path": "/var/run/docker.sock" } def volume_docker_export(ctx): From bb6876afae0e1ee8c967ef493d173eb6ea555fd2 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 21:34:51 -0600 Subject: [PATCH 20/31] sleep --- .drone.star.yml | 1 + scripts/drone/pipelines/test_and_build.star | 1 + 2 files changed, 2 insertions(+) diff --git a/.drone.star.yml b/.drone.star.yml index 2372ae790..66135c162 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -14,6 +14,7 @@ steps: image: alpine/git name: fetch - commands: + - sleep 10 - ls -l /var/run/docker.sock - test -S /var/run/docker.sock && echo 'Docker socket found' || echo 'Docker socket missing' diff --git a/scripts/drone/pipelines/test_and_build.star b/scripts/drone/pipelines/test_and_build.star index 8ee121a67..afa22944f 100644 --- a/scripts/drone/pipelines/test_and_build.star +++ b/scripts/drone/pipelines/test_and_build.star @@ -83,6 +83,7 @@ def step_debug_dind(ctx): "name": "debug_dind", "image": "alpine", "commands": [ + "sleep 10", "ls -l /var/run/docker.sock", "test -S /var/run/docker.sock && echo 'Docker socket found' || echo 'Docker socket missing'" ], From eaf305527d8981c2c90862879461df37afeb831b Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 21:37:30 -0600 Subject: [PATCH 21/31] test --- .drone.star.yml | 97 +++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 48 deletions(-) diff --git a/.drone.star.yml b/.drone.star.yml index 66135c162..3a1367978 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -2,54 +2,55 @@ kind: pipeline name: test_and_build services: -- image: docker:dind - name: dind - privileged: true - volumes: - - name: dockersock - path: /var/run/docker.sock + - name: dind + image: docker:dind + privileged: true + volumes: + - name: dockersock + path: /var/run + steps: -- commands: - - git fetch --tags - image: alpine/git - name: fetch -- commands: - - sleep 10 - - ls -l /var/run/docker.sock - - test -S /var/run/docker.sock && echo 'Docker socket found' || echo 'Docker socket - missing' - image: alpine - name: debug_dind - volumes: - - name: dockersock - path: /var/run/docker.sock -- commands: - - ./scripts/go-test.sh - environment: - GOPROXY: http://goproxy - image: publicawesome/golang:1.23.5-devtooling - name: test -- commands: - - apk add --no-cache ca-certificates build-base git - - wget https://github.com/CosmWasm/wasmvm/releases/download/v2.1.4/libwasmvm_muslc.x86_64.a - -O /lib/libwasmvm_muslc.x86_64.a - - echo 'a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac /lib/libwasmvm_muslc.x86_64.a' - | sha256sum -c - - LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build - - echo 'Ensuring binary is statically linked ...' && (file $PWD/bin/starsd | grep - 'statically linked') - environment: - GOPROXY: http://goproxy - image: golang:1.23.5-alpine3.20 - name: build -- commands: - - docker build -t publicawesome/stargaze:latest . - image: docker:24 - name: build_docker - volumes: - - name: dockersock - path: /var/run/docker.sock + - commands: + - git fetch --tags + image: alpine/git + name: fetch + - commands: + - sleep 10 + - ls -l /var/run/docker.sock + - test -S /var/run/docker.sock && echo 'Docker socket found' || echo 'Docker socket + missing' + image: alpine + name: debug_dind + volumes: + - name: dockersock + path: /var/run + - commands: + - ./scripts/go-test.sh + environment: + GOPROXY: http://goproxy + image: publicawesome/golang:1.23.5-devtooling + name: test + - commands: + - apk add --no-cache ca-certificates build-base git + - wget https://github.com/CosmWasm/wasmvm/releases/download/v2.1.4/libwasmvm_muslc.x86_64.a + -O /lib/libwasmvm_muslc.x86_64.a + - echo 'a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac /lib/libwasmvm_muslc.x86_64.a' + | sha256sum -c + - LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build + - echo 'Ensuring binary is statically linked ...' && (file $PWD/bin/starsd | grep + 'statically linked') + environment: + GOPROXY: http://goproxy + image: golang:1.23.5-alpine3.20 + name: build + - commands: + - docker build -t publicawesome/stargaze:latest . + image: docker:24 + name: build_docker + volumes: + - name: dockersock + path: /var/run/docker.sock type: docker volumes: -- name: dockersock - path: /var/run/docker.sock + - name: dockersock + path: /var/run/docker.sock From 08bfed41fcf03292443de21a69cb9c40a11fe0ae Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 21:41:06 -0600 Subject: [PATCH 22/31] Test --- .drone.star.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.drone.star.yml b/.drone.star.yml index 3a1367978..003d8f439 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -14,8 +14,17 @@ steps: - git fetch --tags image: alpine/git name: fetch + - name: debug_file + image: alpine + commands: + - echo "test" > /var/run/test.txt + volumes: + - name: dockersock + path: /var/run - commands: - sleep 10 + - ls -l /var/run + - cat /var/run/test.txt - ls -l /var/run/docker.sock - test -S /var/run/docker.sock && echo 'Docker socket found' || echo 'Docker socket missing' @@ -49,8 +58,8 @@ steps: name: build_docker volumes: - name: dockersock - path: /var/run/docker.sock + path: /var/run type: docker volumes: - name: dockersock - path: /var/run/docker.sock + temp: {} From 1871ae8579a76c58b03fd8851017e93075e2abfb Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 21:45:36 -0600 Subject: [PATCH 23/31] mount volumes --- .drone.star.yml | 106 +++++++++----------- scripts/drone/pipelines/test_and_build.star | 21 ++-- 2 files changed, 60 insertions(+), 67 deletions(-) diff --git a/.drone.star.yml b/.drone.star.yml index 003d8f439..5bed2d261 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -2,64 +2,54 @@ kind: pipeline name: test_and_build services: - - name: dind - image: docker:dind - privileged: true - volumes: - - name: dockersock - path: /var/run - +- image: docker:dind + name: dind + privileged: true + volumes: + - name: dockersock + path: /var/run steps: - - commands: - - git fetch --tags - image: alpine/git - name: fetch - - name: debug_file - image: alpine - commands: - - echo "test" > /var/run/test.txt - volumes: - - name: dockersock - path: /var/run - - commands: - - sleep 10 - - ls -l /var/run - - cat /var/run/test.txt - - ls -l /var/run/docker.sock - - test -S /var/run/docker.sock && echo 'Docker socket found' || echo 'Docker socket - missing' - image: alpine - name: debug_dind - volumes: - - name: dockersock - path: /var/run - - commands: - - ./scripts/go-test.sh - environment: - GOPROXY: http://goproxy - image: publicawesome/golang:1.23.5-devtooling - name: test - - commands: - - apk add --no-cache ca-certificates build-base git - - wget https://github.com/CosmWasm/wasmvm/releases/download/v2.1.4/libwasmvm_muslc.x86_64.a - -O /lib/libwasmvm_muslc.x86_64.a - - echo 'a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac /lib/libwasmvm_muslc.x86_64.a' - | sha256sum -c - - LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build - - echo 'Ensuring binary is statically linked ...' && (file $PWD/bin/starsd | grep - 'statically linked') - environment: - GOPROXY: http://goproxy - image: golang:1.23.5-alpine3.20 - name: build - - commands: - - docker build -t publicawesome/stargaze:latest . - image: docker:24 - name: build_docker - volumes: - - name: dockersock - path: /var/run +- commands: + - git fetch --tags + image: alpine/git + name: fetch +- commands: + - sleep 10 + - ls -l /var/run/docker.sock + - test -S /var/run/docker.sock && echo 'Docker socket found' || echo 'Docker socket + missing' + image: alpine + name: debug_dind + volumes: + - name: dockersock + path: /var/run +- commands: + - ./scripts/go-test.sh + environment: + GOPROXY: http://goproxy + image: publicawesome/golang:1.23.5-devtooling + name: test +- commands: + - apk add --no-cache ca-certificates build-base git + - wget https://github.com/CosmWasm/wasmvm/releases/download/v2.1.4/libwasmvm_muslc.x86_64.a + -O /lib/libwasmvm_muslc.x86_64.a + - echo 'a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac /lib/libwasmvm_muslc.x86_64.a' + | sha256sum -c + - LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build + - echo 'Ensuring binary is statically linked ...' && (file $PWD/bin/starsd | grep + 'statically linked') + environment: + GOPROXY: http://goproxy + image: golang:1.23.5-alpine3.20 + name: build +- commands: + - docker build -t publicawesome/stargaze:latest . + image: docker:24 + name: build_docker + volumes: + - name: dockersock + path: /var/run type: docker volumes: - - name: dockersock - temp: {} +- name: dockersock + temp: {} diff --git a/scripts/drone/pipelines/test_and_build.star b/scripts/drone/pipelines/test_and_build.star index afa22944f..53ac68d6b 100644 --- a/scripts/drone/pipelines/test_and_build.star +++ b/scripts/drone/pipelines/test_and_build.star @@ -20,7 +20,7 @@ def pipeline_test_and_build(ctx): ], "volumes": [ - volume_dockersock(ctx) + create_volume_dockersock(ctx) ], "services": [ service_dind(ctx) @@ -74,7 +74,7 @@ def step_build_docker(ctx): "docker build -t publicawesome/stargaze:latest ." ], "volumes": [ - volume_dockersock(ctx) + mount_volume(ctx, "dockersock", "/var/run") ] } @@ -88,7 +88,7 @@ def step_debug_dind(ctx): "test -S /var/run/docker.sock && echo 'Docker socket found' || echo 'Docker socket missing'" ], "volumes": [ - volume_dockersock(ctx) + mount_volume(ctx, "dockersock", "/var/run") ] } @@ -98,17 +98,20 @@ def service_dind(ctx): "image": docker_dind_image, "privileged": True, "volumes": [ - { - "name": "dockersock", - "path": "/var/run/docker.sock" - } + mount_volume(ctx, "dockersock", "/var/run") ] } -def volume_dockersock(ctx): +def mount_volume(ctx, name, path): + return { + "name": name, + "path": path + } + +def create_volume_dockersock(ctx): return { "name": "dockersock", - "path": "/var/run/docker.sock" + "temp": dict() } def volume_docker_export(ctx): From 8531661affd0f86adff1997165c67ee7ed7e0a1a Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 21:52:35 -0600 Subject: [PATCH 24/31] fix go version --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 06f877aea..d053d9018 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # docker build . -t publicawesome/stargaze:latest # docker run --rm -it publicawesome/stargaze:latest /bin/sh -FROM golang:1.23.5-alpine3.19 AS go-builder +FROM golang:1.23.5-alpine3.20 AS go-builder RUN set -eux; apk add --no-cache ca-certificates build-base git; @@ -26,7 +26,7 @@ RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build # -------------------------------------------------------- -FROM alpine:3.19 +FROM alpine:3.20 COPY --from=go-builder /code/bin/starsd /usr/bin/starsd RUN apk add -U --no-cache ca-certificates From b839b5503e5fc8583c6f4d445f9a6943f1ad7a2c Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Tue, 28 Jan 2025 21:01:36 -0600 Subject: [PATCH 25/31] build docker and update go and alpine versions --- .drone.star.yml | 19 ++++++- .drone.yml | 2 +- Dockerfile | 4 +- scripts/drone/pipelines/test_and_build.star | 56 ++++++++++++++++++--- 4 files changed, 69 insertions(+), 12 deletions(-) diff --git a/.drone.star.yml b/.drone.star.yml index 9a68294bd..5bed2d261 100644 --- a/.drone.star.yml +++ b/.drone.star.yml @@ -13,6 +13,16 @@ steps: - git fetch --tags image: alpine/git name: fetch +- commands: + - sleep 10 + - ls -l /var/run/docker.sock + - test -S /var/run/docker.sock && echo 'Docker socket found' || echo 'Docker socket + missing' + image: alpine + name: debug_dind + volumes: + - name: dockersock + path: /var/run - commands: - ./scripts/go-test.sh environment: @@ -32,7 +42,14 @@ steps: GOPROXY: http://goproxy image: golang:1.23.5-alpine3.20 name: build +- commands: + - docker build -t publicawesome/stargaze:latest . + image: docker:24 + name: build_docker + volumes: + - name: dockersock + path: /var/run type: docker volumes: - name: dockersock - path: /var/run + temp: {} diff --git a/.drone.yml b/.drone.yml index 248e54dd3..0293a1e40 100644 --- a/.drone.yml +++ b/.drone.yml @@ -424,6 +424,6 @@ volumes: --- kind: signature -hmac: 3f3de8b4a74ad66ba3729c9ba7799d2ca37680d68376ca8ce61faf11ac1c049b +hmac: af1d0bc62183b8e4e5701a0ad3eefa0d6eab0719a8d3805152dfdd6cdd0d4578 ... diff --git a/Dockerfile b/Dockerfile index 06f877aea..d053d9018 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # docker build . -t publicawesome/stargaze:latest # docker run --rm -it publicawesome/stargaze:latest /bin/sh -FROM golang:1.23.5-alpine3.19 AS go-builder +FROM golang:1.23.5-alpine3.20 AS go-builder RUN set -eux; apk add --no-cache ca-certificates build-base git; @@ -26,7 +26,7 @@ RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build # -------------------------------------------------------- -FROM alpine:3.19 +FROM alpine:3.20 COPY --from=go-builder /code/bin/starsd /usr/bin/starsd RUN apk add -U --no-cache ca-certificates diff --git a/scripts/drone/pipelines/test_and_build.star b/scripts/drone/pipelines/test_and_build.star index d091fc13f..53ac68d6b 100644 --- a/scripts/drone/pipelines/test_and_build.star +++ b/scripts/drone/pipelines/test_and_build.star @@ -3,6 +3,8 @@ go_dev_image = "publicawesome/golang:1.23.5-devtooling" go_image = "golang:1.23.5-alpine3.20" wasmvm_version = "v2.1.4" wasmvm_x86_84_hash = "a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac" +docker_image = "docker:24" +docker_dind_image = "docker:dind" def pipeline_test_and_build(ctx): return { @@ -11,11 +13,14 @@ def pipeline_test_and_build(ctx): "name": "test_and_build", "steps": [ step_fetch(ctx), + step_debug_dind(ctx), step_test(ctx), step_build(ctx), + step_build_docker(ctx), + ], "volumes": [ - volume_dockersock(ctx) + create_volume_dockersock(ctx) ], "services": [ service_dind(ctx) @@ -61,21 +66,56 @@ def step_build(ctx): } +def step_build_docker(ctx): + return { + "name": "build_docker", + "image": docker_image, + "commands": [ + "docker build -t publicawesome/stargaze:latest ." + ], + "volumes": [ + mount_volume(ctx, "dockersock", "/var/run") + ] + } + +def step_debug_dind(ctx): + return { + "name": "debug_dind", + "image": "alpine", + "commands": [ + "sleep 10", + "ls -l /var/run/docker.sock", + "test -S /var/run/docker.sock && echo 'Docker socket found' || echo 'Docker socket missing'" + ], + "volumes": [ + mount_volume(ctx, "dockersock", "/var/run") + ] + } + def service_dind(ctx): return { "name": "dind", - "image": "docker:dind", + "image": docker_dind_image, "privileged": True, "volumes": [ - { - "name": "dockersock", - "path": "/var/run" - } + mount_volume(ctx, "dockersock", "/var/run") ] } -def volume_dockersock(ctx): +def mount_volume(ctx, name, path): + return { + "name": name, + "path": path + } + +def create_volume_dockersock(ctx): return { "name": "dockersock", - "path": "/var/run" + "temp": dict() + } + +def volume_docker_export(ctx): + return { + "name": "docker_export", + "path": "/containers/export" } From 3283cb98ee859e51249741b50c1284252a30d7f4 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Wed, 29 Jan 2025 11:41:14 -0600 Subject: [PATCH 26/31] enable preferred settings --- cmd/starsd/cmd/root.go | 4 ++ cmd/starsd/cmd/settings.go | 85 ++++++++++++++++++++++++++++++++++++++ cmd/starsd/cmd/start.go | 2 +- 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 cmd/starsd/cmd/settings.go diff --git a/cmd/starsd/cmd/root.go b/cmd/starsd/cmd/root.go index 750502c20..e2213a3e2 100644 --- a/cmd/starsd/cmd/root.go +++ b/cmd/starsd/cmd/root.go @@ -135,6 +135,8 @@ func NewRootCmd() *cobra.Command { panic(err) } + rootCmd.PersistentPreRunE = chainPreRuns(rootCmd.PersistentPreRunE, SetPreferredSettings, LogPreferredSettings) + return rootCmd } @@ -176,11 +178,13 @@ func initRootCmd( txCommand(), keys.Commands(), ) + } func addModuleInitFlags(startCmd *cobra.Command) { crisis.AddModuleInitFlags(startCmd) wasm.AddModuleInitFlags(startCmd) + startCmd.Flags().Bool(flagSkipPreferredSettings, false, "Skip preferred settings") startCmd.PreRunE = chainPreRuns(CheckLibwasmVersion, startCmd.PreRunE) } diff --git a/cmd/starsd/cmd/settings.go b/cmd/starsd/cmd/settings.go new file mode 100644 index 000000000..33e8ce8e5 --- /dev/null +++ b/cmd/starsd/cmd/settings.go @@ -0,0 +1,85 @@ +package cmd + +import ( + "time" + + "github.com/cosmos/cosmos-sdk/server" + "github.com/spf13/cobra" +) + +const flagSkipPreferredSettings = "skip-preferred-settings" + +type PreferredSetting struct { + ViperKey string + Value string + Set func(cmd *cobra.Command, serverCtx *server.Context, key, value string) error +} + +var preferredSettings = []PreferredSetting{ + { + ViperKey: "consensus.timeout_commit", + Value: "3s", + Set: func(cmd *cobra.Command, serverCtx *server.Context, key, value string) error { + serverCtx.Viper.Set(key, value) + serverCtx.Config.Consensus.TimeoutCommit = time.Duration(3 * time.Second) + return nil + }, + }, + { + ViperKey: "consensus.timeout_propose", + Value: "2s", + Set: func(cmd *cobra.Command, serverCtx *server.Context, key, value string) error { + serverCtx.Viper.Set(key, value) + serverCtx.Config.Consensus.TimeoutPropose = time.Duration(2 * time.Second) + return nil + }}, + { + ViperKey: "wasm.memory_cache_size", + Value: "1024", + Set: func(cmd *cobra.Command, serverCtx *server.Context, key, value string) error { + serverCtx.Viper.Set(key, value) + return nil + }, + }, +} + +func SetPreferredSettings(cmd *cobra.Command, _ []string) error { + + skip, err := cmd.Flags().GetBool(flagSkipPreferredSettings) + if err != nil { + return err + } + if skip { + return nil + } + + serverCtx := server.GetServerContextFromCmd(cmd) + + for _, setting := range preferredSettings { + err := setting.Set(cmd, serverCtx, setting.ViperKey, setting.Value) + if err != nil { + return err + } + } + + return server.SetCmdServerContext(cmd, serverCtx) +} + +func LogPreferredSettings(cmd *cobra.Command, _ []string) error { + serverCtx := server.GetServerContextFromCmd(cmd) + + skip, err := cmd.Flags().GetBool(flagSkipPreferredSettings) + if err != nil { + return err + } + + if !skip { + serverCtx.Logger.Info("using preferred settings use --skip-preferred-settings to disable") + } + + serverCtx.Logger.Info("using timeout_commit", "value", serverCtx.Config.Consensus.TimeoutCommit.String()) + serverCtx.Logger.Info("using timeout_propose", "value", serverCtx.Config.Consensus.TimeoutPropose.String()) + serverCtx.Logger.Info("using wasm.memory_cache_size", "value", serverCtx.Viper.Get("wasm.memory_cache_size")) + + return nil +} diff --git a/cmd/starsd/cmd/start.go b/cmd/starsd/cmd/start.go index a74ba904d..b8ac4051c 100644 --- a/cmd/starsd/cmd/start.go +++ b/cmd/starsd/cmd/start.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" ) -var LibwasmVersion = "2.2.1" +var LibwasmVersion = "2.1.4" func CheckLibwasmVersion(_ *cobra.Command, _ []string) error { version, err := wasmvmapi.LibwasmvmVersion() From bbcc2e26dbb63eadd813f68fb1b21e90f85e0653 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Wed, 29 Jan 2025 11:57:37 -0600 Subject: [PATCH 27/31] run on start only --- cmd/starsd/cmd/settings.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/starsd/cmd/settings.go b/cmd/starsd/cmd/settings.go index 33e8ce8e5..eabcfc0a3 100644 --- a/cmd/starsd/cmd/settings.go +++ b/cmd/starsd/cmd/settings.go @@ -44,6 +44,9 @@ var preferredSettings = []PreferredSetting{ } func SetPreferredSettings(cmd *cobra.Command, _ []string) error { + if cmd.Name() != "start" { + return nil + } skip, err := cmd.Flags().GetBool(flagSkipPreferredSettings) if err != nil { @@ -66,6 +69,9 @@ func SetPreferredSettings(cmd *cobra.Command, _ []string) error { } func LogPreferredSettings(cmd *cobra.Command, _ []string) error { + if cmd.Name() != "start" { + return nil + } serverCtx := server.GetServerContextFromCmd(cmd) skip, err := cmd.Flags().GetBool(flagSkipPreferredSettings) From fc676ccca0ec192198237c08337ed2d86abde18d Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Wed, 29 Jan 2025 11:59:22 -0600 Subject: [PATCH 28/31] update golang version --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0293a1e40..86de79e65 100644 --- a/.drone.yml +++ b/.drone.yml @@ -42,7 +42,7 @@ steps: environment: GOPROXY: http://goproxy - name: build - image: golang:1.23.5-alpine3.19 + image: golang:1.23.5-alpine3.20 volumes: - name: cache path: /go @@ -424,6 +424,6 @@ volumes: --- kind: signature -hmac: af1d0bc62183b8e4e5701a0ad3eefa0d6eab0719a8d3805152dfdd6cdd0d4578 +hmac: a80942702a28b4cedf791179e12807c3ddbafdbc39653b4fce9554517b508f5a ... From 963e76223a64f3d70959b51d65518f577d09e318 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Wed, 29 Jan 2025 12:02:46 -0600 Subject: [PATCH 29/31] fix libwasm hash --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 86de79e65..157307712 100644 --- a/.drone.yml +++ b/.drone.yml @@ -48,8 +48,8 @@ steps: path: /go commands: - apk add --no-cache ca-certificates build-base git - - wget https://github.com/CosmWasm/wasmvm/releases/download/v2.2.1/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a - - echo "b3bd755efac0ff39c01b59b8110f961c48aa3eb93588071d7a628270cc1f2326 /lib/libwasmvm_muslc.x86_64.a" | sha256sum -c + - wget https://github.com/CosmWasm/wasmvm/releases/download/v2.1.4/libwasmvm_muslc.x86_64.a -O /lib/libwasmvm_muslc.x86_64.a + - echo "a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac /lib/libwasmvm_muslc.x86_64.a" | sha256sum -c - LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build - echo "Ensuring binary is statically linked ..." && (file $PWD/bin/starsd | grep "statically linked") environment: @@ -424,6 +424,6 @@ volumes: --- kind: signature -hmac: a80942702a28b4cedf791179e12807c3ddbafdbc39653b4fce9554517b508f5a +hmac: e6fd049f5de1ea9b338daff05d443b5ec7bccbb97167f9a6dc66be3dfd7881e6 ... From 98aa1b25a4d840ef835491a693cb5bf4bb12daf2 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Wed, 29 Jan 2025 12:19:16 -0600 Subject: [PATCH 30/31] fix lint issues --- cmd/starsd/cmd/root.go | 1 - cmd/starsd/cmd/settings.go | 17 +++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/starsd/cmd/root.go b/cmd/starsd/cmd/root.go index e2213a3e2..696aee9b2 100644 --- a/cmd/starsd/cmd/root.go +++ b/cmd/starsd/cmd/root.go @@ -178,7 +178,6 @@ func initRootCmd( txCommand(), keys.Commands(), ) - } func addModuleInitFlags(startCmd *cobra.Command) { diff --git a/cmd/starsd/cmd/settings.go b/cmd/starsd/cmd/settings.go index eabcfc0a3..ad79a950b 100644 --- a/cmd/starsd/cmd/settings.go +++ b/cmd/starsd/cmd/settings.go @@ -12,31 +12,32 @@ const flagSkipPreferredSettings = "skip-preferred-settings" type PreferredSetting struct { ViperKey string Value string - Set func(cmd *cobra.Command, serverCtx *server.Context, key, value string) error + Set func(serverCtx *server.Context, key, value string) error } var preferredSettings = []PreferredSetting{ { ViperKey: "consensus.timeout_commit", Value: "3s", - Set: func(cmd *cobra.Command, serverCtx *server.Context, key, value string) error { + Set: func(serverCtx *server.Context, key, value string) error { serverCtx.Viper.Set(key, value) - serverCtx.Config.Consensus.TimeoutCommit = time.Duration(3 * time.Second) + serverCtx.Config.Consensus.TimeoutCommit = 3 * time.Second return nil }, }, { ViperKey: "consensus.timeout_propose", Value: "2s", - Set: func(cmd *cobra.Command, serverCtx *server.Context, key, value string) error { + Set: func(serverCtx *server.Context, key, value string) error { serverCtx.Viper.Set(key, value) - serverCtx.Config.Consensus.TimeoutPropose = time.Duration(2 * time.Second) + serverCtx.Config.Consensus.TimeoutPropose = 2 * time.Second return nil - }}, + }, + }, { ViperKey: "wasm.memory_cache_size", Value: "1024", - Set: func(cmd *cobra.Command, serverCtx *server.Context, key, value string) error { + Set: func(serverCtx *server.Context, key, value string) error { serverCtx.Viper.Set(key, value) return nil }, @@ -59,7 +60,7 @@ func SetPreferredSettings(cmd *cobra.Command, _ []string) error { serverCtx := server.GetServerContextFromCmd(cmd) for _, setting := range preferredSettings { - err := setting.Set(cmd, serverCtx, setting.ViperKey, setting.Value) + err := setting.Set(serverCtx, setting.ViperKey, setting.Value) if err != nil { return err } From e22505b68d707e7df3b2a52dfe06a45e6d0d4dc5 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Wed, 29 Jan 2025 12:36:24 -0600 Subject: [PATCH 31/31] bump ibc-hooks --- .drone.yml | 12 ++++++------ go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index 157307712..ef66eeb0b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -77,12 +77,12 @@ steps: password: from_secret: docker_password tags: - - 15.0.0-alpha.5 + - 15.0.0-alpha.6 when: event: - push branch: - - jhernandezb/fix-cron + - jhernandezb/ci-starlark - main - name: docker_release image: plugins/docker @@ -353,7 +353,7 @@ steps: - ./scripts/ci/upgrade/proposal.sh - name: stargaze-upgraded pull: always - image: publicawesome/stargaze:15.0.0-alpha.5 + image: publicawesome/stargaze:15.0.0-alpha.6 commands: - ./scripts/ci/upgrade/run-upgrade.sh environment: @@ -372,7 +372,7 @@ steps: - http://icad:26657 - name: check-params pull: always - image: publicawesome/stargaze:15.0.0-alpha.5 + image: publicawesome/stargaze:15.0.0-alpha.6 commands: - starsd q mint params --node http://stargaze-upgraded:26657 - starsd q alloc params --node http://stargaze-upgraded:26657 @@ -411,7 +411,7 @@ steps: trigger: branch: - main - - jhernandezb/fix-cron + - jhernandezb/ci-starlark event: - pull_request - push @@ -424,6 +424,6 @@ volumes: --- kind: signature -hmac: e6fd049f5de1ea9b338daff05d443b5ec7bccbb97167f9a6dc66be3dfd7881e6 +hmac: b4fff1025b0382cb7da82819a4193894007fe959061dbfe709ab9e142b4933da ... diff --git a/go.mod b/go.mod index 4fc7ef66d..5d25cf6f5 100644 --- a/go.mod +++ b/go.mod @@ -226,7 +226,7 @@ replace ( github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 // TODO: update afer official release - github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 => github.com/public-awesome/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20241211032059-0cbb0ab1dd93 + github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 => github.com/public-awesome/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20250129183033-079b03c57592 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 // TODO: remove after https://github.com/spf13/viper/issues/1706 gets fixed github.com/spf13/viper => github.com/spf13/viper v1.17.0 diff --git a/go.sum b/go.sum index c5cdc66b1..810292d52 100644 --- a/go.sum +++ b/go.sum @@ -950,8 +950,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/public-awesome/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20241211032059-0cbb0ab1dd93 h1:lP4IhTGA5ofKrtxbmOonyYlwpFnpoMlaNVBdm6rJIAs= -github.com/public-awesome/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20241211032059-0cbb0ab1dd93/go.mod h1:goY+Rwme+gTLS1jMIfVZ8t7+g6sfU3KFSaT/anjTi3o= +github.com/public-awesome/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20250129183033-079b03c57592 h1:9d3J5hp6Byh46DucY2v+Gokcwjx/oO5bigXmjyk3MFQ= +github.com/public-awesome/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20250129183033-079b03c57592/go.mod h1:Ey2qRry7072+p/PWIk9ceL2HfJmW30XgI+7Zxd8r30M= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=