Skip to content

Commit 6fd1a8c

Browse files
docs: docs improvements for v1.2.7 (#431)
* feat: add OpenAPI specification copying to deployment workflow * chore: update terminology and enhance feature descriptions for clarity * feat: add local search functionality in Docusaurus docs * chore: update documentation and configuration for Cardano Rosetta Java, including new hardware profiles, environment variables, and user guides * chore: update hardware profile specifications for Cardano Rosetta Java documentation --------- Co-authored-by: matiwinnetou <mateusz.szczap@gmail.com>
1 parent 7eddc6a commit 6fd1a8c

Some content is hidden

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

61 files changed

+3926
-1909
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ jobs:
2727
working-directory: docs
2828
steps:
2929
- uses: actions/checkout@v4
30+
31+
- name: Copy OpenAPI spec
32+
run: mkdir -p docs/static && cp api/src/main/resources/rosetta-specifications-1.4.15/api.yaml docs/static/api.yaml
33+
working-directory: ${{ github.workspace }} # Run from root
34+
3035
- uses: actions/setup-node@v4
3136
with:
3237
node-version: 18

README.md

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,28 @@
66

77
## What the project is about?
88

9-
109
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.
1211

1312
This component consists of:
13+
1414
- a full Cardano node
1515
- a Cardano Submit API
1616
- an indexer which stores data in Postgres
1717
- the Mesh (formerly Rosetta) API
1818

1919
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).
2121

2222
## 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.
2425
It includes explanations about the Architecture, how to build and run the components and explanations to environment variables.
2526

2627
## System requirements
28+
2729
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+
2831
- 4CPU Cores
2932
- 32GB RAM
3033
- 1TB of storage (PRUNING_ENABLED=false) [default]
@@ -33,88 +36,109 @@ Since [Yaci-Store](https://github.com/bloxbean/yaci-store) is a comparatively li
3336
Better hardware will improve the performance of the indexer and the node, which will result in faster syncing times.
3437

3538
## 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.
3741
This will take up to 48-72 hours (dependening on the system resources).
3842

3943
### Docker (build from source)
44+
4045
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.
4247

4348
```bash
4449
git clone https://github.com/cardano-foundation/cardano-rosetta-java
4550
cd cardano-rosetta-java
4651
docker build -t rosetta-java -f ./docker/Dockerfile .
4752
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 rosetta-java
4853
```
49-
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).
5056

5157
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`.
5258

5359
### Offline mode
60+
5461
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`.
5562
This will disable the syncing of the node and won't start the db and the indexer.
5663
Default is `online`.
5764

5865
**Useful commands:**
66+
5967
- Following Docker container logs:
68+
6069
```bash
6170
docker logs rosetta -f
6271
```
72+
6373
- Access node logs:
74+
6475
```bash
6576
docker exec rosetta tail -f /logs/node.log
6677
```
78+
6779
- Access indexer logs:
80+
6881
```bash
6982
docker exec rosetta tail -f /logs/indexer.log
7083
```
84+
7185
- Interactive access to container:
86+
7287
```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
7489

7590

76-
# Useful commands within the container
91+
# Useful commands within the container
7792
cardano-cli query tip --mainnet # check node sync status
7893
tail -f /logs/node.log # follow node logs
7994
tail -f /logs/indexer.log # follow indexer logs
8095
```
8196

8297
### Docker (using pre-built image)
98+
8399
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))
84100
To start it use the following command:
101+
85102
```bash
86103
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
87104
```
88-
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).
89107

90108
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/))
109+
91110
```bash
92111
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
93112
```
113+
94114
### Docker compose
115+
95116
If needed we also provide all components needed to run Rosetta in a docker-compose file.
96117
This will start:
118+
97119
- Cardano-node
98120
- Cardano-Submit-API
99121
- Yaci-Store
100122
- Rosetta-API
101123
- Postgres
102124

103125
### Entry level hardware profile
126+
104127
```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
106129
```
107130

108131
### A complete list of hardware profiles:
132+
109133
```
110134
.env.docker-compose-profile-entry-level
111135
.env.docker-compose-profile-mid-level
112136
```
113137

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.
115139

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).
117141

118142
---
119-
Thanks for visiting us and enjoy :heart:!
120143

144+
Thanks for visiting us and enjoy :heart:!

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# Production
55
/build
6+
/docs/static/api.yaml
67

78
# Generated files
89
.docusaurus

docs/docs/advanced/_category_.json renamed to docs/docs/advanced-configuration/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"label": "Advanced Configuration and Performance",
2+
"label": "Advanced Configuration",
33
"position": 5,
44
"link": {
55
"type": "generated-index",

docs/docs/development/performance/db-tuning.md renamed to docs/docs/advanced-configuration/db-tuning.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,5 +141,3 @@ If you want a UI-based approach, tools like **pgAdmin**, **pganalyze**, or **pgw
141141
For **real-time monitoring**, use **`pg_stat_statements`**.
142142
For **logging slow queries**, enable **`auto_explain`**.
143143
For **detailed analysis**, filter logs for **`Seq Scan`**.
144-
145-
Would you like help setting up any of these? 🚀
File renamed without changes.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
sidebar_position: 1
3+
title: Pruning UTXOs
4+
description: Optimizing disk usage with pruning
5+
---
6+
7+
# Pruning UTXOs
8+
9+
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/)
42+
- [Yaci-Store Repository](https://github.com/bloxbean/yaci-store)

docs/docs/advanced/configuration-and-performance.md

Lines changed: 0 additions & 106 deletions
This file was deleted.

docs/docs/api/_category_.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)