From 4a4873c9a3a1110dfb13a44dec51445dfd5be86d Mon Sep 17 00:00:00 2001 From: Csongor Kiss Date: Fri, 25 Aug 2023 19:19:25 +0100 Subject: [PATCH] aptos: upgrade to 2.0.3 (toolchain and stdlib) This upgrades the toolchain and the move dependencies to https://github.com/aptos-labs/aptos-core/commit/eb0144a39ada521d8dee01c9dbd601853d383fb3. Also required adding the `--dev` flag to the test commands in the makefiles, as that is no longer the default with the new toolchain. --- aptos/Docker.md | 6 +++--- aptos/Dockerfile | 4 ++-- aptos/Dockerfile.base | 4 ++-- aptos/coin/Makefile | 2 +- aptos/coin/Move.toml | 2 +- aptos/deployer/Makefile | 2 +- aptos/deployer/Move.toml | 2 +- aptos/nft_bridge/Makefile | 2 +- aptos/nft_bridge/Move.toml | 8 ++++---- aptos/token_bridge/Makefile | 2 +- aptos/token_bridge/Move.toml | 8 ++++---- aptos/wormhole/Makefile | 2 +- aptos/wormhole/Move.toml | 8 ++++---- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/aptos/Docker.md b/aptos/Docker.md index eb3d3d9e6b..e5ab407759 100644 --- a/aptos/Docker.md +++ b/aptos/Docker.md @@ -1,11 +1,11 @@ # first build the image -(cd ..; DOCKER_BUILDKIT=1 docker build -f aptos/Dockerfile.base -t aptos .) +(cd ..; DOCKER_BUILDKIT=1 docker buildx build --platform linux/amd64 -f aptos/Dockerfile.base -t aptos .) # tag the image with the appropriate version -docker tag aptos:latest ghcr.io/wormhole-foundation/aptos:1.0.4_2 +docker tag aptos:latest ghcr.io/wormhole-foundation/aptos:2.0.3 # push to ghcr -docker push ghcr.io/wormhole-foundation/aptos:1.0.4_2 +docker push ghcr.io/wormhole-foundation/aptos:2.0.3 diff --git a/aptos/Dockerfile b/aptos/Dockerfile index fceef8d74a..1ef0b9c26e 100644 --- a/aptos/Dockerfile +++ b/aptos/Dockerfile @@ -1,12 +1,12 @@ FROM cli-gen AS cli-export FROM const-gen AS const-export -FROM ghcr.io/wormhole-foundation/aptos:1.0.4_2@sha256:020ff492894ad93fd5ad94f75c93e791b191983d0f40fe7dae793758fd0f96f9 as aptos +FROM ghcr.io/wormhole-foundation/aptos:2.0.3@sha256:1e79c5a615b10073a780122abfaaf9b90735912df560b4e7b6a056fe45816392 as aptos # Support additional root CAs COPY cert.pem* /certs/ RUN if [ -e /certs/cert.pem ]; then cp /certs/cert.pem /etc/ssl/certs/ca-certificates.crt; fi -# Install nodejs +# Install nodejs # todo(aki): move this into base image? RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && apt-get update && apt-get install -y nodejs diff --git a/aptos/Dockerfile.base b/aptos/Dockerfile.base index f48b063771..31533b51b5 100644 --- a/aptos/Dockerfile.base +++ b/aptos/Dockerfile.base @@ -7,8 +7,8 @@ WORKDIR /tmp RUN git clone https://github.com/aptos-labs/aptos-core.git WORKDIR /tmp/aptos-core -# Build aptos 1.0.4 -RUN git reset --hard 61615bb3326fc8770e6df04d52aec97afa9148df +# Build aptos 2.0.3 +RUN git reset --hard eb0144a39ada521d8dee01c9dbd601853d383fb3 RUN cargo build -p aptos --profile cli FROM rust:1.62@sha256:5777f201f507075309c4d2d1c1e8d8219e654ae1de154c844341050016a64a0c as export-stage diff --git a/aptos/coin/Makefile b/aptos/coin/Makefile index ff1a029c33..d5708730b3 100644 --- a/aptos/coin/Makefile +++ b/aptos/coin/Makefile @@ -11,4 +11,4 @@ build: .PHONY: test ## Run tests test: - aptos move test \ No newline at end of file + aptos move test --dev diff --git a/aptos/coin/Move.toml b/aptos/coin/Move.toml index 9bafebeab2..26ec4b02a2 100644 --- a/aptos/coin/Move.toml +++ b/aptos/coin/Move.toml @@ -4,7 +4,7 @@ version = "0.0.1" upgrade_policy = "compatible" [dependencies] -MoveStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/move-stdlib/", rev = "2c74a456298fcd520241a562119b6fe30abdaae2" } +MoveStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/move-stdlib/", rev = "eb0144a39ada521d8dee01c9dbd601853d383fb3" } [dev-addresses] wrapped_coin = "0x0" diff --git a/aptos/deployer/Makefile b/aptos/deployer/Makefile index 025c38ddb4..d5708730b3 100644 --- a/aptos/deployer/Makefile +++ b/aptos/deployer/Makefile @@ -11,4 +11,4 @@ build: .PHONY: test ## Run tests test: - aptos move test + aptos move test --dev diff --git a/aptos/deployer/Move.toml b/aptos/deployer/Move.toml index 8b7a668e6e..87393b2dba 100644 --- a/aptos/deployer/Move.toml +++ b/aptos/deployer/Move.toml @@ -4,7 +4,7 @@ version = '1.0.0' [dependencies.AptosFramework] git = 'https://github.com/aptos-labs/aptos-core.git' -rev = '2c74a456298fcd520241a562119b6fe30abdaae2' +rev = 'eb0144a39ada521d8dee01c9dbd601853d383fb3' subdir = 'aptos-move/framework/aptos-framework' [dev-addresses] diff --git a/aptos/nft_bridge/Makefile b/aptos/nft_bridge/Makefile index 025c38ddb4..d5708730b3 100644 --- a/aptos/nft_bridge/Makefile +++ b/aptos/nft_bridge/Makefile @@ -11,4 +11,4 @@ build: .PHONY: test ## Run tests test: - aptos move test + aptos move test --dev diff --git a/aptos/nft_bridge/Move.toml b/aptos/nft_bridge/Move.toml index 33bb7e68ca..9c16c436fc 100644 --- a/aptos/nft_bridge/Move.toml +++ b/aptos/nft_bridge/Move.toml @@ -3,10 +3,10 @@ name = "NFTBridge" version = "0.0.1" [dependencies] -AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "2c74a456298fcd520241a562119b6fe30abdaae2" } -MoveStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/move-stdlib/", rev = "2c74a456298fcd520241a562119b6fe30abdaae2" } -AptosStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib/", rev = "2c74a456298fcd520241a562119b6fe30abdaae2" } -AptosToken = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token/", rev = "2c74a456298fcd520241a562119b6fe30abdaae2" } +AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "eb0144a39ada521d8dee01c9dbd601853d383fb3" } +MoveStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/move-stdlib/", rev = "eb0144a39ada521d8dee01c9dbd601853d383fb3" } +AptosStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib/", rev = "eb0144a39ada521d8dee01c9dbd601853d383fb3" } +AptosToken = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token/", rev = "eb0144a39ada521d8dee01c9dbd601853d383fb3" } Wormhole = { local = "../wormhole/" } TokenBridge = { local = "../token_bridge/" } Deployer = { local = "../deployer/" } diff --git a/aptos/token_bridge/Makefile b/aptos/token_bridge/Makefile index 025c38ddb4..d5708730b3 100644 --- a/aptos/token_bridge/Makefile +++ b/aptos/token_bridge/Makefile @@ -11,4 +11,4 @@ build: .PHONY: test ## Run tests test: - aptos move test + aptos move test --dev diff --git a/aptos/token_bridge/Move.toml b/aptos/token_bridge/Move.toml index 8671eb7e82..967914d836 100644 --- a/aptos/token_bridge/Move.toml +++ b/aptos/token_bridge/Move.toml @@ -3,10 +3,10 @@ name = "TokenBridge" version = "0.0.1" [dependencies] -AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "2c74a456298fcd520241a562119b6fe30abdaae2" } -MoveStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/move-stdlib/", rev = "2c74a456298fcd520241a562119b6fe30abdaae2" } -AptosStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib/", rev = "2c74a456298fcd520241a562119b6fe30abdaae2" } -AptosToken = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token/", rev = "2c74a456298fcd520241a562119b6fe30abdaae2" } +AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "eb0144a39ada521d8dee01c9dbd601853d383fb3" } +MoveStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/move-stdlib/", rev = "eb0144a39ada521d8dee01c9dbd601853d383fb3" } +AptosStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib/", rev = "eb0144a39ada521d8dee01c9dbd601853d383fb3" } +AptosToken = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token/", rev = "eb0144a39ada521d8dee01c9dbd601853d383fb3" } Wormhole = { local = "../wormhole/" } Deployer = { local = "../deployer/" } diff --git a/aptos/wormhole/Makefile b/aptos/wormhole/Makefile index 025c38ddb4..d5708730b3 100644 --- a/aptos/wormhole/Makefile +++ b/aptos/wormhole/Makefile @@ -11,4 +11,4 @@ build: .PHONY: test ## Run tests test: - aptos move test + aptos move test --dev diff --git a/aptos/wormhole/Move.toml b/aptos/wormhole/Move.toml index 7f08c38fd1..43dc9c836f 100644 --- a/aptos/wormhole/Move.toml +++ b/aptos/wormhole/Move.toml @@ -4,10 +4,10 @@ version = "0.0.1" upgrade_policy = "compatible" [dependencies] -AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "2c74a456298fcd520241a562119b6fe30abdaae2" } -MoveStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/move-stdlib/", rev = "2c74a456298fcd520241a562119b6fe30abdaae2" } -AptosStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib/", rev = "2c74a456298fcd520241a562119b6fe30abdaae2" } -AptosToken = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token/", rev = "2c74a456298fcd520241a562119b6fe30abdaae2" } +AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "eb0144a39ada521d8dee01c9dbd601853d383fb3" } +MoveStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/move-stdlib/", rev = "eb0144a39ada521d8dee01c9dbd601853d383fb3" } +AptosStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib/", rev = "eb0144a39ada521d8dee01c9dbd601853d383fb3" } +AptosToken = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-token/", rev = "eb0144a39ada521d8dee01c9dbd601853d383fb3" } Deployer = { local = "../deployer/" } # U256 = { git = "https://github.com/pontem-network/u256", rev = "main" }