Skip to content

Commit 2e0d533

Browse files
authored
chore: prepare 1.2.7 release (#405)
2 parents be7989f + cd2e21b commit 2e0d533

File tree

83 files changed

+1173
-818
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1173
-818
lines changed

.env.IntegrationTest

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ DB_IMAGE_NAME=postgres
88
DB_IMAGE_TAG=latest
99

1010
## Yaci image
11-
YACI_VERSION=0.0.20-beta1
11+
YACI_VERSION=0.10.5
1212

1313
## Postgres variables
1414
DB_NAME=rosetta-java
@@ -20,6 +20,7 @@ DB_PORT=5432
2020
DB_SCHEMA=${NETWORK}
2121
DB_PATH=data
2222
UPDATE_GENESIS_BLOCK_QUERY="UPDATE devkit.block SET number = 0 WHERE number = -1; UPDATE devkit.block SET prev_hash = 'Genesis' WHERE number = 1"
23+
#UPDATE_GENESIS_BLOCK_QUERY="UPDATE devkit.block SET prev_hash = 'Genesis' WHERE number = 1"
2324

2425
## Cardano Node variables
2526
CARDANO_NODE_HOST=yaci-cli
@@ -65,7 +66,7 @@ PRUNING_SAFE_BLOCKS=2160
6566
PRUNING_INTERVAL=600
6667

6768
YACI_SPRING_PROFILES=postgres,n2c-socat
68-
# database profiles: h2, h2-testData, postgres
69+
# database profiles: h2, h2-testdata, postgres
6970
MEMPOOL_ENABLED=false
7071

7172
## Ports

.env.docker-compose

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ CARDANO_NODE_HOST=cardano-node
2525
# Service name in docker-compose or local cardano node
2626
CARDANO_NODE_PORT=3001
2727
# Uncomment if you are using local cardano node
28-
CARDANO_NODE_VERSION=10.1.4
28+
CARDANO_NODE_VERSION=10.2.1
2929
CARDANO_NODE_SUBMIT_HOST=cardano-submit-api
3030
NODE_SUBMIT_API_PORT=8090
3131
CARDANO_NODE_DIR=/node
@@ -64,7 +64,7 @@ PRUNING_SAFE_BLOCKS=2160
6464
PRUNING_INTERVAL=600
6565

6666
YACI_SPRING_PROFILES=postgres,n2c-socket
67-
# database profiles: h2, h2-testData, postgres
67+
# database profiles: h2, h2-testdata, postgres
6868
MEMPOOL_ENABLED=false
6969

7070
## Devkit env

.env.h2

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CARDANO_NODE_HOST=localhost
1919
# Service name in docker-compose or local cardano node
2020
CARDANO_NODE_PORT=3001
2121
# Uncomment if you are using local cardano node
22-
CARDANO_NODE_VERSION=10.1.4
22+
CARDANO_NODE_VERSION=10.2.1
2323
CARDANO_NODE_SUBMIT_HOST=localhost
2424
NODE_SUBMIT_API_PORT=8090
2525

@@ -46,7 +46,7 @@ PRUNING_SAFE_BLOCKS=2160
4646
#Run transaction pruning every 600 seconds or 10 minutes.
4747
PRUNING_INTERVAL=600
4848
YACI_SPRING_PROFILES=h2,n2c-socket
49-
# database profiles: h2, h2-testData, postgres
49+
# database profiles: h2, h2-testdata, postgres
5050
MEMPOOL_ENABLED=false
5151

5252
## Logger Config
@@ -91,4 +91,7 @@ DB_POSTGRES_MAX_PARALLEL_WORKERS=4
9191
DB_POSTGRES_SEQ_PAGE_COST=1.0
9292
DB_POSTGRES_JIT=off
9393
DB_POSTGRES_BGWRITER_LRU_MAXPAGES=50
94-
DB_POSTGRES_BGWRITER_DELAY=500ms
94+
DB_POSTGRES_BGWRITER_DELAY=500ms
95+
96+
# Path to local cardano node socket (Yaci DevKit)
97+
CARDANO_NODE_SOCKET_PATH=${HOME}/.yaci-cli/local-clusters/default/node/node.sock

.env.h2-testdata

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
## Main variables
2+
LOG=INFO
3+
NETWORK=devkit
4+
# mainnet, preprod, preview, sanchonet, devkit
5+
PROTOCOL_MAGIC=42
6+
# mainnet 764824073, preprod 1, preview 2, sanchonet 4, devkit 42
7+
8+
## H2 image
9+
DB_IMAGE_NAME=h2
10+
DB_IMAGE_TAG=14.11-bullseye
11+
12+
## Postgres variables
13+
DB_NAME=rosetta-java
14+
DB_USER=rosetta_db_admin
15+
DB_SECRET=weakpwd#123_d
16+
17+
## Cardano Node variables
18+
CARDANO_NODE_HOST=localhost
19+
# Service name in docker-compose or local cardano node
20+
CARDANO_NODE_PORT=3001
21+
# Uncomment if you are using local cardano node
22+
CARDANO_NODE_VERSION=10.2.1
23+
CARDANO_NODE_SUBMIT_HOST=localhost
24+
NODE_SUBMIT_API_PORT=8090
25+
26+
## Api env
27+
API_DOCKER_IMAGE_TAG=main
28+
API_SPRING_PROFILES_ACTIVE=h2
29+
# staging, h2, test. Additional profiles: mempool (if mempool should be activated)
30+
API_PORT=8082
31+
PRINT_EXCEPTION=true
32+
33+
ROSETTA_VERSION=1.4.13
34+
TOPOLOGY_FILEPATH=./config/${NETWORK}/topology.json
35+
GENESIS_SHELLEY_PATH=./config/${NETWORK}/shelley-genesis.json
36+
GENESIS_BYRON_PATH=./config/${NETWORK}/byron-genesis.json
37+
GENESIS_ALONZO_PATH=./config/${NETWORK}/alonzo-genesis.json
38+
GENESIS_CONWAY_PATH=./config/${NETWORK}/conway-genesis.json
39+
SEARCH_PAGE_SIZE=100
40+
41+
## Yaci Indexer env
42+
INDEXER_DOCKER_IMAGE_TAG=main
43+
PRUNING_ENABLED=false
44+
#The number of safe blocks to keep in the store. 2160 blocks *(20 seconds/block in average)=4320 seconds=12 hours.
45+
PRUNING_SAFE_BLOCKS=2160
46+
#Run transaction pruning every 600 seconds or 10 minutes.
47+
PRUNING_INTERVAL=600
48+
YACI_SPRING_PROFILES=h2-testdata,n2c-socket
49+
# database profiles: h2, h2-testdata, postgres
50+
MEMPOOL_ENABLED=false
51+
52+
## Logger Config
53+
LOG_FILE_PATH=logs
54+
LOG_FILE_NAME=logs/rosetta-java.log
55+
LOG_FILE_MAX_SIZE=10MB
56+
LOG_FILE_MAX_HISTORY=10
57+
58+
YACI_HTTP_BASE_URL=http://localhost:9095/api/v1
59+
YACI_INDEXER_PORT=9095
60+
HTTP_CONNECT_TIMEOUT_SECONDS=5
61+
HTTP_REQUEST_TIMEOUT_SECONDS=5
62+
63+
## Rosetta JAVA DB pool performance tuning
64+
API_DB_POOL_MIN_COUNT=10
65+
API_DB_POOL_MAX_COUNT=10
66+
API_DB_POOL_MAX_LIFETIME_MS=2000000
67+
API_DB_POOL_CONNECTION_TIMEOUT_MS=100000
68+
API_DB_KEEP_ALIVE_MS=60000
69+
API_DB_LEAK_CONNECTIONS_WARNING_MS=60000
70+
71+
## DB tuning / debugging
72+
API_DB_SHOW_SQL=false
73+
API_DB_MONITOR_PERFORMANCE=false #only needed for debugging and diagnostics
74+
75+
## PostgreSQL Tuning (PostgreSQL Defaults)
76+
DB_POSTGRES_MAX_CONNECTIONS=100
77+
DB_POSTGRES_SHARED_BUFFERS=128MB
78+
DB_POSTGRES_EFFECTIVE_CACHE_SIZE=4GB
79+
DB_POSTGRES_WORK_MEM=4MB
80+
DB_POSTGRES_MAINTENANCE_WORK_MEM=64MB
81+
DB_POSTGRES_WAL_BUFFERS=16MB
82+
DB_POSTGRES_CHECKPOINT_COMPLETION_TARGET=0.5
83+
DB_POSTGRES_RANDOM_PAGE_COST=4.0
84+
85+
## Advanced PostgreSQL Tuning
86+
DB_POSTGRES_EFFECTIVE_IO_CONCURRENCY=1
87+
DB_POSTGRES_PARALLEL_TUPLE_COST=0.1
88+
DB_POSTGRES_PARALLEL_SETUP_COST=1000
89+
DB_POSTGRES_MAX_PARALLEL_WORKERS_PER_GATHER=2
90+
DB_POSTGRES_MAX_PARALLEL_WORKERS=4
91+
DB_POSTGRES_SEQ_PAGE_COST=1.0
92+
DB_POSTGRES_JIT=off
93+
DB_POSTGRES_BGWRITER_LRU_MAXPAGES=50
94+
DB_POSTGRES_BGWRITER_DELAY=500ms
95+
96+
# Path to local cardano node socket (Yaci DevKit)
97+
CARDANO_NODE_SOCKET_PATH=${HOME}/.yaci-cli/local-clusters/default/node/node.sock

.fossa.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 3
2+
project:
3+
name: cardano-rosetta-java
4+
ignore:
5+
- jakarta.servlet:jakarta.servlet-api
6+
- jakarta.websocket:jakarta.websocket-api
7+
- jakarta.websocket:jakarta.websocket-client-api
8+
- org.jboss.threads:jboss-threads
9+
10+
policies:
11+
- id: ignore-jakarta
12+
type: license
13+
description: "Ignore flagged Jakarta dependencies"
14+
conditions:
15+
license:
16+
- "GPL-2.0-with-classpath-exception"
17+
- "LGPL-2.1-or-later"
18+
actions:
19+
- allow

.github/workflows/fossa-scan.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@ jobs:
99
fossa-scan:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
13-
- uses: fossas/fossa-action@main # Use a specific version if locking is preferred
12+
- name: "Checkout Code"
13+
uses: actions/checkout@v3
14+
15+
- name: "Run FOSSA Scan"
16+
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
1417
with:
1518
api-key: ${{secrets.FOSSA_API_KEY}}
16-
- uses: fossas/fossa-action@main # Use a specific version if locking is preferred
19+
config: .fossa.yml
20+
21+
- name: "Run FOSSA Test"
22+
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
1723
with:
1824
api-key: ${{secrets.FOSSA_API_KEY}}
19-
run-tests: true
25+
run-tests: true
26+
config: .fossa.yml

.github/workflows/integration-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
node-version: '21.x'
2323
- name: "Update Genesis block number"
24-
run: |
24+
run: |
2525
source ./.env.IntegrationTest
2626
echo "$UPDATE_GENESIS_BLOCK_QUERY" > temp.sql
2727
PGPASSWORD=$DB_SECRET psql -h localhost -p 5432 -d $DB_NAME -U $DB_USER -f temp.sql

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ settings.xml
4444

4545
# Allow files for a docker-compose entry point
4646
!.env.h2
47+
!.env.h2-testdata
4748
!.env.docker-compose
4849
!.env.docker-compose-profile-entry-level
4950
!.env.docker-compose-profile-mid-level

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
## What the project is about?
88

9+
910
This repository provides a lightweight java implementation of the [Rosetta API](https://github.com/coinbase/mesh-specifications). It uses [Yaci-Store](https://github.com/bloxbean/yaci-store) as an indexer
1011
to fetch the data from a Cardano node.
1112

@@ -82,13 +83,13 @@ Default is `online`.
8283
For every Release we provide pre-built docker images stored in the DockerHub Repositories of the Cardano Foundation ([DockerHub](https://hub.docker.com/orgs/cardanofoundation/repositories))
8384
To start it use the following command:
8485
```bash
85-
docker run --name rosetta -v {CUSTOM_MOUNT_PATH}:/node --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-mid-level -p 8082:8082 --shm-size=4g -d cardanofoundation/cardano-rosetta-java:1.2.6
86+
docker run --name rosetta -v {CUSTOM_MOUNT_PATH}:/node --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-mid-level -p 8082:8082 --shm-size=4g -d cardanofoundation/cardano-rosetta-java:1.2.7
8687
```
8788
Changes to the configuration can be made by adjusting the `docker/.env.dockerfile` file. For more information on the environment variables, please refer to the [Wiki](https://github.com/cardano-foundation/cardano-rosetta-java/wiki/5.-Environment-Variables).
8889

8990
If you want to use the `cardano-submit-api` you can additionally expose port `8090`. It can then be used to submit raw cbor transaction (API documentation here: [Link](https://input-output-hk.github.io/cardano-rest/submit-api/))
9091
```bash
91-
docker run --name rosetta -v {CUSTOM_MOUNT_PATH}:/node --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-mid-level -p 8090:8090 -p 8082:8082 --shm-size=4g -d cardanofoundation/cardano-rosetta-java:1.2.6
92+
docker run --name rosetta -v {CUSTOM_MOUNT_PATH}:/node --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-mid-level -p 8090:8090 -p 8082:8082 --shm-size=4g -d cardanofoundation/cardano-rosetta-java:1.2.7
9293
```
9394
### Docker compose
9495
If needed we also provide all components needed to run Rosetta in a docker-compose file.
@@ -116,3 +117,4 @@ Further adjustments can be made by changing `.env.docker-compose` file. For more
116117

117118
---
118119
Thanks for visiting us and enjoy :heart:!
120+

api/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@
3333
<dependency>
3434
<groupId>org.springframework.boot</groupId>
3535
<artifactId>spring-boot-starter-web</artifactId>
36+
<exclusions>
37+
<exclusion>
38+
<groupId>org.springframework.boot</groupId>
39+
<artifactId>spring-boot-starter-tomcat</artifactId>
40+
</exclusion>
41+
</exclusions>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.springframework.boot</groupId>
45+
<artifactId>spring-boot-starter-undertow</artifactId>
3646
</dependency>
3747
<dependency>
3848
<groupId>org.springframework.boot</groupId>

0 commit comments

Comments
 (0)