Rename genesis block to genesis config (#6816)

This commit is contained in:
Justin Starry
2019-11-08 23:56:57 -05:00
committed by GitHub
parent 63425bed10
commit 9807f47d4e
79 changed files with 1104 additions and 1094 deletions

View File

@@ -200,7 +200,7 @@ SUBCOMMANDS:
claim-storage-reward Redeem storage reward credits
cluster-version Get the version of the cluster entrypoint
confirm Confirm transaction by signature
create-archiver-storage-account Create an archiver storage account
create-archiver-storage-account Create an archiver storage account
create-stake-account Create a stake account
create-validator-storage-account Create a validator storage account
create-vote-account Create a vote account
@@ -210,7 +210,7 @@ SUBCOMMANDS:
fees Display current cluster fees
get Get cli config settings
get-epoch-info Get information about the current epoch
get-genesis-blockhash Get the genesis blockhash
get-genesis-hash Get the genesis hash
get-slot Get current slot
get-transaction-count Get current transaction count
help Prints this message or the help of the given subcommand(s)
@@ -236,7 +236,7 @@ SUBCOMMANDS:
#### solana-address
```text
solana-address
solana-address
Get your public key
USAGE:
@@ -254,7 +254,7 @@ OPTIONS:
#### solana-airdrop
```text
solana-airdrop
solana-airdrop
Request lamports
USAGE:
@@ -278,7 +278,7 @@ ARGS:
#### solana-balance
```text
solana-balance
solana-balance
Get your balance
USAGE:
@@ -300,7 +300,7 @@ ARGS:
#### solana-cancel
```text
solana-cancel
solana-cancel
Cancel a transfer
USAGE:
@@ -321,7 +321,7 @@ ARGS:
#### solana-claim-storage-reward
```text
solana-claim-storage-reward
solana-claim-storage-reward
Redeem storage reward credits
USAGE:
@@ -343,7 +343,7 @@ ARGS:
#### solana-cluster-version
```text
solana-cluster-version
solana-cluster-version
Get the version of the cluster entrypoint
USAGE:
@@ -361,7 +361,7 @@ OPTIONS:
#### solana-confirm
```text
solana-confirm
solana-confirm
Confirm transaction by signature
USAGE:
@@ -382,7 +382,7 @@ ARGS:
#### solana-create-archiver-storage-account
```text
solana-create-archiver-storage-account
solana-create-archiver-storage-account
Create an archiver storage account
USAGE:
@@ -404,7 +404,7 @@ ARGS:
#### solana-create-stake-account
```text
solana-create-stake-account
solana-create-stake-account
Create a stake account
USAGE:
@@ -432,7 +432,7 @@ ARGS:
#### solana-create-validator-storage-account
```text
solana-create-validator-storage-account
solana-create-validator-storage-account
Create a validator storage account
USAGE:
@@ -454,7 +454,7 @@ ARGS:
#### solana-create-vote-account
```text
solana-create-vote-account
solana-create-vote-account
Create a vote account
USAGE:
@@ -480,7 +480,7 @@ ARGS:
#### solana-deactivate-stake
```text
solana-deactivate-stake
solana-deactivate-stake
Deactivate the delegated stake from the stake account
USAGE:
@@ -501,7 +501,7 @@ ARGS:
#### solana-delegate-stake
```text
solana-delegate-stake
solana-delegate-stake
Delegate stake to a vote account
USAGE:
@@ -523,7 +523,7 @@ ARGS:
#### solana-deploy
```text
solana-deploy
solana-deploy
Deploy a program
USAGE:
@@ -544,7 +544,7 @@ ARGS:
#### solana-fees
```text
solana-fees
solana-fees
Display current cluster fees
USAGE:
@@ -562,7 +562,7 @@ OPTIONS:
#### solana-get
```text
solana-get
solana-get
Get cli config settings
USAGE:
@@ -583,7 +583,7 @@ ARGS:
#### solana-get-epoch-info
```text
solana-get-epoch-info
solana-get-epoch-info
Get information about the current epoch
USAGE:
@@ -599,13 +599,13 @@ OPTIONS:
-k, --keypair <PATH> /path/to/id.json
```
#### solana-get-genesis-blockhash
#### solana-get-genesis-hash
```text
solana-get-genesis-blockhash
Get the genesis blockhash
solana-get-genesis-hash
Get the genesis hash
USAGE:
solana get-genesis-blockhash [OPTIONS]
solana get-genesis-hash [OPTIONS]
FLAGS:
-h, --help Prints help information
@@ -619,7 +619,7 @@ OPTIONS:
#### solana-get-slot
```text
solana-get-slot
solana-get-slot
Get current slot
USAGE:
@@ -637,7 +637,7 @@ OPTIONS:
#### solana-get-transaction-count
```text
solana-get-transaction-count
solana-get-transaction-count
Get current transaction count
USAGE:
@@ -655,7 +655,7 @@ OPTIONS:
#### solana-help
```text
solana-help
solana-help
Prints this message or the help of the given subcommand(s)
USAGE:
@@ -667,7 +667,7 @@ ARGS:
#### solana-pay
```text
solana-pay
solana-pay
Send a payment
USAGE:
@@ -695,7 +695,7 @@ ARGS:
#### solana-ping
```text
solana-ping
solana-ping
Submit transactions sequentially
USAGE:
@@ -716,7 +716,7 @@ OPTIONS:
#### solana-redeem-vote-credits
```text
solana-redeem-vote-credits
solana-redeem-vote-credits
Redeem credits in the stake account
USAGE:
@@ -738,7 +738,7 @@ ARGS:
#### solana-send-signature
```text
solana-send-signature
solana-send-signature
Send a signature to authorize a transfer
USAGE:
@@ -760,7 +760,7 @@ ARGS:
#### solana-send-timestamp
```text
solana-send-timestamp
solana-send-timestamp
Send a timestamp to unlock a transfer
USAGE:
@@ -783,7 +783,7 @@ ARGS:
#### solana-set
```text
solana-set
solana-set
Set a cli config setting
USAGE:
@@ -801,7 +801,7 @@ OPTIONS:
#### solana-show-account
```text
solana-show-account
solana-show-account
Show the contents of an account
USAGE:
@@ -824,7 +824,7 @@ ARGS:
#### solana-show-stake-account
```text
solana-show-stake-account
solana-show-stake-account
Show the contents of a stake account
USAGE:
@@ -846,7 +846,7 @@ ARGS:
#### solana-show-storage-account
```text
solana-show-storage-account
solana-show-storage-account
Show the contents of a storage account
USAGE:
@@ -867,7 +867,7 @@ ARGS:
#### solana-show-validators
```text
solana-show-validators
solana-show-validators
Show information about the current validators
USAGE:
@@ -886,7 +886,7 @@ OPTIONS:
#### solana-show-vote-account
```text
solana-show-vote-account
solana-show-vote-account
Show the contents of a vote account
USAGE:
@@ -908,7 +908,7 @@ ARGS:
#### solana-stake-authorize-staker
```text
solana-stake-authorize-staker
solana-stake-authorize-staker
Authorize a new stake signing keypair for the given stake account
USAGE:
@@ -930,7 +930,7 @@ ARGS:
#### solana-stake-authorize-withdrawer
```text
solana-stake-authorize-withdrawer
solana-stake-authorize-withdrawer
Authorize a new withdraw signing keypair for the given stake account
USAGE:
@@ -952,7 +952,7 @@ ARGS:
#### solana-uptime
```text
solana-uptime
solana-uptime
Show the uptime of a validator, based on epoch voting history
USAGE:
@@ -975,7 +975,7 @@ ARGS:
#### solana-validator-info
```text
solana-validator-info
solana-validator-info
Publish/get Validator info on Solana
USAGE:
@@ -998,7 +998,7 @@ SUBCOMMANDS:
#### solana-vote-authorize-voter
```text
solana-vote-authorize-voter
solana-vote-authorize-voter
Authorize a new vote signing keypair for the given vote account
USAGE:
@@ -1020,7 +1020,7 @@ ARGS:
#### solana-vote-authorize-withdrawer
```text
solana-vote-authorize-withdrawer
solana-vote-authorize-withdrawer
Authorize a new withdraw signing keypair for the given vote account
USAGE:
@@ -1042,7 +1042,7 @@ ARGS:
#### solana-withdraw-stake
```text
solana-withdraw-stake
solana-withdraw-stake
Withdraw the unstaked lamports from the stake account
USAGE:
@@ -1063,4 +1063,3 @@ ARGS:
<AMOUNT> The amount to withdraw from the stake account (default unit SOL)
<UNIT> Specify unit to use for request [possible values: SOL, lamports]
```

View File

@@ -21,7 +21,7 @@ To interact with a Solana node inside a JavaScript application, use the [solana-
* [getClusterNodes](jsonrpc-api.md#getclusternodes)
* [getEpochInfo](jsonrpc-api.md#getepochinfo)
* [getEpochSchedule](jsonrpc-api.md#getepochschedule)
* [getGenesisBlockhash](jsonrpc-api.md#getgenesisblockhash)
* [getGenesisHash](jsonrpc-api.md#getgenesishash)
* [getLeaderSchedule](jsonrpc-api.md#getleaderschedule)
* [getMinimumBalanceForRentExemption](jsonrpc-api.md#getminimumbalanceforrentexemption)
* [getNumBlocksSinceSignatureConfirmation](jsonrpc-api.md#getnumblockssincesignatureconfirmation)
@@ -255,7 +255,7 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "m
### getEpochSchedule
Returns epoch schedule information from this cluster's genesis block
Returns epoch schedule information from this cluster's genesis config
#### Parameters:
@@ -281,9 +281,9 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "m
{"jsonrpc":"2.0","result":{"first_normal_epoch":8,"first_normal_slot":8160,"leader_schedule_slot_offset":8192,"slots_per_epoch":8192,"warmup":true},"id":1}
```
### getGenesisBlockhash
### getGenesisHash
Returns the genesis block hash
Returns the genesis hash
#### Parameters:
@@ -297,7 +297,7 @@ None
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getGenesisBlockhash"}' http://localhost:8899
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getGenesisHash"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":"GH7ome3EiwEr7tu9JuTh2dpYWBJK3z69Xm1ZE3MEE6JC","id":1}

View File

@@ -4,7 +4,7 @@ A Solana cluster is a set of validators working together to serve client transac
## Creating a Cluster
Before starting any validators, one first needs to create a _genesis block_. The block contains entries referencing two public keys, a _mint_ and a _bootstrap leader_. The validator holding the bootstrap leader's private key is responsible for appending the first entries to the ledger. It initializes its internal state with the mint's account. That account will hold the number of native tokens defined by the genesis block. The second validator then contacts the bootstrap leader to register as a _validator_ or _archiver_. Additional validators then register with any registered member of the cluster.
Before starting any validators, one first needs to create a _genesis config_. The config references two public keys, a _mint_ and a _bootstrap leader_. The validator holding the bootstrap leader's private key is responsible for appending the first entries to the ledger. It initializes its internal state with the mint's account. That account will hold the number of native tokens defined by the genesis config. The second validator then contacts the bootstrap leader to register as a _validator_ or _archiver_. Additional validators then register with any registered member of the cluster.
A validator receives all entries from the leader and submits votes confirming those entries are valid. After voting, the validator is expected to store those entries until archiver nodes submit proofs that they have stored copies of it. Once the validator observes a sufficient number of copies exist, it deletes its copy.
@@ -38,4 +38,3 @@ Solana rotates leaders at fixed intervals, called _slots_. Each leader may only
Next, transactions are broken into batches so that a node can send transactions to multiple parties without making multiple copies. If, for example, the leader needed to send 60 transactions to 6 nodes, it would break that collection of 60 into batches of 10 transactions and send one to each node. This allows the leader to put 60 transactions on the wire, not 60 transactions for each node. Each node then shares its batch with its peers. Once the node has collected all 6 batches, it reconstructs the original set of 60 transactions.
A batch of transactions can only be split so many times before it is so small that header information becomes the primary consumer of network bandwidth. At the time of this writing, the approach is scaling well up to about 150 validators. To scale up to hundreds of thousands of validators, each node can apply the same technique as the leader node to another set of nodes of equal size. We call the technique _data plane fanout_; learn more in the [data plan fanout](https://github.com/solana-labs/solana/tree/aacead62c0eb052068172eba6b53fc85874d6d54/book/src/data-plane-fanout.md) section.

View File

@@ -40,7 +40,7 @@ After observing the cluster for a sufficient amount of time, the leader schedule
## Leader Schedule Generation at Genesis
The genesis block declares the first leader for the first epoch. This leader ends up scheduled for the first two epochs because the leader schedule is also generated at slot 0 for the next epoch. The length of the first two epochs can be specified in the genesis block as well. The minimum length of the first epochs must be greater than or equal to the maximum rollback depth as defined in [Tower BFT](../implemented-proposals/tower-bft.md).
The genesis config declares the first leader for the first epoch. This leader ends up scheduled for the first two epochs because the leader schedule is also generated at slot 0 for the next epoch. The length of the first two epochs can be specified in the genesis config as well. The minimum length of the first epochs must be greater than or equal to the maximum rollback depth as defined in [Tower BFT](../implemented-proposals/tower-bft.md).
## Leader Schedule Generation Algorithm
@@ -73,7 +73,7 @@ The seed that is selected is predictable but unbiasable. There is no grinding at
A leader can bias the active set by censoring validator votes. Two possible ways exist for leaders to censor the active set:
* Ignore votes from validators
* Ignore votes from validators
* Refuse to vote for blocks with votes from validators
To reduce the likelihood of censorship, the active set is calculated at the leader schedule offset boundary over an _active set sampling duration_. The active set sampling duration is long enough such that votes will have been collected by multiple leaders.
@@ -95,4 +95,3 @@ The lifetime of a leader schedule is called an _epoch_. The epoch is split into
A leader transmits entries during its slot. After `T` ticks, all the validators switch to the next scheduled leader. Validators must ignore entries sent outside a leader's assigned slot.
All `T` ticks must be observed by the next leader for it to build its own entries on. If entries are not observed \(leader is down\) or entries are invalid \(leader is buggy or malicious\), the next leader must produce ticks to fill the previous leader's slot. Note that the next leader should do repair requests in parallel, and postpone sending ticks until it is confident other validators also failed to observe the previous leader's entries. If a leader incorrectly builds on its own ticks, the leader following it must replace all its ticks.

View File

@@ -4,7 +4,7 @@ Transactions currently include a fee field that indicates the maximum fee field
## Congestion-driven fees
Each validator uses _signatures per slot_ \(SPS\) to estimate network congestion and _SPS target_ to estimate the desired processing capacity of the cluster. The validator learns the SPS target from the genesis block, whereas it calculates SPS from recently processed transactions. The genesis block also defines a target `lamports_per_signature`, which is the fee to charge per signature when the cluster is operating at _SPS target_.
Each validator uses _signatures per slot_ \(SPS\) to estimate network congestion and _SPS target_ to estimate the desired processing capacity of the cluster. The validator learns the SPS target from the genesis config, whereas it calculates SPS from recently processed transactions. The genesis config also defines a target `lamports_per_signature`, which is the fee to charge per signature when the cluster is operating at _SPS target_.
## Calculating fees
@@ -28,4 +28,3 @@ Future parameters might include:
### Hijacking the SPS Target
A group of validators can centralize the cluster if they can convince it to raise the SPS Target above a point where the rest of the validators can keep up. Raising the target will cause fees to drop, presumably creating more demand and therefore higher TPS. If the validator doesn't have hardware that can process that many transactions that fast, its confirmation votes will eventually get so long that the cluster will be forced to boot it.