diff --git a/buildkite/src/Command/DockerImage.dhall b/buildkite/src/Command/DockerImage.dhall index 286cb7710df..fc0dd9165fe 100644 --- a/buildkite/src/Command/DockerImage.dhall +++ b/buildkite/src/Command/DockerImage.dhall @@ -10,6 +10,8 @@ let Size = ./Size.dhall let Profiles = ../Constants/Profiles.dhall +let Artifacts = ../Constants/Artifacts.dhall + let BuildFlags = ../Constants/BuildFlags.dhall let Cmd = ../Lib/Cmds.dhall @@ -42,7 +44,7 @@ let ReleaseSpec = { deps = [] : List Command.TaggedKey.Type , network = "${Network.lowerName Network.Type.Devnet}" , version = "\\\${MINA_DOCKER_TAG}" - , service = "\\\${MINA_SERVICE}" + , service = Artifacts.dockerName Artifacts.Type.Daemon , branch = "\\\${BUILDKITE_BRANCH}" , repo = "\\\${BUILDKITE_REPO}" , deb_codename = "bullseye" @@ -66,8 +68,8 @@ let generateStep = let buildDockerCmd = "./scripts/docker/build.sh" ++ " --service ${spec.service}" - ++ " --version ${spec.version}" ++ " --network ${spec.network}" + ++ " --version ${spec.version}" ++ " --branch ${spec.branch}" ++ " ${maybeCacheOption} " ++ " --deb-codename ${spec.deb_codename}" diff --git a/buildkite/src/Command/HardforkPackageGeneration.dhall b/buildkite/src/Command/HardforkPackageGeneration.dhall index 7353a8e9bb3..183826d81b4 100644 --- a/buildkite/src/Command/HardforkPackageGeneration.dhall +++ b/buildkite/src/Command/HardforkPackageGeneration.dhall @@ -30,6 +30,8 @@ let DebianVersions = ../Constants/DebianVersions.dhall let DebianRepo = ../Constants/DebianRepo.dhall +let Artifacts = ../Constants/Artifacts.dhall + let Profiles = ../Constants/Profiles.dhall let Toolchain = ../Constants/Toolchain.dhall @@ -157,7 +159,7 @@ let pipeline DockerImage.ReleaseSpec::{ , deps = [ { name = pipelineName, key = generateLedgersJobKey } ] - , service = "mina-daemon" + , service = Artifacts.dockerName Artifacts.Type.Daemon , network = network_name , deb_codename = "${DebianVersions.lowerName debVersion}" , deb_profile = profile @@ -212,7 +214,7 @@ let pipeline DockerImage.ReleaseSpec::{ , deps = [ { name = pipelineName, key = generateLedgersJobKey } ] - , service = "mina-archive" + , service = Artifacts.dockerName Artifacts.Type.Archive , network = network_name , deb_codename = "${DebianVersions.lowerName debVersion}" , deb_profile = profile @@ -226,7 +228,7 @@ let pipeline DockerImage.ReleaseSpec::{ , deps = [ { name = pipelineName, key = generateLedgersJobKey } ] - , service = "mina-rosetta" + , service = Artifacts.dockerName Artifacts.Type.Rosetta , network = network_name , deb_repo = DebianRepo.Type.Local , deb_codename = "${DebianVersions.lowerName debVersion}" diff --git a/buildkite/src/Command/MinaArtifact.dhall b/buildkite/src/Command/MinaArtifact.dhall index b0ffb84d3f8..e4f15a74db3 100644 --- a/buildkite/src/Command/MinaArtifact.dhall +++ b/buildkite/src/Command/MinaArtifact.dhall @@ -105,36 +105,6 @@ let build_artifacts ] } -let publish_to_debian_repo = - \(spec : MinaBuildSpec.Type) - -> Command.build - Command.Config::{ - , commands = - Toolchain.select - spec.toolchainSelectMode - spec.debVersion - [ "AWS_ACCESS_KEY_ID" - , "AWS_SECRET_ACCESS_KEY" - , "MINA_DEB_CODENAME=${DebianVersions.lowerName - spec.debVersion}" - , "MINA_DEB_RELEASE=${DebianChannel.lowerName spec.channel}" - ] - "./buildkite/scripts/debian/publish.sh" - , label = - "Publish Mina for ${DebianVersions.capitalName - spec.debVersion} ${Profiles.toSuffixUppercase - spec.profile}" - , key = "publish-deb-pkg" - , depends_on = - DebianVersions.dependsOnStep - (Some spec.prefix) - spec.debVersion - spec.profile - spec.buildFlags - "build" - , target = Size.Small - } - let docker_step : Artifacts.Type -> MinaBuildSpec.Type -> List DockerImage.ReleaseSpec.Type = \(artifact : Artifacts.Type) @@ -157,7 +127,8 @@ let docker_step ( \(n : Network.Type) -> DockerImage.ReleaseSpec::{ , deps = deps - , service = "mina-daemon" + , service = + Artifacts.dockerName Artifacts.Type.Daemon , network = Network.lowerName n , deb_codename = "${DebianVersions.lowerName spec.debVersion}" @@ -178,8 +149,8 @@ let docker_step , BatchTxn = [ DockerImage.ReleaseSpec::{ , deps = deps - , service = "mina-batch-txn" - , network = "${Network.lowerName Network.Type.Devnet}" + , service = Artifacts.dockerName Artifacts.Type.BatchTxn + , network = Network.lowerName Network.Type.Devnet , deb_codename = "${DebianVersions.lowerName spec.debVersion}" , deb_profile = spec.profile @@ -188,13 +159,13 @@ let docker_step , step_key = "batch-txn-${DebianVersions.lowerName spec.debVersion}${BuildFlags.toLabelSegment - spec.buildFlags}--docker-image" + spec.buildFlags}-docker-image" } ] , Archive = [ DockerImage.ReleaseSpec::{ , deps = deps - , service = "mina-archive" + , service = Artifacts.dockerName Artifacts.Type.Archive , deb_codename = "${DebianVersions.lowerName spec.debVersion}" , deb_profile = spec.profile @@ -208,25 +179,32 @@ let docker_step } ] , Rosetta = - [ DockerImage.ReleaseSpec::{ - , deps = deps - , service = "mina-rosetta" - , network = "${Network.lowerName Network.Type.Devnet}" - , build_flags = spec.buildFlags - , deb_repo = DebianRepo.Type.Local - , deb_profile = spec.profile - , deb_codename = - "${DebianVersions.lowerName spec.debVersion}" - , step_key = - "rosetta-${DebianVersions.lowerName - spec.debVersion}${BuildFlags.toLabelSegment - spec.buildFlags}-docker-image" - } - ] + Prelude.List.map + Network.Type + DockerImage.ReleaseSpec.Type + ( \(n : Network.Type) + -> DockerImage.ReleaseSpec::{ + , deps = deps + , service = + Artifacts.dockerName Artifacts.Type.Rosetta + , network = Network.lowerName n + , deb_codename = + "${DebianVersions.lowerName spec.debVersion}" + , deb_profile = spec.profile + , deb_repo = DebianRepo.Type.Local + , step_key = + "rosetta-${Network.lowerName + n}-${DebianVersions.lowerName + spec.debVersion}${Profiles.toLabelSegment + spec.profile}-docker-image" + } + ) + spec.networks , ZkappTestTransaction = [ DockerImage.ReleaseSpec::{ , deps = deps - , service = "mina-zkapp-test-transaction" + , service = + Artifacts.dockerName Artifacts.Type.ZkappTestTransaction , build_flags = spec.buildFlags , deb_repo = DebianRepo.Type.Local , deb_profile = spec.profile @@ -236,13 +214,15 @@ let docker_step "zkapp-test-transaction-${DebianVersions.lowerName spec.debVersion}${Profiles.toLabelSegment spec.profile}${BuildFlags.toLabelSegment - spec.buildFlags}--docker-image" + spec.buildFlags}-docker-image" } ] , FunctionalTestSuite = [ DockerImage.ReleaseSpec::{ , deps = deps - , service = "mina-test-suite" + , service = + Artifacts.dockerName Artifacts.Type.FunctionalTestSuite + , network = Network.lowerName Network.Type.Devnet , deb_codename = "${DebianVersions.lowerName spec.debVersion}" , build_flags = spec.buildFlags @@ -252,8 +232,7 @@ let docker_step "test-suite-${DebianVersions.lowerName spec.debVersion}${Profiles.toLabelSegment spec.profile}${BuildFlags.toLabelSegment - spec.buildFlags}--docker-image" - , network = "${Network.lowerName Network.Type.Devnet}" + spec.buildFlags}-docker-image" } ] } @@ -288,6 +267,36 @@ let docker_commands ) flattened_docker_steps +let publish_to_debian_repo = + \(spec : MinaBuildSpec.Type) + -> Command.build + Command.Config::{ + , commands = + Toolchain.select + spec.toolchainSelectMode + spec.debVersion + [ "AWS_ACCESS_KEY_ID" + , "AWS_SECRET_ACCESS_KEY" + , "MINA_DEB_CODENAME=${DebianVersions.lowerName + spec.debVersion}" + , "MINA_DEB_RELEASE=${DebianChannel.lowerName spec.channel}" + ] + "./buildkite/scripts/debian/publish.sh" + , label = + "Publish Mina for ${DebianVersions.capitalName + spec.debVersion} ${Profiles.toSuffixUppercase + spec.profile}" + , key = "publish-deb-pkg" + , depends_on = + DebianVersions.dependsOnStep + (Some spec.prefix) + spec.debVersion + spec.profile + spec.buildFlags + "build" + , target = Size.Small + } + let pipelineBuilder : MinaBuildSpec.Type -> List Command.Type -> Pipeline.Config.Type = \(spec : MinaBuildSpec.Type) diff --git a/buildkite/src/Command/ReplayerTest.dhall b/buildkite/src/Command/ReplayerTest.dhall index 02c02978836..6a742c7e7fd 100644 --- a/buildkite/src/Command/ReplayerTest.dhall +++ b/buildkite/src/Command/ReplayerTest.dhall @@ -6,6 +6,8 @@ let Size = ./Size.dhall let RunWithPostgres = ./RunWithPostgres.dhall +let Network = ../Constants/Network.dhall + in { step = \(dependsOn : List Command.TaggedKey.Type) -> Command.build @@ -15,6 +17,7 @@ in { step = ([] : List Text) "./src/test/archive/sample_db/archive_db.sql" Artifacts.Type.Archive + (None Network.Type) "./buildkite/scripts/replayer-test.sh" ] , label = "Archive: Replayer test" diff --git a/buildkite/src/Command/RunWithPostgres.dhall b/buildkite/src/Command/RunWithPostgres.dhall index f2346e65a87..5269fda5619 100644 --- a/buildkite/src/Command/RunWithPostgres.dhall +++ b/buildkite/src/Command/RunWithPostgres.dhall @@ -2,6 +2,10 @@ let Prelude = ../External/Prelude.dhall let P = Prelude +let Optional/map = Prelude.Optional.map + +let Optional/default = Prelude.Optional.default + let Text/concatMap = P.Text.concatMap let Cmd = ../Lib/Cmds.dhall @@ -10,11 +14,19 @@ let ContainerImages = ../Constants/ContainerImages.dhall let Artifacts = ../Constants/Artifacts.dhall +let Network = ../Constants/Network.dhall + let runInDockerWithPostgresConn - : List Text -> Text -> Artifacts.Type -> Text -> Cmd.Type + : List Text + -> Text + -> Artifacts.Type + -> Optional Network.Type + -> Text + -> Cmd.Type = \(environment : List Text) -> \(initScript : Text) -> \(docker : Artifacts.Type) + -> \(network : Optional Network.Type) -> \(innerScript : Text) -> let port = "5432" @@ -28,6 +40,15 @@ let runInDockerWithPostgresConn let dbName = "archive" + let maybeNetwork = + Optional/map + Network.Type + Text + (\(network : Network.Type) -> "-${Network.lowerName network}") + network + + let networkOrDefault = Optional/default Text "" maybeNetwork + let pg_conn = "postgres://${user}:${password}@localhost:${port}/${dbName}" @@ -46,7 +67,7 @@ let runInDockerWithPostgresConn let outerDir : Text - = "\\\$BUILDKITE_BUILD_CHECKOUT_PATH" + = "\\\$BUILDKITE_BUILD_CHECKOUT_PATH${networkOrDefault}" let minaDockerTag : Text diff --git a/buildkite/src/Constants/Artifacts.dhall b/buildkite/src/Constants/Artifacts.dhall index 8397d0b27a5..b41f52cf28c 100644 --- a/buildkite/src/Constants/Artifacts.dhall +++ b/buildkite/src/Constants/Artifacts.dhall @@ -161,7 +161,8 @@ let dockerTag = , LogProc = "${version_and_codename}" , TestExecutive = "${version_and_codename}" , BatchTxn = "${version_and_codename}" - , Rosetta = "${version_and_codename}" + , Rosetta = + "${version_and_codename}-${Network.lowerName network}" , ZkappTestTransaction = "${version_and_codename}" , FunctionalTestSuite = "${version_and_codename}" } diff --git a/buildkite/src/Constants/DockerVersions.dhall b/buildkite/src/Constants/DockerVersions.dhall index fe094476b0f..a09718f19e7 100644 --- a/buildkite/src/Constants/DockerVersions.dhall +++ b/buildkite/src/Constants/DockerVersions.dhall @@ -1,5 +1,15 @@ +let Prelude = ../External/Prelude.dhall + +let Optional/map = Prelude.Optional.map + +let Optional/default = Prelude.Optional.default + let Profiles = ./Profiles.dhall +let Artifacts = ./Artifacts.dhall + +let Network = ./Network.dhall + let Docker : Type = < Bookworm | Bullseye | Jammy | Focal > @@ -26,33 +36,44 @@ let lowerName = let dependsOn = \(docker : Docker) + -> \(network : Optional Network.Type) -> \(profile : Profiles.Type) - -> \(binary : Text) + -> \(binary : Artifacts.Type) -> let profileSuffix = Profiles.toSuffixUppercase profile let prefix = "MinaArtifact" let suffix = "docker-image" + let maybeNetwork = + Optional/map + Network.Type + Text + (\(network : Network.Type) -> "-${Network.lowerName network}") + network + + let networkOrDefault = Optional/default Text "" maybeNetwork + + let key = + "${Artifacts.lowerName + binary}${networkOrDefault}-${lowerName docker}-${suffix}" + in merge { Bookworm = - [ { name = "${prefix}${profileSuffix}" - , key = "${binary}-${lowerName docker}-${suffix}" - } - ] + [ { name = "${prefix}${profileSuffix}", key = key } ] , Bullseye = [ { name = "${prefix}${capitalName docker}${profileSuffix}" - , key = "${binary}-${lowerName docker}-${suffix}" + , key = key } ] , Jammy = [ { name = "${prefix}${capitalName docker}${profileSuffix}" - , key = "${binary}-${lowerName docker}-${suffix}" + , key = key } ] , Focal = [ { name = "${prefix}${capitalName docker}${profileSuffix}" - , key = "${binary}-${lowerName docker}-${suffix}" + , key = key } ] } diff --git a/buildkite/src/Jobs/Test/ConnectToBerkeley.dhall b/buildkite/src/Jobs/Test/ConnectToBerkeley.dhall new file mode 100644 index 00000000000..312e63f9435 --- /dev/null +++ b/buildkite/src/Jobs/Test/ConnectToBerkeley.dhall @@ -0,0 +1,51 @@ +let S = ../../Lib/SelectFiles.dhall + +let B = ../../External/Buildkite.dhall + +let B/SoftFail = B.definitions/commandStep/properties/soft_fail/Type + +let JobSpec = ../../Pipeline/JobSpec.dhall + +let Pipeline = ../../Pipeline/Dsl.dhall + +let PipelineTag = ../../Pipeline/Tag.dhall + +let ConnectToTestnet = ../../Command/ConnectToTestnet.dhall + +let Profiles = ../../Constants/Profiles.dhall + +let Artifacts = ../../Constants/Artifacts.dhall + +let Network = ../../Constants/Network.dhall + +let Dockers = ../../Constants/DockerVersions.dhall + +let dependsOn = + Dockers.dependsOn + Dockers.Type.Bullseye + (Some Network.Type.Berkeley) + Profiles.Type.Standard + Artifacts.Type.Daemon + +in Pipeline.build + Pipeline.Config::{ + , spec = JobSpec::{ + , dirtyWhen = + [ S.strictlyStart (S.contains "src") + , S.exactly "buildkite/scripts/connect-to-testnet" "sh" + , S.exactly "buildkite/src/Jobs/Test/ConnectToBerkeley" "dhall" + , S.exactly "buildkite/src/Command/ConnectToTestnet" "dhall" + ] + , path = "Test" + , name = "ConnectToBerkeley" + , tags = [ PipelineTag.Type.Long, PipelineTag.Type.Test ] + } + , steps = + [ ConnectToTestnet.step + dependsOn + "berkeley" + "40s" + "2m" + (B/SoftFail.Boolean True) + ] + } diff --git a/buildkite/src/Jobs/Test/ReplayerTest.dhall b/buildkite/src/Jobs/Test/ReplayerTest.dhall index 1d538bebaed..0e3d665e2ce 100644 --- a/buildkite/src/Jobs/Test/ReplayerTest.dhall +++ b/buildkite/src/Jobs/Test/ReplayerTest.dhall @@ -12,8 +12,16 @@ let Profiles = ../../Constants/Profiles.dhall let Dockers = ../../Constants/DockerVersions.dhall +let Network = ../../Constants/Network.dhall + +let Artifacts = ../../Constants/Artifacts.dhall + let dependsOn = - Dockers.dependsOn Dockers.Type.Bullseye Profiles.Type.Standard "archive" + Dockers.dependsOn + Dockers.Type.Bullseye + (None Network.Type) + Profiles.Type.Standard + Artifacts.Type.Archive in Pipeline.build Pipeline.Config::{ diff --git a/buildkite/src/Jobs/Test/RosettaIntegrationTests.dhall b/buildkite/src/Jobs/Test/RosettaIntegrationTests.dhall index 067a536251b..a336603b2a1 100644 --- a/buildkite/src/Jobs/Test/RosettaIntegrationTests.dhall +++ b/buildkite/src/Jobs/Test/RosettaIntegrationTests.dhall @@ -18,10 +18,12 @@ let Profiles = ../../Constants/Profiles.dhall let Dockers = ../../Constants/DockerVersions.dhall -let Artifacts = ../../Constants/Artifacts.dhall - let RunWithPostgres = ../../Command/RunWithPostgres.dhall +let Network = ../../Constants/Network.dhall + +let Artifacts = ../../Constants/Artifacts.dhall + let B/SoftFail = B.definitions/commandStep/properties/soft_fail/Type let dirtyWhen = @@ -53,11 +55,12 @@ in Pipeline.build ([] : List Text) "./src/test/archive/sample_db/archive_db.sql" Artifacts.Type.Rosetta + (Some Network.Type.Berkeley) "./buildkite/scripts/rosetta-indexer-test.sh" , Cmd.runInDocker Cmd.Docker::{ , image = - "gcr.io/o1labs-192920/mina-rosetta:\\\${MINA_DOCKER_TAG}" + "gcr.io/o1labs-192920/mina-rosetta:\\\${MINA_DOCKER_TAG}-berkeley" } "buildkite/scripts/rosetta-integration-tests-fast.sh" ] @@ -68,8 +71,9 @@ in Pipeline.build , depends_on = Dockers.dependsOn Dockers.Type.Bullseye + (Some Network.Type.Berkeley) Profiles.Type.Standard - "rosetta" + Artifacts.Type.Rosetta } ] } diff --git a/buildkite/src/Jobs/Test/RosettaIntegrationTestsLong.dhall b/buildkite/src/Jobs/Test/RosettaIntegrationTestsLong.dhall index eaee44624b3..b1229798a96 100644 --- a/buildkite/src/Jobs/Test/RosettaIntegrationTestsLong.dhall +++ b/buildkite/src/Jobs/Test/RosettaIntegrationTestsLong.dhall @@ -16,6 +16,14 @@ let Command = ../../Command/Base.dhall let Size = ../../Command/Size.dhall +let Profiles = ../../Constants/Profiles.dhall + +let Dockers = ../../Constants/DockerVersions.dhall + +let Network = ../../Constants/Network.dhall + +let Artifacts = ../../Constants/Artifacts.dhall + let B/SoftFail = B.definitions/commandStep/properties/soft_fail/Type let dirtyWhen = @@ -47,7 +55,7 @@ in Pipeline.build , Cmd.runInDocker Cmd.Docker::{ , image = - "gcr.io/o1labs-192920/mina-rosetta:\\\${MINA_DOCKER_TAG}" + "gcr.io/o1labs-192920/mina-rosetta:\\\${MINA_DOCKER_TAG}-berkeley" } "buildkite/scripts/rosetta-integration-tests-full.sh" ] @@ -56,10 +64,11 @@ in Pipeline.build , soft_fail = Some (B/SoftFail.Boolean True) , target = Size.Small , depends_on = - [ { name = "MinaArtifactBullseye" - , key = "rosetta-bullseye-docker-image" - } - ] + Dockers.dependsOn + Dockers.Type.Bullseye + (Some Network.Type.Berkeley) + Profiles.Type.Standard + Artifacts.Type.Rosetta } ] } diff --git a/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall b/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall index 0d7099909ad..f08d92218a8 100644 --- a/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall +++ b/buildkite/src/Jobs/Test/TestnetIntegrationTests.dhall @@ -14,12 +14,21 @@ let Profiles = ../../Constants/Profiles.dhall let Dockers = ../../Constants/DockerVersions.dhall +let Network = ../../Constants/Network.dhall + +let Artifacts = ../../Constants/Artifacts.dhall + let dependsOn = Dockers.dependsOn Dockers.Type.Bullseye + (Some Network.Type.Devnet) + Profiles.Type.Standard + Artifacts.Type.Rosetta + # Dockers.dependsOn + Dockers.Type.Bullseye + (None Network.Type) Profiles.Type.Standard - "daemon-devnet" - # Dockers.dependsOn Dockers.Type.Bullseye Profiles.Type.Standard "archive" + Artifacts.Type.Archive in Pipeline.build Pipeline.Config::{ diff --git a/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall b/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall index 55df0195024..d75e12b2a35 100644 --- a/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall +++ b/buildkite/src/Jobs/Test/TestnetIntegrationTestsLong.dhall @@ -14,12 +14,21 @@ let Profiles = ../../Constants/Profiles.dhall let Dockers = ../../Constants/DockerVersions.dhall +let Network = ../../Constants/Network.dhall + +let Artifacts = ../../Constants/Artifacts.dhall + let dependsOn = Dockers.dependsOn Dockers.Type.Bullseye + (Some Network.Type.Devnet) + Profiles.Type.Standard + Artifacts.Type.Daemon + # Dockers.dependsOn + Dockers.Type.Bullseye + (None Network.Type) Profiles.Type.Standard - "daemon-devnet" - # Dockers.dependsOn Dockers.Type.Bullseye Profiles.Type.Standard "archive" + Artifacts.Type.Archive in Pipeline.build Pipeline.Config::{ diff --git a/genesis_ledgers/devnet.json b/genesis_ledgers/devnet.json index d4a9b1d0e2f..7585f586c80 100644 --- a/genesis_ledgers/devnet.json +++ b/genesis_ledgers/devnet.json @@ -25,5 +25,8 @@ "hash": "jxjmYHK1tnGy5S6CDaLDTRrDbw17DmtEd6Jnw3L86QSsLm15w5g", "s3_data_hash": "094ceb7c580ef53be0bf2385698fd8d2faebf91fdd8542c076df649aa261b94e" } + }, + "daemon": { + "network_id": "devnet" } -} \ No newline at end of file +} diff --git a/genesis_ledgers/mainnet.json b/genesis_ledgers/mainnet.json index 4daf65dfc57..befbba6ed51 100644 --- a/genesis_ledgers/mainnet.json +++ b/genesis_ledgers/mainnet.json @@ -25,5 +25,8 @@ "hash": "jwgzfxD5rEnSP3k4UiZu2569FfhJ1SRUvabfTz21e4btwBHg3jq", "s3_data_hash": "61323d7565130cfa4768c0333f32b2a8ea7fdfbf17065adfa48b4e9956619b44" } + }, + "daemon": { + "network_id": "mainnet" } } diff --git a/scripts/mina-verify-packaged-fork-config b/scripts/mina-verify-packaged-fork-config index fe1bf79a904..846a03eb0e7 100755 --- a/scripts/mina-verify-packaged-fork-config +++ b/scripts/mina-verify-packaged-fork-config @@ -213,6 +213,7 @@ for file in "$workdir"/ledgers/*.tar.gz; do tar -xzf "$file" -C "$tardir/generated" tar -xzf "$GENESIS_LEDGER_DIR/$tarname.tar.gz" -C "$tardir/packaged" curl "https://s3-us-west-2.amazonaws.com/snark-keys-ro.o1test.net/$tarname.tar.gz" | tar -xz -C "$tardir/web" + $ldb_cmd --hex --db="$tardir/packaged" scan > "$workdir/packaged.scan" $ldb_cmd --hex --db="$tardir/web" scan > "$workdir/web.scan" $ldb_cmd --hex --db="$tardir/generated" scan > "$workdir/generated.scan" diff --git a/scripts/publish-pvkeys.sh b/scripts/publish-pvkeys.sh index 1df281dd282..8ed648f34ca 100755 --- a/scripts/publish-pvkeys.sh +++ b/scripts/publish-pvkeys.sh @@ -12,7 +12,7 @@ else genfiles=("${KEYDIR}"*) if [ ${#genfiles[@]} -gt 0 ]; then ls -l ${KEYDIR} - aws s3 sync --acl public-read ${KEYDIR} s3://snark-keys.o1test.net/ + aws s3 sync --acl public-read ${KEYDIR} s3://snark-keys-ro.o1test.net/ else echo "No build time generated keys found." fi diff --git a/scripts/release-docker.sh b/scripts/release-docker.sh index 199fd47ef92..70c0cb63409 100755 --- a/scripts/release-docker.sh +++ b/scripts/release-docker.sh @@ -85,9 +85,11 @@ IMAGE="--build-arg image=${IMAGE}" *instrumented) DOCKER_DEB_SUFFIX="--build-arg deb_suffix=${DEB_PROFILE}-instrumented" BUILD_FLAG_SUFFIX="-instrumented" + DEB_PROFILE_SUFFIX="-${DEB_PROFILE}" ;; *) DOCKER_DEB_SUFFIX="--build-arg deb_suffix=${DEB_PROFILE}" + DEB_PROFILE_SUFFIX="-${DEB_PROFILE}" ;; esac ;; @@ -129,6 +131,7 @@ mina-batch-txn) ;; mina-rosetta) DOCKERFILE_PATH="dockerfiles/Dockerfile-mina-rosetta" + VERSION="${VERSION}-${NETWORK##*=}" ;; mina-zkapp-test-transaction) DOCKERFILE_PATH="dockerfiles/Dockerfile-zkapp-test-transaction" @@ -154,10 +157,10 @@ if [[ -z "${MINA_REPO}" ]]; then fi DOCKER_REGISTRY="gcr.io/o1labs-192920" -TAG="${DOCKER_REGISTRY}/${SERVICE}:${VERSION}${BUILD_FLAG_SUFFIX}" +TAG="${DOCKER_REGISTRY}/${SERVICE}:${VERSION}${DEB_PROFILE_SUFFIX}${BUILD_FLAG_SUFFIX}" # friendly, predictable tag GITHASH=$(git rev-parse --short=7 HEAD) -HASHTAG="${DOCKER_REGISTRY}/${SERVICE}:${GITHASH}-${DEB_CODENAME##*=}-${NETWORK##*=}${BUILD_FLAG_SUFFIX}" +HASHTAG="${DOCKER_REGISTRY}/${SERVICE}:${GITHASH}-${DEB_CODENAME##*=}-${NETWORK##*=}${DEB_PROFILE_SUFFIX}${BUILD_FLAG_SUFFIX}" BUILD_NETWORK="--network=host" # If DOCKER_CONTEXT is not specified, assume none and just pipe the dockerfile into docker build @@ -172,9 +175,9 @@ if [[ -z "$NOUPLOAD" ]] || [[ "$NOUPLOAD" -eq 0 ]]; then # push to GCR docker push "${TAG}" - # retag and push again to GCR docker tag "${TAG}" "${HASHTAG}" docker push "${HASHTAG}" fi + diff --git a/scripts/upload-genesis.sh b/scripts/upload-genesis.sh index 2dcc51cf144..9a0fec46cf8 100755 --- a/scripts/upload-genesis.sh +++ b/scripts/upload-genesis.sh @@ -7,6 +7,6 @@ if [ -z "$AWS_ACCESS_KEY_ID" ]; then echo "WARNING: AWS_ACCESS_KEY_ID is missing, not uploading files for genesis" else if ls -l ${GENESIS_DIR}genesis_*; then - aws s3 sync --exclude "*" --include "genesis_*" --acl public-read ${GENESIS_DIR} s3://snark-keys.o1test.net/ + aws s3 sync --exclude "*" --include "genesis_*" --acl public-read ${GENESIS_DIR} s3://snark-keys-ro.o1test.net/ fi fi diff --git a/src/lib/rosetta_lib/transaction.ml b/src/lib/rosetta_lib/transaction.ml index a964b530bd7..45e9b0f8b94 100644 --- a/src/lib/rosetta_lib/transaction.ml +++ b/src/lib/rosetta_lib/transaction.ml @@ -223,6 +223,32 @@ module Signed = struct ; stake_delegation : Unsigned.Rendered.Delegation.t option } [@@deriving yojson] + + let deprecated_fields = + [ "create_token"; "create_token_account"; "mint_tokens" ] + + let of_yojson = function + | `Assoc l -> + let open Result.Let_syntax in + let%bind l = + let exception Non_null of string in + try + return + @@ List.filter l ~f:(fun (field, json) -> + if List.mem ~equal:String.equal deprecated_fields field + then + match json with + | `Null -> + false + | _ -> + raise (Non_null field) + else true ) + with Non_null field -> + Error (sprintf "Found non-null deprecated field '%s'" field) + in + of_yojson (`Assoc l) + | x -> + of_yojson x end let render (t : t) = diff --git a/src/lib/runtime_config/runtime_config.ml b/src/lib/runtime_config/runtime_config.ml index 2d8dfa305d5..f1e9097f636 100644 --- a/src/lib/runtime_config/runtime_config.ml +++ b/src/lib/runtime_config/runtime_config.ml @@ -473,7 +473,7 @@ module Json_layout = struct ; zkapp_cmd_limit_hardcap : int option [@default None] ; slot_tx_end : int option [@default None] ; slot_chain_end : int option [@default None] - ; minimum_user_command_fee : Currency.Fee.t option + ; minimum_user_command_fee : Currency.Fee.t option [@default None] ; network_id : string option [@default None] } [@@deriving yojson, fields]