Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ca3881d
feat: ubuntu 24.04 upgrade. (#419)
matiwinnetou Apr 29, 2025
030f74d
chore: spring boot upgrade for yaci-indexer (#425)
matiwinnetou Apr 29, 2025
2043a47
feat: docker compose build from source (#420)
VladislavKudrin Apr 29, 2025
8072e1f
feat: sync status in the network service response. (#429)
matiwinnetou Apr 29, 2025
5a98d20
chore: 1.2.8 version updated.
Apr 30, 2025
3bf2723
fix: postgres container locale (#438)
VladislavKudrin May 2, 2025
27794a5
refactor: streamline spring boot configuration. (#424)
matiwinnetou May 2, 2025
8086e37
chore: OpenJDK 24 LTS for api and indexer. (#368)
matiwinnetou May 2, 2025
bb6b3c9
fix: postgres missing port and cnode socket path (#442)
VladislavKudrin May 6, 2025
51da025
chore: cardano-node 10.3.1 (#443)
matiwinnetou May 6, 2025
9f6d00f
fix: preprod config typo fix.
May 7, 2025
fc2bca1
fix: revert back to 10.2.1
May 7, 2025
a52f43e
chore: adjusted port for db on pre-prod config.
May 7, 2025
9be126d
fix: do not redirect logs to a file but to sysout. (#454)
matiwinnetou May 8, 2025
8fbbb72
chore: path adjusted.
May 9, 2025
8115d59
chore: cardano-node: 10.3.1, cabal: 3.12.1.0, ghc: 9.6.7 (#452)
matiwinnetou May 9, 2025
bf51e0c
chore: 1.2.9 bump for develop branch.
May 20, 2025
cc186e2
feat: oldest_block reported on network status when configuration remo…
matiwinnetou May 21, 2025
f01cab6
chore: removed sanochnet.
May 21, 2025
17b3a39
fix: cardano node db path / mithril version / tags (#460)
VladislavKudrin May 21, 2025
dd66cd7
Merge remote-tracking branch 'origin/main' into develop
May 22, 2025
0bc8fbf
feat: split cardano-node and cardano-submit-api (#464)
VladislavKudrin May 27, 2025
c6c6632
feat: rosetta java images dockerhub (#465)
VladislavKudrin May 27, 2025
fa0aff9
feat: retry mechanism for node (#468)
VladislavKudrin May 28, 2025
ba61fee
fix: wrong escaping of string text in yaci-indexer configuration, fix…
Jun 3, 2025
ca027d6
Merge remote-tracking branch 'origin/main' into develop
Jun 3, 2025
1054c22
fix: single docker build fix related to java-builder (#475)
matiwinnetou Jun 3, 2025
252028e
feat: postgres source building single docker (#481)
VladislavKudrin Jun 5, 2025
ec22a9c
Merge branch 'main' into develop
matiwinnetou Jun 6, 2025
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
15 changes: 8 additions & 7 deletions .env.IntegrationTest
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ NETWORK=devkit
PROTOCOL_MAGIC=42

## Postgres image
DB_IMAGE_NAME=postgres
DB_IMAGE_TAG=latest
PG_VERSION_TAG=REL_14_11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to document this env var


## Yaci image
YACI_VERSION=0.10.5
Expand Down Expand Up @@ -41,6 +40,8 @@ SNAPSHOT_DIGEST=latest
AGGREGATOR_ENDPOINT=
# if not set standard values will be used
GENESIS_VERIFICATION_KEY=
ANCILLARY_VERIFICATION_KEY=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to document this env var



## Api env
API_DOCKER_IMAGE_TAG=main
Expand All @@ -59,11 +60,9 @@ SEARCH_PAGE_SIZE=100

## Yaci Indexer env
INDEXER_DOCKER_IMAGE_TAG=main
PRUNING_ENABLED=false
REMOVE_SPENT_UTXOS=false
#The number of safe blocks to keep in the store. 2160 blocks *(20 seconds/block in average)=4320 seconds=12 hours.
PRUNING_SAFE_BLOCKS=2160
#Run transaction pruning every 600 seconds or 10 minutes.
PRUNING_INTERVAL=600
REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNT=2160
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to document this env var. @matiwinnetou does this replace the PRUNING_SAFE_BLOCKS?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think PRUNING_SAFE_BLOCKS will be replaced by REMOVE_SPENT_UTXOS and
PRUNING_SAFE_BLOCKS will be replaced by REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNT


YACI_SPRING_PROFILES=postgres,n2c-socat
# database profiles: h2, h2-testdata, postgres
Expand Down Expand Up @@ -138,4 +137,6 @@ DB_POSTGRES_MAX_PARALLEL_WORKERS=4
DB_POSTGRES_SEQ_PAGE_COST=1.0
DB_POSTGRES_JIT=off
DB_POSTGRES_BGWRITER_LRU_MAXPAGES=50
DB_POSTGRES_BGWRITER_DELAY=500ms
DB_POSTGRES_BGWRITER_DELAY=500ms

SYNC_GRACE_SLOTS_COUNT=100
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to document this env var

18 changes: 10 additions & 8 deletions .env.docker-compose
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
API_SPRING_PROFILES_ACTIVE=online
LOG=INFO
NETWORK=mainnet
# mainnet, preprod, preview, sanchonet, devkit
# mainnet, preprod, preview, devkit
PROTOCOL_MAGIC=764824073
# mainnet 764824073, preprod 1, preview 2, sanchonet 4, devkit 42
# mainnet 764824073, preprod 1, preview 2, devkit 42

## Postgres image
DB_IMAGE_NAME=postgres
DB_IMAGE_TAG=14.11-bullseye
PG_VERSION_TAG=REL_14_11

## Postgres variables
DB_NAME=rosetta-java
Expand All @@ -35,11 +34,13 @@ CARDANO_CONFIG=./config/${NETWORK}

## Mithril
MITHRIL_SYNC=true
MITHRIL_VERSION=2517.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to document this env var

SNAPSHOT_DIGEST=latest
# if not set standard values will be used
AGGREGATOR_ENDPOINT=
# if not set standard values will be used
GENESIS_VERIFICATION_KEY=
ANCILLARY_VERIFICATION_KEY=

## Api env
API_DOCKER_IMAGE_TAG=main
Expand All @@ -49,6 +50,7 @@ PRINT_EXCEPTION=true

ROSETTA_VERSION=1.4.13
TOPOLOGY_FILEPATH=/config/topology.json

GENESIS_SHELLEY_PATH=/config/shelley-genesis.json
GENESIS_BYRON_PATH=/config/byron-genesis.json
GENESIS_ALONZO_PATH=/config/alonzo-genesis.json
Expand All @@ -57,11 +59,9 @@ SEARCH_PAGE_SIZE=100

## Yaci Indexer env
INDEXER_DOCKER_IMAGE_TAG=main
PRUNING_ENABLED=false
REMOVE_SPENT_UTXOS=false
#The number of safe blocks to keep in the store. 2160 blocks *(20 seconds/block in average)=4320 seconds=12 hours.
PRUNING_SAFE_BLOCKS=2160
#Run transaction pruning every 600 seconds or 10 minutes.
PRUNING_INTERVAL=600
REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNT=2160

YACI_SPRING_PROFILES=postgres,n2c-socket
# database profiles: h2, h2-testdata, postgres
Expand Down Expand Up @@ -92,3 +92,5 @@ API_DB_POOL_MAX_LIFETIME_MS=2000000
API_DB_POOL_CONNECTION_TIMEOUT_MS=100000
API_DB_KEEP_ALIVE_MS=60000
API_DB_LEAK_CONNECTIONS_WARNING_MS=60000

SYNC_GRACE_SLOTS_COUNT=100
96 changes: 96 additions & 0 deletions .env.docker-compose-preprod
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
## Main variables
API_SPRING_PROFILES_ACTIVE=online
LOG=INFO
NETWORK=preprod
# mainnet, preprod, preview, devkit
PROTOCOL_MAGIC=1
# mainnet 764824073, preprod 1, preview 2, devkit 42

## Postgres image
PG_VERSION_TAG=REL_14_11

## Postgres variables
DB_NAME=rosetta-java
DB_USER=rosetta_db_admin
DB_SECRET=weakpwd#123_d
DB_HOST=db
# Service name in docker-compose or local db
DB_PORT=5432
DB_SCHEMA=${NETWORK}
DB_PATH=/opt/rosetta-java-preprod/sql_data

## Cardano Node variables
CARDANO_NODE_HOST=cardano-node
# Service name in docker-compose or local cardano node
CARDANO_NODE_PORT=3001
# Uncomment if you are using local cardano node
CARDANO_NODE_VERSION=10.3.1
CARDANO_NODE_SUBMIT_HOST=cardano-submit-api
NODE_SUBMIT_API_PORT=8090
CARDANO_NODE_DIR=/opt/rosetta-java-preprod/node_data
CARDANO_NODE_SOCKET_PATH=${CARDANO_NODE_DIR}/node.socket
CARDANO_NODE_DB=${CARDANO_NODE_DIR}/db
CARDANO_CONFIG=./config/${NETWORK}

## Mithril
MITHRIL_SYNC=true
MITHRIL_VERSION=2517.1
SNAPSHOT_DIGEST=latest
# if not set standard values will be used
AGGREGATOR_ENDPOINT=
# if not set standard values will be used
GENESIS_VERIFICATION_KEY=
ANCILLARY_VERIFICATION_KEY=

## Api env
API_DOCKER_IMAGE_TAG=main
# staging, h2, test. Additional profiles: mempool (if mempool should be activated)
API_PORT=8082
PRINT_EXCEPTION=true

ROSETTA_VERSION=1.4.13
TOPOLOGY_FILEPATH=/config/topology.json

GENESIS_SHELLEY_PATH=/config/shelley-genesis.json
GENESIS_BYRON_PATH=/config/byron-genesis.json
GENESIS_ALONZO_PATH=/config/alonzo-genesis.json
GENESIS_CONWAY_PATH=/config/conway-genesis.json
SEARCH_PAGE_SIZE=100

## Yaci Indexer env
INDEXER_DOCKER_IMAGE_TAG=main
REMOVE_SPENT_UTXOS=false
#The number of safe blocks to keep in the store. 2160 blocks *(20 seconds/block in average)=4320 seconds=12 hours.
REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNT=2160

YACI_SPRING_PROFILES=postgres,n2c-socket
# database profiles: h2, h2-testdata, postgres
MEMPOOL_ENABLED=false

## Devkit env
DEVKIT_ENABLED=false
DEVKIT_URL=yaci-cli
DEVKIT_PORT=3333

## Logger Config
LOG_FILE_PATH=/var/log/rosetta-java
LOG_FILE_NAME=/var/log/rosetta-java/rosetta-java.log
LOG_FILE_MAX_SIZE=10MB
LOG_FILE_MAX_HISTORY=10

YACI_HTTP_BASE_URL=http://yaci-indexer:9095/api/v1
YACI_INDEXER_PORT=9095
HTTP_CONNECT_TIMEOUT_SECONDS=5
HTTP_REQUEST_TIMEOUT_SECONDS=5

## DB tuning / debugging
API_DB_SHOW_SQL=false
API_DB_MONITOR_PERFORMANCE=false #only needed for debugging and diagnostics
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to document this env var


## Basic db pool tuning, generally should not be changed but can be changed rarely if needed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double check if those env vars are already documented

API_DB_POOL_MAX_LIFETIME_MS=2000000
API_DB_POOL_CONNECTION_TIMEOUT_MS=100000
API_DB_KEEP_ALIVE_MS=60000
API_DB_LEAK_CONNECTIONS_WARNING_MS=60000

SYNC_GRACE_SLOTS_COUNT=100
17 changes: 8 additions & 9 deletions .env.h2
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Main variables
LOG=INFO
NETWORK=devkit
# mainnet, preprod, preview, sanchonet, devkit
# mainnet, preprod, preview, devkit
PROTOCOL_MAGIC=42
# mainnet 764824073, preprod 1, preview 2, sanchonet 4, devkit 42
# mainnet 764824073, preprod 1, preview 2, devkit 42

## H2 image
DB_IMAGE_NAME=h2
Expand All @@ -19,7 +19,7 @@ CARDANO_NODE_HOST=localhost
# Service name in docker-compose or local cardano node
CARDANO_NODE_PORT=3001
# Uncomment if you are using local cardano node
CARDANO_NODE_VERSION=10.2.1
CARDANO_NODE_VERSION=10.3.1
CARDANO_NODE_SUBMIT_HOST=localhost
NODE_SUBMIT_API_PORT=8090

Expand All @@ -40,11 +40,8 @@ SEARCH_PAGE_SIZE=100

## Yaci Indexer env
INDEXER_DOCKER_IMAGE_TAG=main
PRUNING_ENABLED=false
#The number of safe blocks to keep in the store. 2160 blocks *(20 seconds/block in average)=4320 seconds=12 hours.
PRUNING_SAFE_BLOCKS=2160
#Run transaction pruning every 600 seconds or 10 minutes.
PRUNING_INTERVAL=600
REMOVE_SPENT_UTXOS=false
REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNT=2160
YACI_SPRING_PROFILES=h2,n2c-socket
# database profiles: h2, h2-testdata, postgres
MEMPOOL_ENABLED=false
Expand Down Expand Up @@ -94,4 +91,6 @@ DB_POSTGRES_BGWRITER_LRU_MAXPAGES=50
DB_POSTGRES_BGWRITER_DELAY=500ms

# Path to local cardano node socket (Yaci DevKit)
CARDANO_NODE_SOCKET_PATH=${HOME}/.yaci-cli/local-clusters/default/node/node.sock
CARDANO_NODE_SOCKET_PATH=${HOME}/.yaci-cli/local-clusters/default/node/node.sock

SYNC_GRACE_SLOTS_COUNT=100
17 changes: 9 additions & 8 deletions .env.h2-testdata
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Main variables
LOG=INFO
NETWORK=devkit
# mainnet, preprod, preview, sanchonet, devkit
# mainnet, preprod, preview, devkit
PROTOCOL_MAGIC=42
# mainnet 764824073, preprod 1, preview 2, sanchonet 4, devkit 42
# mainnet 764824073, preprod 1, preview 2, devkit 42

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we officially removing sanchonet from this version?

## H2 image
DB_IMAGE_NAME=h2
Expand All @@ -19,7 +19,7 @@ CARDANO_NODE_HOST=localhost
# Service name in docker-compose or local cardano node
CARDANO_NODE_PORT=3001
# Uncomment if you are using local cardano node
CARDANO_NODE_VERSION=10.2.1
CARDANO_NODE_VERSION=10.3.1
CARDANO_NODE_SUBMIT_HOST=localhost
NODE_SUBMIT_API_PORT=8090

Expand All @@ -40,11 +40,10 @@ SEARCH_PAGE_SIZE=100

## Yaci Indexer env
INDEXER_DOCKER_IMAGE_TAG=main
PRUNING_ENABLED=false
REMOVE_SPENT_UTXOS=false
#The number of safe blocks to keep in the store. 2160 blocks *(20 seconds/block in average)=4320 seconds=12 hours.
PRUNING_SAFE_BLOCKS=2160
#Run transaction pruning every 600 seconds or 10 minutes.
PRUNING_INTERVAL=600
REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNT=2160

YACI_SPRING_PROFILES=h2-testdata,n2c-socket
# database profiles: h2, h2-testdata, postgres
MEMPOOL_ENABLED=false
Expand Down Expand Up @@ -94,4 +93,6 @@ DB_POSTGRES_BGWRITER_LRU_MAXPAGES=50
DB_POSTGRES_BGWRITER_DELAY=500ms

# Path to local cardano node socket (Yaci DevKit)
CARDANO_NODE_SOCKET_PATH=${HOME}/.yaci-cli/local-clusters/default/node/node.sock
CARDANO_NODE_SOCKET_PATH=${HOME}/.yaci-cli/local-clusters/default/node/node.sock

SYNC_GRACE_SLOTS_COUNT=100
45 changes: 45 additions & 0 deletions .github/actions/build_docker_images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,51 @@ runs:
file: ./yaci-indexer/Dockerfile
tags: cardanofoundation/cardano-rosetta-java-indexer:latest
push: true
- name: Cardano Node - Build and push Docker ${{ inputs.tag }} image
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/node/Dockerfile
tags: cardanofoundation/cardano-rosetta-java-cardano-node:${{ inputs.tag }}
push: true
- name: Cardano Node - Build and push Docker latest image
uses: docker/build-push-action@v4
if: ${{ inputs.isRelease == 'true' }}
with:
context: .
file: ./docker/node/Dockerfile
tags: cardanofoundation/cardano-rosetta-java-cardano-node:latest
push: true
- name: Postgres - Build and push Docker ${{ inputs.tag }} image
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/postgres/Dockerfile
tags: cardanofoundation/cardano-rosetta-java-postgres:${{ inputs.tag }}
push: true
- name: Postgres - Build and push Docker latest image
uses: docker/build-push-action@v4
if: ${{ inputs.isRelease == 'true' }}
with:
context: .
file: ./docker/postgres/Dockerfile
tags: cardanofoundation/cardano-rosetta-java-postgres:latest
push: true
- name: Mithril - Build and push Docker ${{ inputs.tag }} image
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/mithril/Dockerfile
tags: cardanofoundation/cardano-rosetta-java-mithril:${{ inputs.tag }}
push: true
- name: Mithril - Build and push Docker latest image
uses: docker/build-push-action@v4
if: ${{ inputs.isRelease == 'true' }}
with:
context: .
file: ./docker/mithril/Dockerfile
tags: cardanofoundation/cardano-rosetta-java-mithril:latest
push: true
- name: All-in-one - Build and push Docker image
uses: docker/build-push-action@v4
with:
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/feature-mvn-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v3
# - name: Set up JDK 21
# uses: actions/setup-java@v3
# with:
# java-version: '21'
# distribution: 'temurin'
# cache: maven

- name: Set up Amazon Corretto
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
distribution: 'corretto'
java-version: 24
cache: maven

- name: Build project
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/sonar-cloud-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 21
uses: actions/setup-java@v3
# - name: Set up JDK 21
# uses: actions/setup-java@v3
# with:
# java-version: '21'
# distribution: 'temurin'
# cache: maven

- name: Set up Amazon Corretto
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
distribution: 'corretto'
java-version: 24
cache: maven

- name: Build
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ settings.xml
!.env.h2
!.env.h2-testdata
!.env.docker-compose
!.env.docker-compose-preprod
!.env.docker-compose-profile-entry-level
!.env.docker-compose-profile-mid-level

Expand Down
Loading