Skip to content

Commit e06fd58

Browse files
authored
Chore/update genesis files (#230)
Added short explanations for all run modis to the readme to provide an easy access for users into this project. Picked up your suggestions and extended it.
2 parents 4d6fe89 + c60ce80 commit e06fd58

File tree

8 files changed

+14664
-14589
lines changed

8 files changed

+14664
-14589
lines changed

README.md

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,86 @@
77
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
88
to fetch the data from a Cardano node.
99

10+
This component consists of:
11+
- a full Cardano node
12+
- a Cardano Submit API
13+
- an indexer which stores data in Postgres
14+
- the Mesh (formerly Rosetta) API
15+
16+
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/).
17+
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).
1018

1119
## Documentation
20+
Detailed explanation to all components can be found in the [wiki pages](https://github.com/cardano-foundation/cardano-rosetta-java/wiki) of this repository.
21+
It includes explanations about the Architecture, how to build and run the components and explanations to environment variables.
22+
23+
## System requirements
24+
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:
25+
- 4CPU Cores
26+
- 32GB RAM
27+
- 400GB of storage
28+
29+
Better hardware will improve the performance of the indexer and the node, which will result in faster syncing times.
30+
31+
## Installation
32+
By default this Cardano-node will sync the entire chain from Genesis.
33+
This will take up to 48-72 hours (dependening on the system resources).
34+
35+
### Docker (build from source)
36+
If your user is not in the `docker` group you might have to execute these commands with `sudo`.
37+
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.
38+
39+
```bash
40+
git clone https://github.com/cardano-foundation/cardano-rosetta-java
41+
cd cardano-rosetta-java
42+
docker build -t rosetta-java -f ./docker/Dockerfile .
43+
docker run --name rosetta --env-file ./docker/.env.dockerfile -p 8082:8082 -d rosetta-java:latest
44+
```
45+
Detailed explanation can be found in the [Wiki](https://github.com/cardano-foundation/cardano-rosetta-java/wiki/3.-Getting-Started-with-Docker).
46+
47+
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`.
48+
49+
**Useful commands:**
50+
- Following Docker container logs:
51+
```bash
52+
docker logs rosetta -f
53+
```
54+
- Access node logs:
55+
```bash
56+
docker exec rosetta tail -f /logs/node.log
57+
```
58+
- Interactive access to container:
59+
```bash
60+
docker exec -it rosetta bash # direct bash access within the container
61+
62+
63+
# Useful commands within the container
64+
cardano-cli query tip --mainnet # check node sync status
65+
tail -f /logs/node.log # follow node logs
66+
tail -f /logs/indexer.log # follow indexer logs
67+
```
68+
69+
### Docker (using pre-built image)
70+
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))
71+
To start it use the following command:
72+
```bash
73+
docker run --name rosetta --env-file ./docker/.env.dockerfile -p 8082:8082 -d cardanofoundation/cardano-rosetta-java:latest
74+
```
75+
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).
76+
77+
### Docker compose
78+
If needed we also provide all components needed to run Rosetta in a docker-compose file.
79+
This will start:
80+
- Cardano-node
81+
- Cardano-Submit-API
82+
- Yaci-Store
83+
- Rosetta-API
84+
- Postgres
1285

13-
Please refer to our [wiki pages](https://github.com/cardano-foundation/cardano-rosetta-java/wiki) for more information on the project.
86+
```bash
87+
docker-compose --env-file .env.docker-compose -f docker-compose.yaml up -d
88+
```
89+
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).
1490

1591
---
16-
Thanks for visiting us and enjoy :heart:!
92+
Thanks for visiting us and enjoy :heart:!

config/mainnet/alonzo-genesis.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"lovelacePerUTxOWord": 34482,
33
"executionPrices": {
44
"prSteps":
5-
{
6-
"numerator" : 721,
7-
"denominator" : 10000000
8-
},
5+
{
6+
"numerator" : 721,
7+
"denominator" : 10000000
8+
},
99
"prMem":
10-
{
11-
"numerator" : 577,
12-
"denominator" : 10000
13-
}
10+
{
11+
"numerator" : 577,
12+
"denominator" : 10000
13+
}
1414
},
1515
"maxTxExUnits": {
1616
"exUnitsMem": 10000000,
@@ -193,4 +193,4 @@
193193
"sliceByteString-cpu-arguments-intercept": 150000
194194
}
195195
}
196-
}
196+
}

0 commit comments

Comments
 (0)