Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7cce0d8
chore: version upgrade.
Sep 12, 2025
1656018
chore: version upgrade.
Sep 12, 2025
a1ff0cf
chore: version upgrade.
Sep 12, 2025
9a99387
adding new server health monitoring dashboard
Kartiiyer12 Sep 15, 2025
12359dc
add utxo store variables for interval and logging
Kartiiyer12 Sep 9, 2025
aeac1bd
adding REMOVE_SPENT_UTXOS_BATCH_SIZE and increading the pruning interval
tienna Sep 9, 2025
fb9caac
REMOVE_SPENT_UTXOS enabled by default and block grace count set to 30…
tienna Sep 15, 2025
628a111
Merge branch 'main' into develop
matiwinnetou Sep 18, 2025
19f617c
fix: increase pruning interval (#591)
matiwinnetou Sep 18, 2025
5e130c2
feat: adding new server health monitoring dashboard (#607)
matiwinnetou Sep 18, 2025
f152ea7
feat: token registry integration into Rosetta API.
Sep 23, 2025
1cb57ab
Merge branch 'main' into develop
matiwinnetou Sep 24, 2025
47ee52d
chore: integration test fixes
Sep 24, 2025
cf8c042
fix: enabling peer discovery as default for mainnet.
Sep 24, 2025
2ce3ffc
fix: missing variable in integration tests
matiwinnetou Sep 24, 2025
007f3d5
chore: added a bit more logging.
Sep 25, 2025
a2331f6
fix: more aggresive timeout for remote token registry request.
Sep 25, 2025
cae0196
fix: disable peer discovery, remove explicit token registry cache cle…
Sep 25, 2025
fea6091
add docker compose file with only api for offline mode (#608)
Kartiiyer12 Sep 26, 2025
5ad00af
Merge remote-tracking branch 'origin/main' into develop
Sep 26, 2025
5f72cec
Merge remote-tracking branch 'origin/develop' into develop
Sep 26, 2025
a94af5e
refactor: token registry service now returns a specialised domain obj…
matiwinnetou Oct 2, 2025
4ade4c0
fix: enable peer discovery by default.
Oct 2, 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: 14 additions & 1 deletion .env.IntegrationTest
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ 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
BLOCK_TRANSACTION_API_TIMEOUT_SECS=5
REMOVE_SPENT_UTXOS_BATCH_SIZE=3000

YACI_SPRING_PROFILES=postgres,n2c-socat
# database profiles: h2, h2-testdata, postgres
Expand All @@ -79,6 +80,8 @@ HOST_CLUSTER_API_PORT=10000
HOST_OGMIOS_PORT=1337
HOST_KUPO_PORT=1442
HOST_VIEWER_PORT=5173
PROMETHEUS_PORT=9090
GRAFANA_PORT=3000

## Devkit env
DEVKIT_ENABLED=true
Expand Down Expand Up @@ -149,4 +152,14 @@ CONTINUE_PARSING_ON_ERROR=false
SYNC=false

## Peer Discovery
PEER_DISCOVERY=false
PEER_DISCOVERY=false

## Token Registry
TOKEN_REGISTRY_ENABLED=false
TOKEN_REGISTRY_BASE_URL=https://tokens.cardano.org/api
TOKEN_REGISTRY_CACHE_TTL_HOURS=12
TOKEN_REGISTRY_LOGO_FETCH=false
TOKEN_REGISTRY_REQUEST_TIMEOUT_SECONDS=2

## Mithril version for Docker build
MITHRIL_VERSION=2524.0
17 changes: 13 additions & 4 deletions .env.docker-compose
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ SEARCH_LIMIT=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
REMOVE_SPENT_UTXOS=true
#The number of safe blocks to keep in the store. 129600 blocks *(20 seconds/block in average)=30 days.
REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNT=129600
REMOVE_SPENT_UTXOS_BATCH_SIZE=3000
BLOCK_TRANSACTION_API_TIMEOUT_SECS=5

YACI_SPRING_PROFILES=postgres,n2c-socket
Expand Down Expand Up @@ -108,4 +109,12 @@ CONTINUE_PARSING_ON_ERROR=true
SYNC=true

## Peer Discovery
PEER_DISCOVERY=false
PEER_DISCOVERY=true

## Token Registry
# Token registry is enabled for mainnet
TOKEN_REGISTRY_ENABLED=true
TOKEN_REGISTRY_BASE_URL=https://tokens.cardano.org/api
TOKEN_REGISTRY_CACHE_TTL_HOURS=12
TOKEN_REGISTRY_LOGO_FETCH=false
TOKEN_REGISTRY_REQUEST_TIMEOUT_SECONDS=2
17 changes: 13 additions & 4 deletions .env.docker-compose-preprod
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ SEARCH_LIMIT=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
REMOVE_SPENT_UTXOS=true
#The number of safe blocks to keep in the store. 129600 blocks *(20 seconds/block in average)=30 days
REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNT=129600
REMOVE_SPENT_UTXOS_BATCH_SIZE=3000
BLOCK_TRANSACTION_API_TIMEOUT_SECS=5

YACI_SPRING_PROFILES=postgres,n2c-socket
Expand Down Expand Up @@ -108,4 +109,12 @@ GRAFANA_PORT=3000
POSTGRESQL_EXPORTER_PORT=9187

## Peer Discovery
PEER_DISCOVERY=true
PEER_DISCOVERY=true

## Token Registry
# Externally hosted token registry is currently only available for mainnet
TOKEN_REGISTRY_ENABLED=true
TOKEN_REGISTRY_BASE_URL=http://preview.integrations.cf-systems.internal:8080/api
TOKEN_REGISTRY_CACHE_TTL_HOURS=1
TOKEN_REGISTRY_LOGO_FETCH=true
TOKEN_REGISTRY_REQUEST_TIMEOUT_SECONDS=2
3 changes: 2 additions & 1 deletion .env.docker-compose-profile-advanced-level
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ DB_POSTGRES_MAX_PARALLEL_WORKERS_PER_GATHER=8
DB_POSTGRES_MAX_PARALLEL_WORKERS=16
DB_POSTGRES_SEQ_PAGE_COST=0.5
DB_POSTGRES_JIT=off
DB_POSTGRES_BGWRITER_LRU_MAXPAGES=100
DB_POSTGRES_BGWRITER_LRU_MAXPAGES=300
DB_POSTGRES_BGWRITER_DELAY=200ms
DB_POSTGRES_WAL_BUFFERS=512MB
DB_POSTGRES_CHECKPOINT_COMPLETION_TARGET=0.9
DB_POSTGRES_AUTOVACUUM_MAX_WORKERS=5
3 changes: 2 additions & 1 deletion .env.docker-compose-profile-mid-level
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ DB_POSTGRES_MAX_PARALLEL_WORKERS_PER_GATHER=4
DB_POSTGRES_MAX_PARALLEL_WORKERS=8
DB_POSTGRES_SEQ_PAGE_COST=1.0
DB_POSTGRES_JIT=off
DB_POSTGRES_BGWRITER_LRU_MAXPAGES=100
DB_POSTGRES_BGWRITER_LRU_MAXPAGES=200
DB_POSTGRES_BGWRITER_DELAY=200ms
DB_POSTGRES_AUTOVACUUM_MAX_WORKERS=5
13 changes: 11 additions & 2 deletions .env.h2
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ SEARCH_LIMIT=100

## Yaci Indexer env
INDEXER_DOCKER_IMAGE_TAG=main
REMOVE_SPENT_UTXOS=false
REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNT=2160
REMOVE_SPENT_UTXOS=true
REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNT=129600
REMOVE_SPENT_UTXOS_BATCH_SIZE=3000

BLOCK_TRANSACTION_API_TIMEOUT_SECS=5

YACI_SPRING_PROFILES=h2,n2c-socket
Expand Down Expand Up @@ -102,3 +104,10 @@ CONTINUE_PARSING_ON_ERROR=false

## Indexer sync starts after node is at tip. Set false for offline mode.
SYNC=false

## Token Registry
TOKEN_REGISTRY_ENABLED=false
TOKEN_REGISTRY_BASE_URL=https://tokens.cardano.org/api
TOKEN_REGISTRY_CACHE_TTL_HOURS=12
TOKEN_REGISTRY_LOGO_FETCH=false
TOKEN_REGISTRY_REQUEST_TIMEOUT_SECONDS=2
15 changes: 12 additions & 3 deletions .env.h2-testdata
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ SEARCH_LIMIT=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
REMOVE_SPENT_UTXOS=true
#The number of safe blocks to keep in the store. 129600 blocks *(20 seconds/block in average)=30 days.
REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNT=129600
REMOVE_SPENT_UTXOS_BATCH_SIZE=3000

BLOCK_TRANSACTION_API_TIMEOUT_SECS=5

YACI_SPRING_PROFILES=h2-testdata,n2c-socket
Expand Down Expand Up @@ -103,3 +105,10 @@ CONTINUE_PARSING_ON_ERROR=false

## Indexer sync starts after node is at tip. Set false for offline mode.
SYNC=false

## Token Registry
TOKEN_REGISTRY_ENABLED=false
TOKEN_REGISTRY_BASE_URL=https://tokens.cardano.org/api
TOKEN_REGISTRY_CACHE_TTL_HOURS=12
TOKEN_REGISTRY_LOGO_FETCH=false
TOKEN_REGISTRY_REQUEST_TIMEOUT_SECONDS=2
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ docker exec rosetta tail -f /logs/indexer.log
- Controller implementations in `api/{domain}/controller/` implement generated interfaces
- Always use @Nullable annotation in case of optional fields for function methods parameter inputs and outputs, records, DTOs, and entities
- Avoid if { return } else {} , if we already have a return statement, we can just return the value, no need for else block
- Use @NotNull annotation everywhere where we can be sure that value will not be null, use @Nullable in case value can be null sometimes
- Considering that we will have @NotNull and @Nullable annotations, just put nulls checks only when you actually need it, if a field / property is annotated with @NonNull, there is no need for a null check in the code

### Database Architecture
- **Hibernate JPA** for standard ORM operations
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ For every Release we provide pre-built docker images stored in the DockerHub Rep
To start it use the following command:

```bash
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.3.3
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.4.0
```

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 [documentation](https://cardano-foundation.github.io/cardano-rosetta-java/docs/install-and-deploy/env-vars).

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/))

```bash
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.3.3
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.4.0
```

### Docker compose
Expand Down
5 changes: 5 additions & 0 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.0.0-jre</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package org.cardanofoundation.rosetta.api.account.mapper;

import java.util.List;
import java.util.Map;

import org.cardanofoundation.rosetta.api.common.model.AssetFingerprint;
import org.mapstruct.Context;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.openapitools.client.model.AccountBalanceResponse;
Expand All @@ -10,6 +13,7 @@
import org.cardanofoundation.rosetta.api.account.model.domain.AddressBalance;
import org.cardanofoundation.rosetta.api.account.model.domain.Utxo;
import org.cardanofoundation.rosetta.api.block.model.domain.BlockIdentifierExtended;
import org.cardanofoundation.rosetta.api.common.model.TokenRegistryCurrencyData;
import org.cardanofoundation.rosetta.common.mapper.util.BaseMapper;

@Mapper(config = BaseMapper.class, uses = {AccountMapperUtil.class})
Expand All @@ -26,13 +30,15 @@ public interface AccountMapper {
*/
@Mapping(target = "blockIdentifier.hash", source = "block.hash")
@Mapping(target = "blockIdentifier.index", source = "block.number")
@Mapping(target = "balances", qualifiedByName = "mapAddressBalancesToAmounts")
@Mapping(target = "balances", source = "balances", qualifiedByName = "mapAddressBalancesToAmounts")
AccountBalanceResponse mapToAccountBalanceResponse(BlockIdentifierExtended block,
List<AddressBalance> balances);
List<AddressBalance> balances,
@Context Map<AssetFingerprint, TokenRegistryCurrencyData> metadataMap);

@Mapping(target = "blockIdentifier.hash", source = "block.hash")
@Mapping(target = "blockIdentifier.index", source = "block.number")
@Mapping(target = "coins", source = "utxos", qualifiedByName = "mapUtxosToCoins")
AccountCoinsResponse mapToAccountCoinsResponse(BlockIdentifierExtended block,
List<Utxo> utxos);
List<Utxo> utxos,
@Context Map<AssetFingerprint, TokenRegistryCurrencyData> metadataMap);
}
Loading
Loading