Skip to content

Commit

Permalink
Merge pull request #487 from oasisprotocol/pro-wh/feature/nodedir
Browse files Browse the repository at this point in the history
docs: updates
  • Loading branch information
pro-wh committed Nov 28, 2023
2 parents cfa7f11 + 71fb6a1 commit 6253479
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 36 deletions.
1 change: 1 addition & 0 deletions .changelog/487.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs: update links and node directories
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ The format is inspired by [Keep a Changelog].

<!-- markdownlint-disable line-length -->
The Rosetta ecosystem prefers this:
[Rosetta's guidance on Docker deployment](https://www.rosetta-api.org/docs/node_deployment.html#ubuntu-image-compatibility).
[Rosetta's guidance on Docker deployment](https://docs.cloud.coinbase.com/rosetta/docs/docker-deployment#ubuntu-image-compatibility).
<!-- markdownlint-enable line-length -->

- docker: Skip running node if offline var is set
Expand Down
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ See the [Rosetta API] docs for information on how to use the API.
Oasis-specific Rosetta API information is given in the
[Oasis-specific Information] subsection below.

[Rosetta]: https://www.rosetta-api.org/
[Oasis Network]: https://docs.oasis.dev/general/oasis-network/overview
[Rosetta API]: https://www.rosetta-api.org/docs/welcome.html
[Rosetta]: https://docs.cloud.coinbase.com/rosetta/docs/welcome
[Oasis Network]: https://docs.oasis.io/general/oasis-network/
[Rosetta API]: https://docs.cloud.coinbase.com/rosetta/docs/welcome
[Oasis-specific Information]: #oasis-specific-information

## Building and Testing
Expand All @@ -49,7 +49,7 @@ make clean
[Rosetta CLI], set up a test Oasis network, make some sample transactions,
then run the gateway and validate it using `rosetta-cli`.

[Oasis Node]: https://docs.oasis.dev/general/run-a-node/prerequisites/oasis-node
[Oasis Node]: https://docs.oasis.io/node/run-your-node/prerequisites/oasis-node/
[Rosetta CLI]: https://github.com/coinbase/rosetta-cli

## Contributing
Expand All @@ -69,8 +69,8 @@ See our [Release Process] document.
## Running the Gateway

The gateway connects to an Oasis Node, so make sure you have a running node
first. For more details, see the [Run a Non-validator Node] doc of the general
[Oasis Docs].
first. For more details, see the [Run a Non-validator Node] doc of the
[Run Node Oasis Docs].

Set the `OASIS_NODE_GRPC_ADDR` environment variable to the node's gRPC socket
address (e.g. `unix:/path/to/node/internal.sock`).
Expand All @@ -81,9 +81,9 @@ port that you want the gateway to listen on (default is 8080).
Start the gateway simply by running the executable `oasis-rosetta-gateway`.

[Run a Non-validator Node]:
https://docs.oasis.dev/general/run-a-node/set-up-your-node/run-non-validator#configuration
[Oasis Docs]:
https://docs.oasis.dev/
https://docs.oasis.io/node/run-your-node/non-validator-node/#configuration
[Run Node Oasis Docs]:
https://docs.oasis.io/node/

## Offline Mode

Expand All @@ -106,9 +106,9 @@ The only supported endpoints in offline mode are:
```

[Construction API]:
https://www.rosetta-api.org/docs/construction_api_introduction.html
https://docs.cloud.coinbase.com/rosetta/docs/construction-api-overview
[genesis document's hash]:
https://docs.oasis.dev/oasis-core/high-level-components/index/genesis#genesis-documents-hash
https://docs.oasis.io/core/consensus/genesis#genesis-documents-hash

## Oasis-specific Information

Expand All @@ -118,7 +118,7 @@ This section describes how Oasis fits into the Rosetta APIs.

[Rosetta API documentation][api-network-identifier]

[api-network-identifier]: https://www.rosetta-api.org/docs/api_identifiers.html#network-identifier
[api-network-identifier]: https://docs.cloud.coinbase.com/rosetta/docs/identifiers#network-identifier

For Amber (at time of writing):

Expand All @@ -137,7 +137,7 @@ hex encoded SHA-512/256 hash of the CBOR encoded genesis document.

[Rosetta API documentation][api-account-identifier]

[api-account-identifier]: https://www.rosetta-api.org/docs/api_identifiers.html#account-identifier
[api-account-identifier]: https://docs.cloud.coinbase.com/rosetta/docs/identifiers#account-identifier

#### General Account

Expand Down Expand Up @@ -196,7 +196,7 @@ For the fee accumulator:

[Rosetta API documentation][api-currency]

[api-currency]: https://www.rosetta-api.org/docs/api_objects.html#currency
[api-currency]: https://docs.cloud.coinbase.com/rosetta/docs/objects#currency

#### ROSE

Expand All @@ -217,9 +217,9 @@ Rosetta API documentation on
[/construction/payloads][api-constructionpayloads].

[api-constructionpreprocess]:
https://www.rosetta-api.org/docs/ConstructionApi.html#constructionpreprocess
https://docs.cloud.coinbase.com/rosetta/reference/constructionpreprocess
[api-constructionpayloads]:
https://www.rosetta-api.org/docs/ConstructionApi.html#constructionpayloads
https://docs.cloud.coinbase.com/rosetta/reference/constructionpayloads

The first two operations in the listings are the gas fee payment.
For zero-fee transactions, omit them and decrease the remaining operation
Expand Down Expand Up @@ -676,14 +676,14 @@ transaction's intent:
* The `metadata` field is absent.

[api-block]:
https://www.rosetta-api.org/docs/BlockApi.html#block
https://docs.cloud.coinbase.com/rosetta/reference/block
[partial block identifier]:
https://www.rosetta-api.org/docs/models/PartialBlockIdentifier.html
https://docs.cloud.coinbase.com/rosetta/docs/full-reference#identifiers
[block response]:
https://www.rosetta-api.org/docs/models/BlockResponse.html
https://docs.cloud.coinbase.com/rosetta/docs/full-reference#requests-and-responses
[block]:
https://www.rosetta-api.org/docs/models/Block.html
https://docs.cloud.coinbase.com/rosetta/docs/full-reference#objects
[transaction]:
https://www.rosetta-api.org/docs/models/Transaction.html
https://docs.cloud.coinbase.com/rosetta/docs/full-reference#objects
[operation]:
https://www.rosetta-api.org/docs/models/Operation.html
https://docs.cloud.coinbase.com/rosetta/docs/full-reference#objects
2 changes: 1 addition & 1 deletion docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Ignore everything to prevent accidentally copying any files from the context
# directory.
# NOTE: This is a requirement for Rosetta API Docker Deployment:
# https://www.rosetta-api.org/docs/node_deployment.html#build-anywhere
# https://docs.cloud.coinbase.com/rosetta/docs/docker-deployment#build-anywhere
**/*
18 changes: 10 additions & 8 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ the [Oasis Node] and the [Oasis Rosetta gateway], as instructed by the
[Rosetta Docker Deployment] doc.

The node should be configured as described in [Run a Non-validator Node] doc
of the general [Oasis Docs].
of the [Run Node Oasis Docs].

The `/node` directory in the instructions is equivalent to the `/data`
The `/node/data` directory in the instructions is equivalent to the `/data`
directory of the Docker image.
The `/node/etc` directory in the instructions is equivalent to the `/data/etc`
directory of the Docker image.
We recommend creating a volume mount for `/data` so that you can manage the
directory across version upgrades.
Expand Down Expand Up @@ -48,16 +50,16 @@ build image to save disk space.
https://github.com/oasisprotocol/oasis-rosetta-gateway/releases/
[Change Log for 1.1.1]:
https://github.com/oasisprotocol/oasis-rosetta-gateway/blob/v1.1.1/CHANGELOG.md
[Rosetta API]: https://www.rosetta-api.org/docs/welcome.html
[Rosetta API]: https://docs.cloud.coinbase.com/rosetta/docs/welcome
[Oasis Core]: https://github.com/oasisprotocol/oasis-core
[Oasis Node]:
https://docs.oasis.dev/general/run-a-node/prerequisites/oasis-node
https://docs.oasis.io/node/run-your-node/prerequisites/oasis-node/
[Oasis Rosetta Gateway]:
https://github.com/oasisprotocol/oasis-rosetta-gateway
[Rosetta Docker Deployment]:
https://www.rosetta-api.org/docs/node_deployment.html
https://docs.cloud.coinbase.com/rosetta/docs/docker-deployment
[Run a Non-validator Node]:
https://docs.oasis.dev/general/run-a-node/set-up-your-node/run-non-validator#configuration
[Oasis Docs]:
https://docs.oasis.dev/
https://docs.oasis.io/node/run-your-node/non-validator-node/#configuration
[Run Node Oasis Docs]:
https://docs.oasis.io/node/
<!-- markdownlint-enable line-length -->
7 changes: 4 additions & 3 deletions services/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ func (s *accountAPIService) AccountCoins(
ctx context.Context,
request *types.AccountCoinsRequest,
) (*types.AccountCoinsResponse, *types.Error) {
// https://www.rosetta-api.org/docs/AccountApi.html#accountcoins
// If your implementation does not support coins (i.e. it is for an account-based blockchain), you do not need to
// implement this endpoint.
// https://docs.cloud.coinbase.com/rosetta/reference/accountcoins
// > If your implementation does not support coins (i.e. it is for an
// > account-based blockchain), you do not need to implement this
// > endpoint.
return nil, ErrNotImplemented
}
2 changes: 1 addition & 1 deletion services/construction.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://www.rosetta-api.org/docs/construction_api_introduction.html
// https://docs.cloud.coinbase.com/rosetta/docs/construction-api-overview
package services

import (
Expand Down

0 comments on commit 6253479

Please sign in to comment.