diff --git a/Dockerfile.kyve b/images/Dockerfile.kyve similarity index 100% rename from Dockerfile.kyve rename to images/Dockerfile.kyve diff --git a/tests/Dockerfile b/tests/Dockerfile index 68a8d82..2768247 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -20,6 +20,30 @@ RUN wget -qO- https://github.com/KYVENetwork/chain/releases/download/v1.0.0/kyve && ~/bins/kyved-v1.0.0 init ksync --chain-id kyve-1 \ && wget https://raw.githubusercontent.com/KYVENetwork/networks/main/kyve-1/genesis.json -O ~/.kyve/config/genesis.json +# install cosmovisor with all kyve versions for upgrade testing +RUN go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.6.0 + +ENV DAEMON_HOME=/root/.kyve +ENV DAEMON_NAME=kyved + +RUN cosmovisor init ~/bins/kyved-v1.0.0 + +RUN wget -qO- https://github.com/KYVENetwork/chain/releases/download/v1.1.3/kyved_mainnet_linux_amd64.tar.gz | tar -xzv \ + && cosmovisor add-upgrade v1.1.0 kyved + +RUN wget -qO- https://github.com/KYVENetwork/chain/releases/download/v1.2.2/kyved_mainnet_linux_amd64.tar.gz | tar -xzv \ + && cosmovisor add-upgrade v1.2.0 kyved + +RUN wget -qO- https://github.com/KYVENetwork/chain/releases/download/v1.3.2/kyved_mainnet_linux_amd64.tar.gz | tar -xzv \ + && cosmovisor add-upgrade v1.3.0 kyved + +RUN wget -qO- https://github.com/KYVENetwork/chain/releases/download/v1.4.0/kyved_mainnet_linux_amd64.tar.gz | tar -xzv \ + && cosmovisor add-upgrade v1.4.0 kyved + +RUN wget https://github.com/KYVENetwork/chain/releases/download/v1.5.0/kyved_mainnet_linux_amd64 -O kyved \ + && chmod +x kyved \ + && cosmovisor add-upgrade v1.5.0 kyved + # install dydxprotocold RUN wget -qO- https://github.com/dydxprotocol/v4-chain/releases/download/protocol%2Fv2.0.1/dydxprotocold-v2.0.1-linux-amd64.tar.gz | tar -xzv \ && mv build/dydxprotocold-v2.0.1-linux-amd64 ~/bins/dydxprotocold-v2.0.1 \ @@ -55,3 +79,10 @@ RUN git clone --depth 1 --branch v0.1.1-beta-patch https://github.com/andromedap && cd .. \ && rm -r andromedad \ && sed -i -r 's/minimum-gas-prices = ""/minimum-gas-prices = "0uandr"/' ~/.andromeda/config/app.toml + +# install nobled +RUN wget https://github.com/noble-assets/noble/releases/download/v8.0.3/nobled_linux-amd64 \ + && chmod +x nobled_linux-amd64 \ + && mv nobled_linux-amd64 ~/bins/nobled-v8.0.3 \ + && ~/bins/nobled-v8.0.3 init ksync --chain-id noble-1 \ + && wget https://raw.githubusercontent.com/strangelove-ventures/noble-networks/main/mainnet/noble-1/genesis.json -O ~/.noble/config/genesis.json diff --git a/tests/height_sync_test.bats b/tests/height_sync_test.bats index ca311e0..a428ad6 100644 --- a/tests/height_sync_test.bats +++ b/tests/height_sync_test.bats @@ -8,6 +8,11 @@ [ "$status" -eq 0 ] } +@test "KYVE Cosmovisor: try to height-sync with an upgrade betweeen snapshot and target height" { + run ./build/ksync height-sync --opt-out -b cosmovisor -c kaon-1 -t 2061120 -d -a -y + [ "$status" -eq 0 ] +} + @test "dYdX: height sync to specific height" { run ./build/ksync height-sync --opt-out -b $HOME/bins/dydxprotocold-v2.0.1 -c kaon-1 -t 5935178 -r -d -y [ "$status" -eq 0 ] @@ -27,3 +32,13 @@ run ./build/ksync height-sync --opt-out -b $HOME/bins/andromedad-1-v0.1.1-beta-patch -c kaon-1 -t 2700020 -r -d -y [ "$status" -eq 0 ] } + +@test "Noble: height-sync to specific height" { + run ./build/ksync height-sync --opt-out -b $HOME/bins/nobled-v8.0.3 -t 16557020 -r -d -y + [ "$status" -eq 0 ] +} + +@test "Noble: height-sync to specific height on snapshot height" { + run ./build/ksync height-sync --opt-out -b $HOME/bins/nobled-v8.0.3 -t 16554000 -r -d -y + [ "$status" -eq 0 ] +}