Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/upgrade node 10 #1522

Merged
merged 9 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/continuous-integration-blockfrost-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ env:
WS_PROVIDER_URL: 'http://localhost:4100/ws'

on:
pull_request:
push:
branches: ['master']
tags: ['*.*.*']
workflow_dispatch:

jobs:
build_and_test:
Expand Down
8 changes: 4 additions & 4 deletions compose/aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

services:
cardano-db-sync:
image: ghcr.io/input-output-hk/ogmios-tracker/cardano-db-sync:${CARDANO_DB_SYNC_VERSION:-13.3.0.0}
image: ghcr.io/input-output-hk/ogmios-tracker/cardano-db-sync:${CARDANO_DB_SYNC_VERSION:-13.6.0.0-pre}
cardano-node:
image: ghcr.io/input-output-hk/ogmios-tracker/cardano-node:${CARDANO_NODE_VERSION:-9.1.0}
image: ghcr.io/input-output-hk/ogmios-tracker/cardano-node:${CARDANO_NODE_VERSION:-10.1.2}
ogmios:
image: ghcr.io/input-output-hk/ogmios-tracker/ogmios:v${OGMIOS_VERSION:-6.5.0}
image: ghcr.io/input-output-hk/ogmios-tracker/ogmios:v${OGMIOS_VERSION:-6.9.0}
cardano-submit-api:
image: ghcr.io/input-output-hk/ogmios-tracker/cardano-submit-api:${CARDANO_NODE_VERSION:-9.1.0}
image: ghcr.io/input-output-hk/ogmios-tracker/cardano-submit-api:${CARDANO_NODE_VERSION:-10.1.2}
8 changes: 4 additions & 4 deletions compose/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ x-sdk-environment: &sdk-environment
services:
blockfrost-ryo:
build:
context: 'https://github.com/ginnun/blockfrost-backend-ryo.git#feat/custom-network-support'
context: 'https://github.com/mirceahasegan/blockfrost-backend-ryo.git#feat/custom-network-support'
dockerfile: Dockerfile
environment:
BLOCKFROST_CONFIG_SERVER_LISTEN_ADDRESS: 0.0.0.0
Expand Down Expand Up @@ -179,7 +179,7 @@ services:

cardano-node:
<<: *logging
image: ghcr.io/intersectmbo/cardano-node:${CARDANO_NODE_VERSION:-9.1.1}
image: ghcr.io/intersectmbo/cardano-node:${CARDANO_NODE_VERSION:-10.1.2}
command:
[
'run',
Expand All @@ -199,7 +199,7 @@ services:

ogmios:
<<: *logging
image: cardanosolutions/ogmios:v${OGMIOS_VERSION:-6.5.0}
image: cardanosolutions/ogmios:v${OGMIOS_VERSION:-6.9.0}
command:
[
'--host',
Expand All @@ -225,7 +225,7 @@ services:

cardano-submit-api:
command: --config /config/cardano-submit-api/config.json --listen-address 0.0.0.0 --socket-path /ipc/node.socket $SUBMIT_API_ARGS
image: ghcr.io/intersectmbo/cardano-submit-api:${CARDANO_NODE_VERSION:-9.1.1}
image: ghcr.io/intersectmbo/cardano-submit-api:${CARDANO_NODE_VERSION:-10.1.2}
ports:
- 8090:8090
restart: on-failure
Expand Down
2 changes: 0 additions & 2 deletions compose/pg-agent.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.9'

x-logging: &logging
logging:
driver: 'json-file'
Expand Down
4 changes: 2 additions & 2 deletions packages/cardano-services/config/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/input-output-hk/cardano-configurations.git
branch = master
commit = 7969a73e5c7ee1f3b2a40274b34191fdd8de170b
parent = 6c74e3abdf0ff29b448d94136b8d59c8975ad615
commit = 3c5f35bda1b8fd29ab310ad222403a9167f512de
parent = 846a0eeb6248aca9c9b9481675144d380980bfcb
method = merge
cmdver = 0.4.6
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"port": 3001
},
{
"address": "backbone.mainnet.emurgornd.com",
"address": "backbone.mainnet.cardanofoundation.org",
"port": 3001
},
{
"address": "backbone.mainnet.cardanofoundation.org",
"address": "backbone.mainnet.emurgornd.com",
"port": 3001
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"ByronGenesisFile": "../genesis/byron.json",
"ByronGenesisHash": "785eb88427e136378a15b0a152a8bfbeec7a611529ccda29c43a1e60ffb48eaa",
"ConwayGenesisFile": "../genesis/conway.json",
"ConwayGenesisHash": "e85ee5b7af8ca5c273c20746c9f994aef1a72a79c38b4eea230817e7e66c0741",
"ConwayGenesisHash": "ff31343b814adddfdcaceb76f635647e2b7d1adfc0ddac7c40b70cbdcd82fed9",
"EnableP2P": true,
"ExperimentalHardForksEnabled": true,
"ExperimentalProtocolsEnabled": true,
"LastKnownBlockVersion-Alt": 0,
"LastKnownBlockVersion-Major": 3,
"LastKnownBlockVersion-Minor": 1,
"MinNodeVersion": "8.12.0",
"MinNodeVersion": "10.0.0",
"PeerSharing": true,
"Protocol": "Cardano",
"RequiresNetworkMagic": "RequiresMagic",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"poolVotingThresholds": {
"committeeNormal": 0.65,
"committeeNoConfidence": 0.65,
"committeeNormal": 0.51,
"committeeNoConfidence": 0.51,
"hardForkInitiation": 0.51,
"motionNoConfidence": 0.6,
"ppSecurityGroup": 0.6
"motionNoConfidence": 0.51,
"ppSecurityGroup": 0.51
},
"dRepVotingThresholds": {
"motionNoConfidence": 0.67,
"committeeNormal": 0.67,
"committeeNoConfidence": 0.65,
"committeeNoConfidence": 0.6,
"updateToConstitution": 0.75,
"hardForkInitiation": 0.6,
"ppNetworkGroup": 0.67,
Expand All @@ -18,9 +18,9 @@
"ppGovGroup": 0.75,
"treasuryWithdrawal": 0.67
},
"committeeMinSize": 5,
"committeeMaxTermLength": 146,
"govActionLifetime": 14,
"committeeMinSize": 0,
"committeeMaxTermLength": 1000,
"govActionLifetime": 60,
"govActionDeposit": 100000000000,
"dRepDeposit": 500000000,
"dRepActivity": 20,
Expand Down Expand Up @@ -279,20 +279,19 @@
1
],
"constitution": {
"anchor": {
"url": "ipfs://QmQq5hWDNzvDR1ForEktAHrdCQmfSL2u5yctNpzDwoSBu4",
"dataHash": "23b43bebac48a4acc39e578715aa06635d6d900fa3ea7441dfffd6e43b914f7b"
},
"script": "edcd84c10e36ae810dc50847477083069db796219b39ccde790484e0"
"anchor": {
"dataHash": "ca41a91f399259bcefe57f9858e91f6d00e1a38d6d9c63d4052914ea7bd70cb2",
"url": "ipfs://bafkreifnwj6zpu3ixa4siz2lndqybyc5wnnt3jkwyutci4e2tmbnj3xrdm"
},
"script": "fa24fb305126805cf2164c161d852a0e7330cf988f1fe558cf7d4a64"
},
"committee": {
"members": {
"scriptHash-7ceede7d6a89e006408e6b7c6acb3dd094b3f6817e43b4a36d01535b": 500,
"scriptHash-6095e643ea6f1cccb6e463ec34349026b3a48621aac5d512655ab1bf": 500,
"scriptHash-27999ed757d6dac217471ae61d69b1b067b8b240d9e3ff36eb66b5d0": 500,
"scriptHash-87f867a31c0f81360d4d7dcddb6b025ba8383db9bf77a2af7797799d": 500,
"scriptHash-a19a7ba1caede8f3ab3e5e2a928b3798d7d011af18fbd577f7aeb0ec": 500
"keyHash-77c0a65f9302bccab35b44adc1823cb66c88a66c97cf3de8236dd718": 1000
},
"threshold": 0.67
"threshold": {
"numerator": 2,
"denominator": 3
}
}
}
3 changes: 0 additions & 3 deletions packages/cardano-services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@ x-sdk-environment: &sdk-environment
HANDLE_POLICY_IDS: ${HANDLE_POLICY_IDS:-f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a}

services:

blockfrost-ryo:
environment:
<<: *sdk-environment
NODE_ENV: local-blockfrost-ryo
BLOCKFROST_CONFIG_NETWORK: ${NETWORK:-mainnet}
BLOCKFROST_CONFIG_TOKEN_REGISTRY_URL: ${TOKEN_METADATA_SERVER_URL:-https://tokens.cardano.org}

volumes:
- ./blockfrost/ryo:/app/config
profiles: [ blockfrost-ryo ]

cardano-node:
volumes:
Expand Down
2 changes: 1 addition & 1 deletion packages/cardano-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"tscNoEmit": "echo typescript --noEmit command not implemented yet"
},
"devDependencies": {
"@cardano-ogmios/client": "6.5.0",
"@cardano-ogmios/client": "6.9.0",
"@cardano-sdk/util-dev": "workspace:~",
"@types/bunyan": "^1.8.8",
"@types/cors": "^2.8.13",
Expand Down
26 changes: 13 additions & 13 deletions packages/cardano-services/test/jest-setup/rebuild-test-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ PASSWORD=$(cat $SECRETS_DIR/postgres_password)

export DB_SYNC_CONNECTION_STRING="postgresql://${USER}:${PASSWORD}@localhost:5435/${DB_DB_SYNC}"

# yarn cleanup
# yarn
# yarn build
# yarn test:build:verify
yarn cleanup
yarn
yarn build
yarn test:build:verify

# yarn workspace @cardano-sdk/e2e local-network:down
# yarn workspace @cardano-sdk/e2e local-network:up -d --build
yarn workspace @cardano-sdk/e2e local-network:down
yarn workspace @cardano-sdk/e2e local-network:up -d --build

# yarn workspace @cardano-sdk/e2e test:wallet
# yarn workspace @cardano-sdk/e2e test:long-running simple-delegation-rewards.test.ts
# yarn workspace @cardano-sdk/e2e test:local-network register-pool.test.ts
yarn workspace @cardano-sdk/e2e test:wallet
yarn workspace @cardano-sdk/e2e test:long-running simple-delegation-rewards.test.ts
yarn workspace @cardano-sdk/e2e test:local-network register-pool.test.ts

# TL_LEVEL="${TL_LEVEL:=info}" node "$SCRIPT_DIR/mint-handles.js"
TL_LEVEL="${TL_LEVEL:=info}" node "$SCRIPT_DIR/mint-handles.js"

echo 'DO NOT Stop providing data to projectors'
# docker compose -p local-network-e2e stop cardano-node ogmios
echo 'Stop providing data to projectors'
docker compose -p local-network-e2e stop cardano-node ogmios
sleep 2

echo 'Creating snapshots...'
Expand All @@ -39,4 +39,4 @@ for DB_FILE in $(
done
echo 'Snapshots created.'

# yarn workspace @cardano-sdk/e2e local-network:down
yarn workspace @cardano-sdk/e2e local-network:down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
},
"dependencies": {
"@biglup/is-cid": "^1.0.3",
"@cardano-ogmios/client": "6.5.0",
"@cardano-ogmios/schema": "6.5.0",
"@cardano-ogmios/client": "6.9.0",
"@cardano-ogmios/schema": "6.9.0",
"@cardano-sdk/crypto": "workspace:~",
"@cardano-sdk/util": "workspace:~",
"@foxglove/crc": "^0.0.3",
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/CardanoNode/types/CardanoNodeErrors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ export enum TxSubmissionErrorCode {
UnauthorizedGovernanceAction = 3165,
ReferenceScriptsTooLarge = 3166,
UnknownVoters = 3167,
EmptyTreasuryWithdrawal = 3168,
UnexpectedMempoolError = 3997,
UnrecognizedCertificateType = 3998,
DeserialisationFailure = -32_602
}
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"prepack": "yarn build"
},
"devDependencies": {
"@cardano-ogmios/schema": "6.5.0",
"@cardano-ogmios/schema": "6.9.0",
"@dcspark/cardano-multiplatform-lib-nodejs": "^3.1.1",
"@types/blake2b": "^2.1.0",
"@types/libsodium-wrappers-sumo": "^0.7.5",
Expand Down
5 changes: 0 additions & 5 deletions packages/e2e/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ SCHEDULES="/config/schedules.json"
# Required by test:long-running
STAKE_POOL_PROJECTOR_URL='http://localhost:4002/'

# PRE_CONWAY=stable starts the local-network in babbage era. If this variable is not set, the local-network will start in conway era.
# TODO: Once conway era is stable, remove this variable and start the local-network in conway era by default.
#
# PRE_CONWAY=stable

# NETWORK_SPEED (fast|slow) determines the timeout tests will use when for blockchain events, like transaction confirmation.
# It should be configured to 'slow' when running against real networks like preprod.
# The local-network slotLength is 0.2s when running in fast mode (default), and 1s when running in slow mode.
Expand Down
1 change: 0 additions & 1 deletion packages/e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ services:
CARDANO_NODE_LOG_LEVEL: ${CARDANO_NODE_LOG_LEVEL:-Info}
CARDANO_NODE_CHAINDB_LOG_LEVEL: ${CARDANO_NODE_CHAINDB_LOG_LEVEL:-Notice}
NETWORK_SPEED: ${NETWORK_SPEED:-fast}
PRE_CONWAY: ${PRE_CONWAY}
ports:
- 3001:3001
volumes:
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e/local-network/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ FROM ubuntu:${UBUNTU_VERSION} AS builder
ENV DEBIAN_FRONTEND=nonintercative

WORKDIR /build
ARG CARDANO_NODE_BUILD_URL=https://github.com/IntersectMBO/cardano-node/releases/download/9.1.1/cardano-node-9.1.1-linux.tar.gz
ARG CARDANO_NODE_BUILD_URL_ARM64=https://github.com/input-output-hk/ogmios-tracker/releases/download/0.1.0/cardano-node-9.1.0-aarch64-linux.tar.gz
ARG CARDANO_NODE_BUILD_URL=https://github.com/IntersectMBO/cardano-node/releases/download/10.1.2/cardano-node-10.1.2-linux.tar.gz
ARG CARDANO_NODE_BUILD_URL_ARM64=https://github.com/input-output-hk/ogmios-tracker/releases/download/0.1.0/cardano-node-10.1.2-aarch64-linux.tar.gz

RUN set -x && \
apt-get update -y && \
Expand Down
2 changes: 2 additions & 0 deletions packages/e2e/local-network/scripts/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ rm -rf ./network-files/node-sp*/*
rm -rf ./sockets/*
rm -rf ./config/*
rm -rf ./logs/*
rm -rf /sdk-ipc/config
rm -rf /sdk-ipc/handle_policy_ids
24 changes: 4 additions & 20 deletions packages/e2e/local-network/scripts/make-babbage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,24 +153,8 @@ echo "TestConwayHardForkAtEpoch: 0" >> "${ROOT}/configuration.yaml"
echo "ExperimentalHardForksEnabled: True" >> "${ROOT}/configuration.yaml"
echo "ExperimentalProtocolsEnabled: True" >> "${ROOT}/configuration.yaml"

# TODO: Remove once mainnet is hardforked to conway-era and we don't need to run the e2e tests on pre-conway too.
# If we want the network to start in Babbage era we need to configure it to hardfork to Conway very far in the future.
# We also need to update the conway transaction cli commands to babbage cli commands.
if [ -n "$PRE_CONWAY" ]; then
echo "Updating scripts for pre-conway eras"
# Start in Babbage era
sed -i '/TestConwayHardForkAtEpoch/d' ./templates/babbage/node-config.json
sed -i '/TestConwayHardForkAtEpoch/d' ${ROOT}/configuration.yaml

# Convert all cardano-cli conway cmds to babbage
find ./scripts/ -type f -name "*.sh" -exec sed -i 's/cardano-cli conway /cardano-cli babbage /g' {} +

# Remove cardano-cli conway specific args
sed -i '/--key-reg-deposit-amt/d' ./scripts/setup-new-delegator-keys.sh
fi

# Copy the cost mode
cardano-cli genesis create-staked --genesis-dir "${ROOT}" \
cardano-cli latest genesis create-staked --genesis-dir "${ROOT}" \
--testnet-magic "${NETWORK_MAGIC}" \
--gen-pools ${NUM_SP_NODES} \
--supply ${MAX_SUPPLY} \
Expand Down Expand Up @@ -308,9 +292,9 @@ sed_i -E "s/\"startTime\": [0-9]+/\"startTime\": ${timeUnix}/" ${ROOT}/genesis/b
sed_i -E "s/\"systemStart\": \".*\"/\"systemStart\": \"${timeISO}\"/" ${ROOT}/genesis/shelley/genesis.json

byronGenesisHash=$(cardano-cli byron genesis print-genesis-hash --genesis-json ${ROOT}/genesis/byron/genesis.json)
shelleyGenesisHash=$(cardano-cli genesis hash --genesis ${ROOT}/genesis/shelley/genesis.json)
alonzoGenesisHash=$(cardano-cli genesis hash --genesis ${ROOT}/genesis/shelley/genesis.alonzo.json)
conwayGenesisHash=$(cardano-cli genesis hash --genesis ${ROOT}/genesis/shelley/genesis.conway.json)
shelleyGenesisHash=$(cardano-cli latest genesis hash --genesis ${ROOT}/genesis/shelley/genesis.json)
alonzoGenesisHash=$(cardano-cli latest genesis hash --genesis ${ROOT}/genesis/shelley/genesis.alonzo.json)
conwayGenesisHash=$(cardano-cli latest genesis hash --genesis ${ROOT}/genesis/shelley/genesis.conway.json)

echo "Byron genesis hash: $byronGenesisHash"
echo "Shelley genesis hash: $shelleyGenesisHash"
Expand Down
Loading
Loading