You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-14Lines changed: 38 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,25 +6,28 @@
6
6
7
7
## What the project is about?
8
8
9
-
10
9
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
11
-
to fetch the data from a Cardano node.
10
+
to fetch the data from a Cardano node.
12
11
13
12
This component consists of:
13
+
14
14
- a full Cardano node
15
15
- a Cardano Submit API
16
16
- an indexer which stores data in Postgres
17
17
- the Mesh (formerly Rosetta) API
18
18
19
19
This implementation follows the [Rosetta API](https://docs.cdp.coinbase.com/mesh/docs/api-reference/) specification and is compatible with the [Rosetta CLI](https://docs.cdp.coinbase.com/mesh/docs/mesh-cli/).
20
-
It contains some extensions to fit the needs of the Cardano blockchain. These changes are documented in the [wiki](https://github.com/cardano-foundation/cardano-rosetta-java/wiki/2.-Cardano-Specific-API-Additions).
20
+
It contains some extensions to fit the needs of the Cardano blockchain. These changes are documented in the [documentation](https://cardano-foundation.github.io/cardano-rosetta-java/docs/core-concepts/cardano-addons).
21
21
22
22
## Documentation
23
-
Detailed explanation to all components can be found in the [wiki pages](https://github.com/cardano-foundation/cardano-rosetta-java/wiki) of this repository.
23
+
24
+
Detailed explanation to all components can be found in the [documentation](https://cardano-foundation.github.io/cardano-rosetta-java/docs/intro) of this repository.
24
25
It includes explanations about the Architecture, how to build and run the components and explanations to environment variables.
25
26
26
27
## System requirements
28
+
27
29
Since [Yaci-Store](https://github.com/bloxbean/yaci-store) is a comparatively lightweight indexer, the system requirements are lower than for other chain indexers. The following are the recommended system requirements for running this component:
30
+
28
31
- 4CPU Cores
29
32
- 32GB RAM
30
33
- 1TB of storage (PRUNING_ENABLED=false) [default]
@@ -33,88 +36,109 @@ Since [Yaci-Store](https://github.com/bloxbean/yaci-store) is a comparatively li
33
36
Better hardware will improve the performance of the indexer and the node, which will result in faster syncing times.
34
37
35
38
## Installation
36
-
By default this Cardano-node will sync the entire chain from Genesis.
39
+
40
+
By default this Cardano-node will sync the entire chain from Genesis.
37
41
This will take up to 48-72 hours (dependening on the system resources).
38
42
39
43
### Docker (build from source)
44
+
40
45
If your user is not in the `docker` group you might have to execute these commands with `sudo`.
41
-
The default config is focused on mainnet. If you want to test this on other Cardano netwoks (like `preview` or `preprod`) please adjust the `docker/.env.dockerfile` or read the Wiki page on [Environment variables](https://github.com/cardano-foundation/cardano-rosetta-java/wiki/5.-Environment-Variables) on other options and their default values.
46
+
The default config is focused on mainnet. If you want to test this on other Cardano netwoks (like `preview` or `preprod`) please adjust the `docker/.env.dockerfile` or read the documentation page on [Environment variables](https://cardano-foundation.github.io/cardano-rosetta-java/docs/install-and-deploy/env-vars) on other options and their default values.
Detailed explanation can be found in the [Wiki](https://github.com/cardano-foundation/cardano-rosetta-java/wiki/3.-Getting-Started-with-Docker).
54
+
55
+
Detailed explanation can be found in the [documentation](https://cardano-foundation.github.io/cardano-rosetta-java/docs/install-and-deploy/docker).
50
56
51
57
Depending on using a snapshot feature or not, this will take X amount of time. You can follow along with the commands below. Your instance is ready when you see: `DONE`.
52
58
53
59
### Offline mode
60
+
54
61
If you want to run rosetta-java in offline mode you need to set the `API_SPRING_PROFILES_ACTIVE` environment variable to `offline` in `./docker/.env.dockerfile`.
55
62
This will disable the syncing of the node and won't start the db and the indexer.
56
63
Default is `online`.
57
64
58
65
**Useful commands:**
66
+
59
67
- Following Docker container logs:
68
+
60
69
```bash
61
70
docker logs rosetta -f
62
71
```
72
+
63
73
- Access node logs:
74
+
64
75
```bash
65
76
docker exec rosetta tail -f /logs/node.log
66
77
```
78
+
67
79
- Access indexer logs:
80
+
68
81
```bash
69
82
docker exec rosetta tail -f /logs/indexer.log
70
83
```
84
+
71
85
- Interactive access to container:
86
+
72
87
```bash
73
-
docker exec -it rosetta bash # direct bash access within the container
88
+
docker exec -it rosetta bash # direct bash access within the container
74
89
75
90
76
-
# Useful commands within the container
91
+
# Useful commands within the container
77
92
cardano-cli query tip --mainnet # check node sync status
78
93
tail -f /logs/node.log # follow node logs
79
94
tail -f /logs/indexer.log # follow indexer logs
80
95
```
81
96
82
97
### Docker (using pre-built image)
98
+
83
99
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))
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).
105
+
106
+
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).
89
107
90
108
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/))
If needed we also provide all components needed to run Rosetta in a docker-compose file.
96
117
This will start:
118
+
97
119
- Cardano-node
98
120
- Cardano-Submit-API
99
121
- Yaci-Store
100
122
- Rosetta-API
101
123
- Postgres
102
124
103
125
### Entry level hardware profile
126
+
104
127
```bash
105
-
docker-compose --env-file .env.docker-compose --env-file .env.docker-compose-profile-mid-level -f docker-compose.yaml up -d
128
+
docker-compose --env-file .env.docker-compose --env-file .env.docker-compose-profile-mid-level -f docker-compose.yaml up -d
106
129
```
107
130
108
131
### A complete list of hardware profiles:
132
+
109
133
```
110
134
.env.docker-compose-profile-entry-level
111
135
.env.docker-compose-profile-mid-level
112
136
```
113
137
114
-
See https://github.com/cardano-foundation/cardano-rosetta-java/wiki/9.-Hardware-Profiles a full list of hardware profiles and their configurations.
138
+
See the [hardware profiles documentation](https://cardano-foundation.github.io/cardano-rosetta-java/docs/install-and-deploy/hardware-profiles) for a full list of hardware profiles and their configurations.
115
139
116
-
Further adjustments can be made by changing `.env.docker-compose` 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).
140
+
Further adjustments can be made by changing `.env.docker-compose` 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).
This guide explains how to optimize disk usage in **cardano-rosetta-java** through pruning.
10
+
11
+
## What is Pruning?
12
+
13
+
Pruning removes spent (consumed) UTXOs from local storage, keeping only unspent UTXOs. This can reduce on-disk storage from ~1TB down to ~400GB, but discards historical transaction data.
14
+
15
+
- Only unspent outputs are preserved.
16
+
- You can still validate the chain's current state (and spend tokens), since active UTXOs remain.
17
+
-**Enable Pruning**: Set `PRUNING_ENABLED=true` in your environment (e.g., in `.env.dockerfile` or `.env.docker-compose`).
18
+
-**Disable Pruning** (default): Set `PRUNING_ENABLED=false`.
19
+
20
+
## When to Enable Pruning
21
+
22
+
-**Low Disk Environments**: If you need to minimize disk usage and only require UTXO data for current balances.
23
+
-**Exploratory / Dev Environments**: If historical queries are not critical.
24
+
25
+
## When to Avoid Pruning
26
+
27
+
-**Full Historical Data Requirements**: If you need the complete transaction history—whether for exchange operations, audit trails, or compliance mandates—do not enable pruning. Pruning discards spent UTXOs, which removes older transaction data and prevents certain types of historical lookups or reporting.
28
+
29
+
## Example Configuration
30
+
31
+
Below is a snippet of how you might configure `.env.dockerfile` or `.env.docker-compose` for pruning:
32
+
33
+
```bash
34
+
# --- Pruning Toggle ---
35
+
PRUNING_ENABLED=true
36
+
# Enables pruning to reduce disk space requirements
37
+
```
38
+
39
+
## Further Reading
40
+
41
+
-[Rosetta API Reference](https://docs.cdp.coinbase.com/mesh/docs/api-reference/)
0 commit comments