Skip to content

Commit

Permalink
Amend docs content re renaming (#299)
Browse files Browse the repository at this point in the history
* Amend description in node docs re software renaming

* Amend links in node docs re software renaming

* Amend description in README re software renaming

* Amend description in network docs re software renaming

* Amend links in network docs re software renaming

* Amend description in state channels docs re software renaming
  • Loading branch information
lucafavatella committed Jan 24, 2019
1 parent f40639d commit 362d566
Show file tree
Hide file tree
Showing 14 changed files with 76 additions and 76 deletions.
2 changes: 1 addition & 1 deletion GOSSIP.md
Expand Up @@ -24,7 +24,7 @@ aenode://pp_HryRGHJ7Ct3trkktVyVBgfhHL1J4EYSD9cScuMZDV61eSHrCZ@mynode.example.com
```

A node is uniquely identified by its public key, and it can only have one IP and
port at the same time. This means one IP can have several instances of Epoch
port at the same time. This means one IP can have several instances of Aeternity node
started at the same time listening on different ports if they have different
public keys. This key corresponds to the private key that is used for the Noise
protocol listener associated with the IP and port.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -24,10 +24,10 @@ implemented or considered for implementation.

## [Serialization formats](./serializations.md)

## Epoch
## Aeternity node

Epoch is the reference implementation of the Aeternity protocol. Since we don't
want to fragment relevant information too much, documentation specific to Epoch,
The Aeternity node is the reference implementation of the Aeternity protocol. Since we don't
want to fragment relevant information too much, documentation specific to the Aeternity node,
such as API descriptions, will be kept in this repository until we decide for a
better solution.

Expand Down
2 changes: 1 addition & 1 deletion SYNC.md
Expand Up @@ -181,7 +181,7 @@ synchronize the chain, and the current list of unconfirmed transactions.
Synchronizing the chain is (potentially) a big task, and the node will utilize
all its connected peers to fetch blocks and transactions.

(***TODO***: Write a detailed description of the epoch implementation.)
(***TODO***: Write a detailed description of the Aeternity node implementation.)

Synchronizing the unconfirmed transactions is a smaller task and the
node will pick one other peer and synchronize (only the missing) transactions
Expand Down
10 changes: 5 additions & 5 deletions channels/OFF-CHAIN.md
Expand Up @@ -360,9 +360,9 @@ The payload (`data`) must be the latest mutually signed offchain state, and
the clients must verify that they have the corresponding state trees to match
the state (otherwise, it will not be possible to use the channel later on.)

In the `epoch` implementation, the state trees are cached inside the node.
In the Aeternity node implementation, the state trees are cached inside the node.
Note that if the node restarts, cached data is not likely to survive (it is
not persisted on each update for performance reasons.) The `epoch` channel
not persisted on each update for performance reasons.) The Aeternity node channel
fsm automatically recovers the state trees and verifies that the provided
state is in fact the last mutually signed state.

Expand Down Expand Up @@ -568,7 +568,7 @@ message.
Message code: 10

Since both sides may initiate an `update` request, it is possible that both
may do so at roughly the same time. In particular, in the `epoch` system,
may do so at roughly the same time. In particular, in the Aeternity node system,
if an `update` request arrives while the fsm is waiting for its client to
sign a new state update, it reverts both its own update attempt and the
other participant's update request by sending an `update_error` message.
Expand Down Expand Up @@ -662,7 +662,7 @@ useable.
Message code: 14

Since both sides may initiate a `deposit_created` request, it is possible
that both may do so at roughly the same time. In particular, in the `epoch`
that both may do so at roughly the same time. In particular, in the Aeternity node
system, if a `deposit_created` request arrives while the fsm is waiting for
its client to sign a new state update, it reverts both its own update attempt
and the other participant's update request by sending a `deposit_error` message.
Expand Down Expand Up @@ -755,7 +755,7 @@ useable.
Message code: 18

Since both sides may initiate a `withdraw_created` request, it is possible
that both may do so at roughly the same time. In particular, in the `epoch`
that both may do so at roughly the same time. In particular, in the Aeternity node
system, if a `withdraw_created` request arrives while the fsm is waiting for
its client to sign a new state update, it reverts both its own update attempt
and the other participant's withdraw request by sending a `withdraw_error`
Expand Down
14 changes: 7 additions & 7 deletions node/api/README.md
@@ -1,13 +1,13 @@
# Æternity epoch node API
# Æternity node API

This document:
* Provides an overview of the API exposed by the epoch node;
* Defines the Channels WebSocket API of the epoch node;
* Describes the intended usage of the user API of the epoch node.
* Provides an overview of the API exposed by the Aeternity node;
* Defines the Channels WebSocket API of the Aeternity node;
* Describes the intended usage of the user API of the Aeternity node.

## Overview

The epoch node exposes the following APIs:
The Aeternity node exposes the following APIs:
* Peer-to-peer network API. It consists of one TCP endpoint:
* It is encrypted and authenticated using the Noise protocol;
* The schema of its payload is [defined](/sync/);
Expand All @@ -32,7 +32,7 @@ The epoch node exposes the following APIs:
* They are used for connecting as a `responder` role in channel
communication;
* It is up to the node operator to define the range to be used; Their
configuration is not part of `epoch`;
configuration is not part of the Aeternity node;
* They are encrypted and authenticated using the Noise protocol using
dynamic keys;
* The schema of its payload is [defined](/channels/OFF-CHAIN.md#messages);
Expand All @@ -55,7 +55,7 @@ channel. At any point in time channel can be closed either unilaterally or
through mutual agreement.

### Connection
The epoch node supports an endpoint with a configurable port where the
The Aeternity node supports an endpoint with a configurable port where the
WebSocket's clients connect. It is located on `/channel`.

The node could serve multiple channel WebSocket clients. Their number is configured in
Expand Down
2 changes: 1 addition & 1 deletion node/api/api_encoding.md
@@ -1,7 +1,7 @@
[back](./README.md)
# Encoding scheme for API identifiers and byte arrays

Epoch uses
The Aeternity node uses
[base58Check](https://en.bitcoin.it/wiki/Base58Check_encoding)
encoding for identifiers such as account and contract public
keys. Base58c is not well suited for encoding big byte arrays, so for
Expand Down
2 changes: 1 addition & 1 deletion node/api/channels_api_usage.md
Expand Up @@ -636,7 +636,7 @@ current mutually signed state and then terminates. The `'reestablish'` request
is very similar to a [Channel open](#channel-open) request, but also requires
the channel id and the latest mutually signed state.

The full state, including state trees, is cached internally by the `epoch`
The full state, including state trees, is cached internally by the Aeternity
node, and upon reestablish, it is verified that the encoded state provided
by the client corresponds to the latest full state retrieved from the cache.

Expand Down
30 changes: 15 additions & 15 deletions node/api/contract_api_usage.md
Expand Up @@ -8,7 +8,7 @@ To learn more about contracts and contract life cycles see [the doc](/contracts/
There are two basic types of API calls, off-chain operations and on-chain transactions.

For an up to date list of all HTTP API endpoints and their arguments see
[Epoch HTTP API](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json)
[Aeternity node HTTP API](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json)

## Sophia calldata creation

Expand Down Expand Up @@ -40,17 +40,17 @@ function and arguments to the call:

## Off chain operations

An epoch node provides some utility functions to help you create contract transactions and test contracts.
An Aeternity node provides some utility functions to help you create contract transactions and test contracts.


### Contract Compile
[/debug/contracts/code/compile doc](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json#/internal/CompileContract)
[/debug/contracts/code/compile doc](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json#/internal/CompileContract)

### Encode Call Data
[/debug/contracts/code/encode-calldata doc](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json#/internal/EncodeCalldata)
[/debug/contracts/code/encode-calldata doc](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json#/internal/EncodeCalldata)

### Call
[/debug/contracts/code/call doc](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json#/internal/CallContract)
[/debug/contracts/code/call doc](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json#/internal/CallContract)

The arguments to the /debug/contracts/code/call endpoint are:
* `code` - an address of a contract on chain.
Expand All @@ -60,41 +60,41 @@ The arguments to the /debug/contracts/code/call endpoint are:
* `abi` - Currently only "sophia-address" is supported.

### Dry-run
[/debug/transactions/dry-run doc](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json#/internal/DryRunTxs)
[/debug/transactions/dry-run doc](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json#/internal/DryRunTxs)

The arguments to the /debug/transactions/dry-run endpoint are:
* `txs` - a list of *unsigned* transactions to execute.
* `top` - an optional blockhash at which to do the dry-run (if not specified `top` hash will be used).
* `accounts` - a list of "extra" accounts to be used in the dry-run.

### Decode Call Data
[/debug/contracts/code/decode-data doc](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json#/internal/DecodeData)
[/debug/contracts/code/decode-data doc](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json#/internal/DecodeData)

## On chain transactions

An epoch node provides some APIs to format contract transactions and an API for submitting a signed transaction.
An Aeternity node provides some APIs to format contract transactions and an API for submitting a signed transaction.

There are two contract transactions available: create and call.

You:
* Format the contract transaction using the corresponding API;
* (As for any other transaction) sign offline (i.e. outside of the epoch node) the transaction according to consensus;
* (As for any other transaction) submit the transaction to the epoch node using [its API](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json#/external/PostTransaction).
* (As for any other transaction) sign offline (i.e. outside of the Aeternity node) the transaction according to consensus;
* (As for any other transaction) submit the transaction to the Aeternity node using [its API](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json#/external/PostTransaction).

In order to affect the state of the chain you have to submit the signed transaction to a mining node.

### Contract Create
[/debug/contracts/create doc](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json#/internal/PostContractCreate)
[/debug/contracts/create doc](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json#/internal/PostContractCreate)

[/debug/contracts/create/compute doc](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json#/internal/PostContractCreateCompute)
[/debug/contracts/create/compute doc](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json#/internal/PostContractCreateCompute)

### Contract Call
[/debug/contracts/call doc](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json#/internal/PostContractCall)
[/debug/contracts/call doc](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json#/internal/PostContractCall)

[/debug/contracts/call/compute doc](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json#/internal/PostContractCallCompute)
[/debug/contracts/call/compute doc](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json#/internal/PostContractCallCompute)

## Reading chain data

### Contract Call Result
[/transactions/{hash}/info doc](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json#/external/GetTransactionInfoByHash)
[/transactions/{hash}/info doc](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json#/external/GetTransactionInfoByHash)

14 changes: 7 additions & 7 deletions node/api/mining_api_usage.md
Expand Up @@ -3,33 +3,33 @@

## Introduction

In order to get a reward and transaction fees, the epoch node needs to mine
In order to get a reward and transaction fees, the Aeternity node needs to mine
a key block. With increased difficulty, the probability of mining a key block
is lower. Therefore, the miners can form mining pools where they share the
processing power over the network so they can mine key blocks more often. They
split the reward according to the amount of work they contribute to mine a
block. The mining pool is formed of a mining pool manager that manages the
pool (and gets a fee for that) and the miners.

The epoch node provides very basic API that allows to retrieve a pending key
The Aeternity node provides very basic API that allows to retrieve a pending key
block and submit a mined key block.

The way to interact with the epoch node is to use HTTP API.
The way to interact with the Aeternity node is to use HTTP API.

The following assumes that the node exposes at address 127.0.0.1 the following
ports:
* User API external HTTP endpoint: 3013
* User API internal HTTP endpoint: 3113

## Epoch node modes
## Aeternity node modes

### Pool manager

The epoch node can be configured (using `autostart: false`) not to mine key
The Aeternity node can be configured (using `autostart: false`) not to mine key
blocks. Even though the node does not mine the key blocks, it still produces
the key block candidates that do not have `nonce` and `pow` set. These key
block candidates can be retrieved using the
[/key-blocks/pending endpoint](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json#/external/GetPendingKeyBlock):
[/key-blocks/pending endpoint](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json#/external/GetPendingKeyBlock):

```
curl http://127.0.0.1:3013/v2/key-blocks/pending
Expand All @@ -38,7 +38,7 @@ curl http://127.0.0.1:3013/v2/key-blocks/pending
```

The pool manager node can accept the key blocks mined elsewhere using the
[/key-blocks endpoint](https://aeternity.github.io/epoch-api-docs/?config=https://raw.githubusercontent.com/aeternity/epoch/master/apps/aehttp/priv/swagger.json#/internal/PostKeyBlock):
[/key-blocks endpoint](https://aeternity.github.io/api-docs/?config=https://raw.githubusercontent.com/aeternity/aeternity/master/apps/aehttp/priv/swagger.json#/internal/PostKeyBlock):

```
curl -X POST -H "Content-Type: application/json" http://localhost:3113/v2/key-blocks -d'{"beneficiary":"ak_25MZX3BXYP32YDPGWsJqYZ6CgWnqD93VdpCYaTk6KsThEbeFJX","hash":"kh_2K6enJiddfPvZTPJ9m5WgbFAc4y1Gtm4tx6C4ZbKtkUh3QqAJ6","height":6402,"miner":"ak_BpwWtzwJpfGe6AmusjQ9a5aqKF784nXkB2apoHPmNmrJTnPdn","nonce":2461944701583915239,"pow":[515,592,722,2277,5240,5312,6595,6839,7029,7395,7526,7887,8923,9132,12424,13618,14312,14628,15103,15328,16004,16739,16820,17997,18693,19146,19817,20099,21378,22029,22254,23161,24974,25504,25946,26563,28831,29300,29425,30198,31005,31202],"prev_hash":"kh_kb3PaxWQmnE2Nz3CU9GKmX1ZKq2yxEc4YcKL1AT9TSTmrB6YM","prev_key_hash":"kh_kb3PaxWQmnE2Nz3CU9GKmX1ZKq2yxEc4YcKL1AT9TSTmrB6YM","state_hash":"bs_h1XLV6ALUWDP2q7B3B8vxzwgVPncsytAyKH5S8SC8EuFeZYBw","target":537156549,"time":1538656736062,"version":23}'
Expand Down

0 comments on commit 362d566

Please sign in to comment.