Browse Source

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.
Csongor Kiss 2 năm trước cách đây
mục cha
commit
4a4873c9a3

+ 3 - 3
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

+ 2 - 2
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
 

+ 2 - 2
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

+ 1 - 1
aptos/coin/Makefile

@@ -11,4 +11,4 @@ build:
 .PHONY: test
 ## Run tests
 test:
-	aptos move test
+	aptos move test --dev

+ 1 - 1
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"

+ 1 - 1
aptos/deployer/Makefile

@@ -11,4 +11,4 @@ build:
 .PHONY: test
 ## Run tests
 test:
-	aptos move test
+	aptos move test --dev

+ 1 - 1
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]

+ 1 - 1
aptos/nft_bridge/Makefile

@@ -11,4 +11,4 @@ build:
 .PHONY: test
 ## Run tests
 test:
-	aptos move test
+	aptos move test --dev

+ 4 - 4
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/" }

+ 1 - 1
aptos/token_bridge/Makefile

@@ -11,4 +11,4 @@ build:
 .PHONY: test
 ## Run tests
 test:
-	aptos move test
+	aptos move test --dev

+ 4 - 4
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/" }
 

+ 1 - 1
aptos/wormhole/Makefile

@@ -11,4 +11,4 @@ build:
 .PHONY: test
 ## Run tests
 test:
-	aptos move test
+	aptos move test --dev

+ 4 - 4
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"  }