From 65c9afd6f9ac71123f9c2620b01ecc3f240c8361 Mon Sep 17 00:00:00 2001 From: Augustus Chang Date: Tue, 27 Aug 2024 08:11:04 -0400 Subject: [PATCH] update build process --- .github/actions/install-cairo/action.yml | 4 +- .../contracts/aggregator_consumer/Scarb.lock | 84 ++++++++++++++++++- .../contracts/aggregator_consumer/Scarb.toml | 4 +- .../aggregator_consumer/scripts/Scarb.toml | 7 +- integration-tests/testconfig/default.toml | 26 +++--- ops/charts/devnet/templates/deployment.yaml | 2 +- ops/devnet/environment.go | 2 +- ops/scripts/devnet-hardhat.sh | 4 +- scripts/devnet.sh | 4 +- 9 files changed, 111 insertions(+), 26 deletions(-) diff --git a/.github/actions/install-cairo/action.yml b/.github/actions/install-cairo/action.yml index d3f1524d6..098f1bdc2 100644 --- a/.github/actions/install-cairo/action.yml +++ b/.github/actions/install-cairo/action.yml @@ -4,11 +4,11 @@ description: A composite action that installs cairo and scarb binaries inputs: cairo_version: description: Cairo release version - default: "v2.6.4" + default: "v2.7.1" required: false scarb_version: description: Scarb release version - default: "v2.6.5" + default: "v2.7.1" required: false runs: diff --git a/examples/contracts/aggregator_consumer/Scarb.lock b/examples/contracts/aggregator_consumer/Scarb.lock index 586d04a23..5e31f265b 100644 --- a/examples/contracts/aggregator_consumer/Scarb.lock +++ b/examples/contracts/aggregator_consumer/Scarb.lock @@ -18,8 +18,88 @@ dependencies = [ [[package]] name = "openzeppelin" -version = "0.10.0" -source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.10.0#d77082732daab2690ba50742ea41080eb23299d3" +version = "0.15.1" +source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983" +dependencies = [ + "openzeppelin_access", + "openzeppelin_account", + "openzeppelin_governance", + "openzeppelin_introspection", + "openzeppelin_presets", + "openzeppelin_security", + "openzeppelin_token", + "openzeppelin_upgrades", + "openzeppelin_utils", +] + +[[package]] +name = "openzeppelin_access" +version = "0.15.1" +source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983" +dependencies = [ + "openzeppelin_introspection", + "openzeppelin_utils", +] + +[[package]] +name = "openzeppelin_account" +version = "0.15.1" +source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983" +dependencies = [ + "openzeppelin_introspection", + "openzeppelin_utils", +] + +[[package]] +name = "openzeppelin_governance" +version = "0.15.1" +source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983" +dependencies = [ + "openzeppelin_access", + "openzeppelin_introspection", +] + +[[package]] +name = "openzeppelin_introspection" +version = "0.15.1" +source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983" + +[[package]] +name = "openzeppelin_presets" +version = "0.15.1" +source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983" +dependencies = [ + "openzeppelin_access", + "openzeppelin_account", + "openzeppelin_introspection", + "openzeppelin_token", + "openzeppelin_upgrades", +] + +[[package]] +name = "openzeppelin_security" +version = "0.15.1" +source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983" + +[[package]] +name = "openzeppelin_token" +version = "0.15.1" +source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983" +dependencies = [ + "openzeppelin_account", + "openzeppelin_governance", + "openzeppelin_introspection", +] + +[[package]] +name = "openzeppelin_upgrades" +version = "0.15.1" +source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983" + +[[package]] +name = "openzeppelin_utils" +version = "0.15.1" +source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983" [[package]] name = "snforge_std" diff --git a/examples/contracts/aggregator_consumer/Scarb.toml b/examples/contracts/aggregator_consumer/Scarb.toml index e7868b138..13bd148e2 100644 --- a/examples/contracts/aggregator_consumer/Scarb.toml +++ b/examples/contracts/aggregator_consumer/Scarb.toml @@ -6,14 +6,14 @@ [package] name = "aggregator_consumer" version = "0.1.0" -cairo-version = "2.6.3" +cairo-version = "2.7.1" # See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html [dependencies] snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.21.0" } chainlink = { path = "../../../contracts" } -starknet = ">=2.6.3" +starknet = ">=2.7.1" [lib] diff --git a/examples/contracts/aggregator_consumer/scripts/Scarb.toml b/examples/contracts/aggregator_consumer/scripts/Scarb.toml index bf06f1d83..d29b2d515 100644 --- a/examples/contracts/aggregator_consumer/scripts/Scarb.toml +++ b/examples/contracts/aggregator_consumer/scripts/Scarb.toml @@ -1,7 +1,7 @@ [package] name = "src" version = "0.1.0" -cairo-version = "2.6.3" +cairo-version = "2.7.1" # See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html @@ -9,7 +9,7 @@ cairo-version = "2.6.3" sncast_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.21.0" } chainlink = { path = "../../../../contracts" } aggregator_consumer = { path = "../" } -starknet = ">=2.6.3" +starknet = ">=2.7.1" [lib] casm = true @@ -19,6 +19,5 @@ casm = true build-external-contracts = [ "chainlink::emergency::sequencer_uptime_feed::SequencerUptimeFeed", "chainlink::ocr2::mocks::mock_aggregator::MockAggregator", - "aggregator_consumer::ocr2::consumer::AggregatorConsumer" + "aggregator_consumer::ocr2::consumer::AggregatorConsumer", ] - diff --git a/integration-tests/testconfig/default.toml b/integration-tests/testconfig/default.toml index 9302ca824..1734db1b8 100644 --- a/integration-tests/testconfig/default.toml +++ b/integration-tests/testconfig/default.toml @@ -1,24 +1,30 @@ # This is the default configuration so OCR2 tests can run without issues [ChainlinkImage] -image="public.ecr.aws/chainlink/chainlink" -version="2.9.0" +image = "public.ecr.aws/chainlink/chainlink" +version = "2.9.0" [Logging] -test_log_collect=false +test_log_collect = false [Logging.LogStream] -log_targets=["file"] -log_producer_timeout="10s" -log_producer_retry_limit=10 +log_targets = ["file"] +log_producer_timeout = "10s" +log_producer_retry_limit = 10 [Network] -selected_networks=["SIMULATED"] # Not needed for Starknet but mandatory from CTF (do not change) +selected_networks = [ + "SIMULATED", +] # Not needed for Starknet but mandatory from CTF (do not change) [Network.RpcHttpUrls] -simulated = ["http://127.0.0.1"] # Not needed for Starknet but mandatory from CTF (do not change) +simulated = [ + "http://127.0.0.1", +] # Not needed for Starknet but mandatory from CTF (do not change) [Network.RpcWsUrls] -simulated = ["wss://127.0.0.1"] # Not needed for Starknet but mandatory from CTF (do not change) +simulated = [ + "wss://127.0.0.1", +] # Not needed for Starknet but mandatory from CTF (do not change) [Common] internal_docker_repo = "public.ecr.aws/chainlink" @@ -26,7 +32,7 @@ inside_k8 = false network = "localnet" user = "satoshi" stateful_db = false -devnet_image = "shardlabs/starknet-devnet-rs:a147b4cd72f9ce9d1fa665d871231370db0f51c7" +devnet_image = "shardlabs/starknet-devnet-rs:438da575b2a514c44d8a70ca6169f9dd7e585b2c" postgres_version = "15.7" [OCR2] diff --git a/ops/charts/devnet/templates/deployment.yaml b/ops/charts/devnet/templates/deployment.yaml index f3c841bb6..5b372249d 100644 --- a/ops/charts/devnet/templates/deployment.yaml +++ b/ops/charts/devnet/templates/deployment.yaml @@ -29,7 +29,7 @@ spec: {{- if eq .Values.real_node true }} image: "{{ .Values.repository | default "eqlabs/pathfinder"}}:{{ .Values.tag | default "v0.1.8-alpha"}}" {{- else }} - image: "{{ .Values.repository | default "shardlabs/starknet-devnet-rs"}}:{{ .Values.tag | default "a147b4cd72f9ce9d1fa665d871231370db0f51c7"}}" + image: "{{ .Values.repository | default "shardlabs/starknet-devnet-rs"}}:{{ .Values.tag | default "438da575b2a514c44d8a70ca6169f9dd7e585b2c"}}" args: ["--port", {{ .Values.service.internalPort | quote}}, "--seed", {{ .Values.seed | quote}}, "--account-class", "cairo1", "--gas-price", "1", "--data-gas-price", "1"] {{- end }} imagePullPolicy: IfNotPresent diff --git a/ops/devnet/environment.go b/ops/devnet/environment.go index 6948a91e2..b801d7e4d 100644 --- a/ops/devnet/environment.go +++ b/ops/devnet/environment.go @@ -73,7 +73,7 @@ func defaultProps() map[string]any { "starknet-dev": map[string]any{ "image": map[string]any{ "image": "shardlabs/starknet-devnet-rs", - "version": "a147b4cd72f9ce9d1fa665d871231370db0f51c7", + "version": "438da575b2a514c44d8a70ca6169f9dd7e585b2c", }, "resources": map[string]any{ "requests": map[string]any{ diff --git a/ops/scripts/devnet-hardhat.sh b/ops/scripts/devnet-hardhat.sh index c56d67880..c9a0a677a 100755 --- a/ops/scripts/devnet-hardhat.sh +++ b/ops/scripts/devnet-hardhat.sh @@ -13,10 +13,10 @@ bash "$(dirname -- "$0")/devnet-hardhat-down.sh" echo "Checking CPU structure..." if [[ $cpu_struct == *"arm"* ]]; then echo "Starting arm devnet container..." - container_version="${CONTAINER_VERSION:-a147b4cd72f9ce9d1fa665d871231370db0f51c7}-arm" + container_version="${CONTAINER_VERSION:-438da575b2a514c44d8a70ca6169f9dd7e585b2c}-arm" else echo "Starting i386 devnet container..." - container_version="${CONTAINER_VERSION:-a147b4cd72f9ce9d1fa665d871231370db0f51c7}" + container_version="${CONTAINER_VERSION:-438da575b2a514c44d8a70ca6169f9dd7e585b2c}" fi echo "Starting starknet-devnet" diff --git a/scripts/devnet.sh b/scripts/devnet.sh index 70fb3a3a2..921484b04 100755 --- a/scripts/devnet.sh +++ b/scripts/devnet.sh @@ -13,10 +13,10 @@ echo "Checking CPU structure..." if [[ $cpu_struct == *"arm"* ]] then echo "Starting arm devnet container..." - container_version="a147b4cd72f9ce9d1fa665d871231370db0f51c7-arm" + container_version="438da575b2a514c44d8a70ca6169f9dd7e585b2c-arm" else echo "Starting i386 devnet container..." - container_version="a147b4cd72f9ce9d1fa665d871231370db0f51c7" + container_version="438da575b2a514c44d8a70ca6169f9dd7e585b2c" fi echo "Starting starknet-devnet"