-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
65 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## Getting Started with Docker | ||
|
||
### Prerequisites | ||
|
||
- Docker | ||
- Docker Compose | ||
- Java 21 | ||
- For integration tests: Node 14+ | ||
|
||
### How to build | ||
|
||
- Clone the repository | ||
- For local environment: | ||
- Copy `.env.docker-compose` to `.env` | ||
- Fill the `.env` file with your values (explain below) or use the provided for docker-compose setup | ||
- Start SpringBoot application with `mvn spring-boot:run` within submodule `api` or `yaci-indexer` | ||
- Run `docker compose -f docker-compose.yaml up --build` to start rosetta api service including yaci-store and a cardano node | ||
- Using the provided env file `docker-compose --env-file .env.docker-compose -f docker-compose.yaml up --build` | ||
* Note: the first time you run the command, it will take a little bit of your time to build the cardano-node, and next time it will be cached when run. So please be patient. | ||
|
||
### How to run integration tests | ||
|
||
- Run `docker compose --env-file .env.IntegrationTest -f docker-integration-test-environment.yaml up --build -d --wait` | ||
- Using CLI | ||
- Install newman `npm install -g newman` (Node version 14+ needed) | ||
- Run `newman run ./postmanTests/rosetta-java.postman_collection.json -e ./postmanTests/Rosetta-java-env.postman_environment.json -r cli` | ||
- Using Postman | ||
- Install [Postman](https://www.postman.com) | ||
- Import the collection `./postmanTests/rosetta-java.postman_collection.json` | ||
- Import the environment `./postmanTests/Rosetta-java-env.postman_environment.json` | ||
- Run the collection | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
- [Architecture Overview](https://github.com/cardano-foundation/cardano-rosetta-java/wiki) | ||
- [Cardano specific API Additions](./docs/cardano-specific-api-additions.md) | ||
- User guides | ||
- TODO | ||
- Development Guides | ||
- [Getting Started with H2](./docs/dev-h2-quick-start-guide.md) | ||
- [Getting Started with Docker](./docs/docker-getting-started-guide) | ||
- [Environment Variables](./docs/environment-variables.md) | ||
- [Contributing Guidelines](./CONTRIBUTING.md) | ||
|
||
|
||
### Restore a snapshot | ||
**TBD for yaci-store** | ||
|
||
A node snapshot can be downloaded from [here](https://csnapshots.io/). Download the snapshot and place the files within the `CARDANO_NODE_DB` Path. | ||
|
||
For mainnet the following command can be used to restore the snapshot: | ||
```bash | ||
curl -o - https://downloads.csnapshots.io/mainnet/$(curl -s https://downloads.csnapshots.io/mainnet/mainnet-db-snapshot.json| jq -r .[].file_name ) | lz4 -c -d - | tar -x -C ${CARDANO_NODE_DB} | ||
``` | ||
|
||
### Mempool Monitoring | ||
Mempool monitoring can be activated when adding the spring profile `mempool` to the rosetta api service. | ||
It will be turned off by default. Since it is only working for nodes, which participate in the network and available within P2P from other nodes. | ||
So the Node itself needs extra configuration to be able to query mempool transactions. |