Skip to content

Commit

Permalink
Merge branch 'develop' into dkijania/port_mina_sidecar_removal_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dkijania authored Oct 16, 2024
2 parents e7896d1 + 5238114 commit a995f3f
Show file tree
Hide file tree
Showing 86 changed files with 1,475 additions and 1,156 deletions.
3 changes: 1 addition & 2 deletions buildkite/scripts/build-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ else
fi


# TODO: Stop building lib_p2p multiple times by pulling from buildkite-agent artifacts or docker or somewhere
echo "--- Build libp2p_helper TODO: use the previously uploaded build artifact"
echo "--- Build libp2p_helper"
make -C src/app/libp2p_helper

MAINNET_TARGETS=""
Expand Down
2 changes: 1 addition & 1 deletion buildkite/scripts/rosetta-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ cat <<EOF >"$MINA_CONFIG_FILE"
"daemon": { "network_id": "${MINA_NETWORK}" },
"ledger": {
"accounts": [
{ "pk": "${BLOCK_PRODUCER_PUB_KEY}", "balance": "1000000", "delegate": null, "sk": null },
{ "pk": "${BLOCK_PRODUCER_PUB_KEY}", "balance": "600000000", "delegate": null, "sk": null },
{ "pk": "${SNARK_PRODUCER_PK}", "balance": "2000000", "delegate": "${BLOCK_PRODUCER_PUB_KEY}", "sk": null },
{ "pk": "${ZKAPP_FEE_PAYER_PUB_KEY}", "balance": "1000000", "delegate": null, "sk": null },
{ "pk": "${ZKAPP_SENDER_PUB_KEY}", "balance": "1000000", "delegate": null, "sk": null },
Expand Down
3 changes: 2 additions & 1 deletion buildkite/scripts/setup-database-for-archive-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ set -euo pipefail
user=$1
password=$2
db=$3
port=$4


sudo service postgresql start
sudo -u postgres psql -c "CREATE USER ${user} WITH LOGIN SUPERUSER PASSWORD '${password}';"
sudo pg_isready
service postgresql status
sudo -u postgres createdb -O $user $db
PGPASSWORD=$password psql -h localhost -p 5434 -U $user -d $db -a -f src/app/archive/create_schema.sql
PGPASSWORD=$password psql -h localhost -p $port -U $user -d $db -a -f src/app/archive/create_schema.sql
41 changes: 0 additions & 41 deletions buildkite/src/Command/Libp2pHelperBuild.dhall

This file was deleted.

12 changes: 2 additions & 10 deletions buildkite/src/Command/MinaArtifact.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ let JobSpec = ../Pipeline/JobSpec.dhall

let Size = ./Size.dhall

let Libp2p = ./Libp2pHelperBuild.dhall

let DockerImage = ./DockerImage.dhall

let DebianVersions = ../Constants/DebianVersions.dhall
Expand Down Expand Up @@ -308,20 +306,14 @@ let onlyDebianPipeline
= \(spec : MinaBuildSpec.Type)
-> pipelineBuilder
spec
[ Libp2p.step spec.debVersion spec.buildFlags
, build_artifacts spec
, publish_to_debian_repo spec
]
[ build_artifacts spec, publish_to_debian_repo spec ]

let pipeline
: MinaBuildSpec.Type -> Pipeline.Config.Type
= \(spec : MinaBuildSpec.Type)
-> pipelineBuilder
spec
( [ Libp2p.step spec.debVersion spec.buildFlags
, build_artifacts spec
, publish_to_debian_repo spec
]
( [ build_artifacts spec, publish_to_debian_repo spec ]
# docker_commands spec
)

Expand Down
6 changes: 3 additions & 3 deletions buildkite/src/Constants/ContainerImages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
-- NOTE: minaToolchainBookworm is also used for building Ubuntu Jammy packages in CI
{ toolchainBase = "codaprotocol/ci-toolchain-base:v3"
, minaToolchainBullseye =
"gcr.io/o1labs-192920/mina-toolchain@sha256:a1f60d69f3657060d6e7289dc770fd7c36fc5a067853019c2f3f6247cb4b6673"
"gcr.io/o1labs-192920/mina-toolchain@sha256:1e4b429fdf6a06e88abe9b4c9d54a80a3e818011a94806d070433a95d6af1229"
, minaToolchainBookworm =
"gcr.io/o1labs-192920/mina-toolchain@sha256:a1f60d69f3657060d6e7289dc770fd7c36fc5a067853019c2f3f6247cb4b6673"
"gcr.io/o1labs-192920/mina-toolchain@sha256:1e4b429fdf6a06e88abe9b4c9d54a80a3e818011a94806d070433a95d6af1229"
, minaToolchain =
"gcr.io/o1labs-192920/mina-toolchain@sha256:a1f60d69f3657060d6e7289dc770fd7c36fc5a067853019c2f3f6247cb4b6673"
"gcr.io/o1labs-192920/mina-toolchain@sha256:1e4b429fdf6a06e88abe9b4c9d54a80a3e818011a94806d070433a95d6af1229"
, elixirToolchain = "elixir:1.10-alpine"
, nodeToolchain = "node:14.13.1-stretch-slim"
, ubuntu2004 = "ubuntu:20.04"
Expand Down
6 changes: 4 additions & 2 deletions buildkite/src/Jobs/Test/ArchiveNodeUnitTest.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ let password = "codarules"

let db = "archiver"

let port = "5433"

let command_key = "archive-unit-tests"

in Pipeline.build
Expand All @@ -50,14 +52,14 @@ in Pipeline.build
[ "POSTGRES_PASSWORD=${password}"
, "POSTGRES_USER=${user}"
, "POSTGRES_DB=${db}"
, "MINA_TEST_POSTGRES=postgres://${user}:${password}@localhost:5434/${db}"
, "MINA_TEST_POSTGRES=postgres://${user}:${password}@localhost:${port}/${db}"
, "GO=/usr/lib/go/bin/go"
, "DUNE_INSTRUMENT_WITH=bisect_ppx"
, "COVERALLS_TOKEN"
]
( Prelude.Text.concatSep
" && "
[ "bash buildkite/scripts/setup-database-for-archive-node.sh ${user} ${password} ${db}"
[ "bash buildkite/scripts/setup-database-for-archive-node.sh ${user} ${password} ${db} ${port}"
, WithCargo.withCargo
"eval \\\$(opam config env) && dune runtest src/app/archive && buildkite/scripts/upload-partial-coverage-data.sh ${command_key} dev"
]
Expand Down
9 changes: 9 additions & 0 deletions dockerfiles/stages/3-toolchain
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ARG DEBS3_VERSION=0.11.6
ARG DHALL_VERSION=1.41.1
ARG DHALL_JSON_VERSION=1.7.10
ARG DHALL_BASH_VERSION=1.0.40
ARG INFLUXDB_CLI_VERSION=2.7.5

USER root

Expand Down Expand Up @@ -70,6 +71,14 @@ RUN curl -sLO https://github.com/MinaProtocol/deb-s3/releases/download/${DEBS3_V
&& gem install deb-s3-${DEBS3_VERSION}.gem \
&& rm -f deb-s3-${DEBS3_VERSION}.gem

# --- deb-s3 tool
# Custom version, with lock only on manifest upload
RUN wget https://download.influxdata.com/influxdb/releases/influxdb2-client-${INFLUXDB_CLI_VERSION}-linux-amd64.tar.gz \
&& mkdir -p "influx_dir" && tar xvzf influxdb2-client-${INFLUXDB_CLI_VERSION}-linux-amd64.tar.gz -C influx_dir \
&& sudo cp influx_dir/influx /usr/local/bin/ \
&& rm influxdb2-client-${INFLUXDB_CLI_VERSION}-linux-amd64.tar.gz \
&& rm -rf influx_dir

# --- Docker Daemon
RUN curl -sL https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz \
| tar --extract --gzip --strip-components 1 --directory=/usr/bin --file=-
Expand Down
Loading

0 comments on commit a995f3f

Please sign in to comment.