Skip to content

Commit

Permalink
update docs to latest from main (#51)
Browse files Browse the repository at this point in the history
* update docs to latest from main

* final

* fix build errors
  • Loading branch information
tac0turtle authored Sep 26, 2023
1 parent 89ce52e commit b10dff5
Show file tree
Hide file tree
Showing 227 changed files with 4,223 additions and 1,862 deletions.
2 changes: 1 addition & 1 deletion docs/build/architecture/PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
1. Copy the `adr-template.md` file. Use the following filename pattern: `adr-next_number-title.md`
2. Create a draft Pull Request if you want to get an early feedback.
3. Make sure the context and a solution is clear and well documented.
4. Add an entry to a list in the [README](README.md) file.
4. Add an entry to a list in the [README](./README.md) file.
5. Create a Pull Request to propose a new ADR.

## What is an ADR?
Expand Down
90 changes: 46 additions & 44 deletions docs/build/architecture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If recorded decisions turned out to be lacking, convene a discussion, record the

## Creating new ADR

Read about the [PROCESS](PROCESS.md).
Read about the [PROCESS](./PROCESS.md).

### Use RFC 2119 Keywords

Expand All @@ -42,53 +42,55 @@ When writing ADRs, follow the same best practices for writing RFCs. When writing

### Accepted

* [ADR 002: SDK Documentation Structure](adr-002-docs-structure.md)
* [ADR 004: Split Denomination Keys](adr-004-split-denomination-keys.md)
* [ADR 006: Secret Store Replacement](adr-006-secret-store-replacement.md)
* [ADR 009: Evidence Module](adr-009-evidence-module.md)
* [ADR 010: Modular AnteHandler](adr-010-modular-antehandler.md)
* [ADR 019: Protocol Buffer State Encoding](adr-019-protobuf-state-encoding.md)
* [ADR 020: Protocol Buffer Transaction Encoding](adr-020-protobuf-transaction-encoding.md)
* [ADR 021: Protocol Buffer Query Encoding](adr-021-protobuf-query-encoding.md)
* [ADR 023: Protocol Buffer Naming and Versioning](adr-023-protobuf-naming.md)
* [ADR 029: Fee Grant Module](adr-029-fee-grant-module.md)
* [ADR 030: Message Authorization Module](adr-030-authz-module.md)
* [ADR 031: Protobuf Msg Services](adr-031-msg-service.md)
* [ADR 055: ORM](adr-055-orm.md)
* [ADR 058: Auto-Generated CLI](adr-058-auto-generated-cli.md)
* [ADR 002: SDK Documentation Structure](./adr-002-docs-structure.md)
* [ADR 004: Split Denomination Keys](./adr-004-split-denomination-keys.md)
* [ADR 006: Secret Store Replacement](./adr-006-secret-store-replacement.md)
* [ADR 009: Evidence Module](./adr-009-evidence-module.md)
* [ADR 010: Modular AnteHandler](./adr-010-modular-antehandler.md)
* [ADR 019: Protocol Buffer State Encoding](./adr-019-protobuf-state-encoding.md)
* [ADR 020: Protocol Buffer Transaction Encoding](./adr-020-protobuf-transaction-encoding.md)
* [ADR 021: Protocol Buffer Query Encoding](./adr-021-protobuf-query-encoding.md)
* [ADR 023: Protocol Buffer Naming and Versioning](./adr-023-protobuf-naming.md)
* [ADR 024: Coin Metadata](./adr-024-coin-metadata.md)
* [ADR 029: Fee Grant Module](./adr-029-fee-grant-module.md)
* [ADR 030: Message Authorization Module](./adr-030-authz-module.md)
* [ADR 031: Protobuf Msg Services](./adr-031-msg-service.md)
* [ADR 046: Module Params](./adr-046-module-params.md)
* [ADR 055: ORM](./adr-055-orm.md)
* [ADR 058: Auto-Generated CLI](./adr-058-auto-generated-cli.md)
* [ADR 060: ABCI 1.0 (Phase I)](adr-060-abci-1.0.md)
* [ADR 061: Liquid Staking](adr-061-liquid-staking.md)
* [ADR 061: Liquid Staking](./adr-061-liquid-staking.md)

### Proposed

* [ADR 003: Dynamic Capability Store](adr-003-dynamic-capability-store.md)
* [ADR 011: Generalize Genesis Accounts](adr-011-generalize-genesis-accounts.md)
* [ADR 012: State Accessors](adr-012-state-accessors.md)
* [ADR 013: Metrics](adr-013-metrics.md)
* [ADR 016: Validator Consensus Key Rotation](adr-016-validator-consensus-key-rotation.md)
* [ADR 017: Historical Header Module](adr-017-historical-header-module.md)
* [ADR 018: Extendable Voting Periods](adr-018-extendable-voting-period.md)
* [ADR 022: Custom baseapp panic handling](adr-022-custom-panic-handling.md)
* [ADR 024: Coin Metadata](adr-024-coin-metadata.md)
* [ADR 027: Deterministic Protobuf Serialization](adr-027-deterministic-protobuf-serialization.md)
* [ADR 028: Public Key Addresses](adr-028-public-key-addresses.md)
* [ADR 032: Typed Events](adr-032-typed-events.md)
* [ADR 033: Inter-module RPC](adr-033-protobuf-inter-module-comm.md)
* [ADR 035: Rosetta API Support](adr-035-rosetta-api-support.md)
* [ADR 037: Governance Split Votes](adr-037-gov-split-vote.md)
* [ADR 038: State Listening](adr-038-state-listening.md)
* [ADR 039: Epoched Staking](adr-039-epoched-staking.md)
* [ADR 040: Storage and SMT State Commitments](adr-040-storage-and-smt-state-commitments.md)
* [ADR 046: Module Params](adr-046-module-params.md)
* [ADR 054: Semver Compatible SDK Modules](adr-054-semver-compatible-modules.md)
* [ADR 057: App Wiring](adr-057-app-wiring.md)
* [ADR 059: Test Scopes](adr-059-test-scopes.md)
* [ADR 062: Collections State Layer](adr-062-collections-state-layer.md)
* [ADR 063: Core Module API](adr-063-core-module-api.md)
* [ADR 065: Store V2](adr-065-store-v2.md)
* [ADR 003: Dynamic Capability Store](./adr-003-dynamic-capability-store.md)
* [ADR 011: Generalize Genesis Accounts](./adr-011-generalize-genesis-accounts.md)
* [ADR 012: State Accessors](./adr-012-state-accessors.md)
* [ADR 013: Metrics](./adr-013-metrics.md)
* [ADR 016: Validator Consensus Key Rotation](./adr-016-validator-consensus-key-rotation.md)
* [ADR 017: Historical Header Module](./adr-017-historical-header-module.md)
* [ADR 018: Extendable Voting Periods](./adr-018-extendable-voting-period.md)
* [ADR 022: Custom baseapp panic handling](./adr-022-custom-panic-handling.md)
* [ADR 027: Deterministic Protobuf Serialization](./adr-027-deterministic-protobuf-serialization.md)
* [ADR 028: Public Key Addresses](./adr-028-public-key-addresses.md)
* [ADR 032: Typed Events](./adr-032-typed-events.md)
* [ADR 033: Inter-module RPC](./adr-033-protobuf-inter-module-comm.md)
* [ADR 035: Rosetta API Support](./adr-035-rosetta-api-support.md)
* [ADR 037: Governance Split Votes](./adr-037-gov-split-vote.md)
* [ADR 038: State Listening](./adr-038-state-listening.md)
* [ADR 039: Epoched Staking](./adr-039-epoched-staking.md)
* [ADR 040: Storage and SMT State Commitments](./adr-040-storage-and-smt-state-commitments.md)
* [ADR 054: Semver Compatible SDK Modules](./adr-054-semver-compatible-modules.md)
* [ADR 057: App Wiring](./adr-057-app-wiring.md)
* [ADR 059: Test Scopes](./adr-059-test-scopes.md)
* [ADR 062: Collections State Layer](./adr-062-collections-state-layer.md)
* [ADR 063: Core Module API](./adr-063-core-module-api.md)
* [ADR 065: Store v2](./adr-065-store-v2.md)
* [ADR 067: Simulator v2](./adr-067-simulator-v2.md)

### Draft

* [ADR 044: Guidelines for Updating Protobuf Definitions](adr-044-protobuf-updates-guidelines.md)
* [ADR 047: Extend Upgrade Plan](adr-047-extend-upgrade-plan.md)
* [ADR 053: Go Module Refactoring](adr-053-go-module-refactoring.md)
* [ADR 044: Guidelines for Updating Protobuf Definitions](./adr-044-protobuf-updates-guidelines.md)
* [ADR 047: Extend Upgrade Plan](./adr-047-extend-upgrade-plan.md)
* [ADR 053: Go Module Refactoring](./adr-053-go-module-refactoring.md)
* [ADR 068: Preblock](./adr-068-preblock.md)
2 changes: 1 addition & 1 deletion docs/build/architecture/_category_.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "ADRs",
"position": 11,
"position": 6,
"link": null
}
2 changes: 1 addition & 1 deletion docs/build/architecture/adr-007-specialization-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ type SpecializationGroup interface {

## References

* [dCERT ADR](adr-008-dCERT-group.md)
* [dCERT ADR](./adr-008-dCERT-group.md)
4 changes: 2 additions & 2 deletions docs/build/architecture/adr-008-dCERT-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ vulnerability being patched on the live network.
## Decision

The dCERT group is proposed to include an implementation of a `SpecializationGroup`
as defined in [ADR 007](adr-007-specialization-groups.md). This will include the
as defined in [ADR 007](./adr-007-specialization-groups.md). This will include the
implementation of:

* continuous voting
Expand Down Expand Up @@ -168,4 +168,4 @@ they should all be severely slashed.

## References

[Specialization Groups ADR](adr-007-specialization-groups.md)
[Specialization Groups ADR](./adr-007-specialization-groups.md)
4 changes: 2 additions & 2 deletions docs/build/architecture/adr-009-evidence-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ evidence can be submitted, evaluated and verified resulting in some agreed upon
penalty for any misbehavior committed by a validator, such as equivocation (double-voting),
signing when unbonded, signing an incorrect state transition (in the future), etc.
Furthermore, such a mechanism is paramount for any
[IBC](https://github.com/cosmos/ics/blob/master/ibc/2_IBC_ARCHITECTURE.md) or
[IBC](https://github.com/cosmos/ibc) or
cross-chain validation protocol implementation in order to support the ability
for any misbehavior to be relayed back from a collateralized chain to a primary
chain so that the equivocating validator(s) can be slashed.
Expand Down Expand Up @@ -178,5 +178,5 @@ type GenesisState struct {
## References

* [ICS](https://github.com/cosmos/ics)
* [IBC Architecture](https://github.com/cosmos/ics/blob/master/ibc/1_IBC_ARCHITECTURE.md)
* [IBC Architecture](https://github.com/cosmos/ibc/blob/main/spec/ics-001-ics-standard/README.md)
* [Tendermint Fork Accountability](https://github.com/tendermint/spec/blob/7b3138e69490f410768d9b1ffc7a17abc23ea397/spec/consensus/fork-accountability.md)
2 changes: 1 addition & 1 deletion docs/build/architecture/adr-013-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ and is rich with ecosystem tooling.

We must also aim to integrate metrics into the Cosmos SDK in the most seamless way possible such that
metrics may be added or removed at will and without much friction. To do this, we will use the
[go-metrics](https://github.com/armon/go-metrics) library.
[go-metrics](https://github.com/hashicorp/go-metrics) library.

Finally, operators may enable telemetry along with specific configuration options. If enabled, metrics
will be exposed via `/metrics?format={text|prometheus}` via the API server.
Expand Down
8 changes: 5 additions & 3 deletions docs/build/architecture/adr-017-historical-header-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* 26 November 2019: Start of first version
* 2 December 2019: Final draft of first version
* 7 September 2023: Reduce HistoricalInfo type

## Context

Expand All @@ -16,10 +17,11 @@ The application MUST store the most recent `n` headers in a persistent store. At
The application MUST store this information by storing new headers immediately when handling `abci.RequestBeginBlock`:

```go
func BeginBlock(ctx sdk.Context, keeper HistoricalHeaderKeeper, req abci.RequestBeginBlock) abci.ResponseBeginBlock {
func BeginBlock(ctx sdk.Context, keeper HistoricalHeaderKeeper) error {
info := HistoricalInfo{
Header: ctx.BlockHeader(),
ValSet: keeper.StakingKeeper.GetAllValidators(ctx), // note that this must be stored in a canonical order
apphash: ctx.HeaderInfo().AppHash,
Time: ctx.HeaderInfo().Time,
NextValidatorsHash: ctx.CometInfo().NextValidatorsHash,
}
keeper.SetHistoricalInfo(ctx, ctx.BlockHeight(), info)
n := keeper.GetParamRecentHeadersToStore()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Accepted
## Context

This ADR is a continuation of the motivation, design, and context established in
[ADR 019](adr-019-protobuf-state-encoding.md), namely, we aim to design the
[ADR 019](./adr-019-protobuf-state-encoding.md), namely, we aim to design the
Protocol Buffer migration path for the client-side of the Cosmos SDK.

Specifically, the client-side migration path primarily includes tx generation and
Expand Down Expand Up @@ -205,7 +205,7 @@ message SignDoc {
In order to sign in the default mode, clients take the following steps:

1. Serialize `TxBody` and `AuthInfo` using any valid protobuf implementation.
2. Create a `SignDoc` and serialize it using [ADR 027](adr-027-deterministic-protobuf-serialization.md).
2. Create a `SignDoc` and serialize it using [ADR 027](./adr-027-deterministic-protobuf-serialization.md).
3. Sign the encoded `SignDoc` bytes.
4. Build a `TxRaw` and serialize it for broadcasting.

Expand All @@ -221,7 +221,7 @@ Signature verifiers do:
3. For each required signer:
* Pull account number and sequence from the state.
* Obtain the public key either from state or `AuthInfo`'s `signer_infos`.
* Create a `SignDoc` and serialize it using [ADR 027](adr-027-deterministic-protobuf-serialization.md).
* Create a `SignDoc` and serialize it using [ADR 027](./adr-027-deterministic-protobuf-serialization.md).
* Verify the signature at the same list position against the serialized `SignDoc`.

#### `SIGN_MODE_LEGACY_AMINO`
Expand Down Expand Up @@ -312,7 +312,7 @@ enforce this.

Currently, the REST and CLI handlers encode and decode types and txs via Amino
JSON encoding using a concrete Amino codec. Being that some of the types dealt with
in the client can be interfaces, similar to how we described in [ADR 019](adr-019-protobuf-state-encoding.md),
in the client can be interfaces, similar to how we described in [ADR 019](./adr-019-protobuf-state-encoding.md),
the client logic will now need to take a codec interface that knows not only how
to handle all the types, but also knows how to generate transactions, signatures,
and messages.
Expand Down
6 changes: 3 additions & 3 deletions docs/build/architecture/adr-021-protobuf-query-encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Accepted
## Context

This ADR is a continuation of the motivation, design, and context established in
[ADR 019](adr-019-protobuf-state-encoding.md) and
[ADR 020](adr-020-protobuf-transaction-encoding.md), namely, we aim to design the
[ADR 019](./adr-019-protobuf-state-encoding.md) and
[ADR 020](./adr-020-protobuf-transaction-encoding.md), namely, we aim to design the
Protocol Buffer migration path for the client-side of the Cosmos SDK.

This ADR continues from [ADD 020](adr-020-protobuf-transaction-encoding.md)
This ADR continues from [ADD 020](./adr-020-protobuf-transaction-encoding.md)
to specify the encoding of queries.

## Decision
Expand Down
2 changes: 1 addition & 1 deletion docs/build/architecture/adr-022-custom-panic-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ We propose middleware-solution, which could help developers implement the follow
* call panic for specific error cases;

It will also make `OutOfGas` case and `default` case one of the middlewares.
`Default` case wraps recovery object to an error and logs it ([example middleware implementation](#recovery-middleware)).
`Default` case wraps recovery object to an error and logs it ([example middleware implementation](#Recovery-middleware)).

Our project has a sidecar service running alongside the blockchain node (smart contracts virtual machine). It is
essential that node <-> sidecar connectivity stays stable for TXs processing. So when the communication breaks we need
Expand Down
2 changes: 1 addition & 1 deletion docs/build/architecture/adr-024-coin-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Status

Proposed
ACCEPTED

## Context

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ other cases as well.

For signature verification in Cosmos SDK, the signer and verifier need to agree on
the same serialization of a `SignDoc` as defined in
[ADR-020](adr-020-protobuf-transaction-encoding.md) without transmitting the
[ADR-020](./adr-020-protobuf-transaction-encoding.md) without transmitting the
serialization.

Currently, for block signatures we are using a workaround: we create a new [TxRaw](https://github.com/cosmos/cosmos-sdk/blob/9e85e81e0e8140067dd893421290c191529c148c/proto/cosmos/tx/v1beta1/tx.proto#L30)
Expand Down
2 changes: 1 addition & 1 deletion docs/build/architecture/adr-030-authz-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The concrete use cases which motivated this module include:
delegated stake
* "sub-keys" functionality, as originally proposed in [\#4480](https://github.com/cosmos/cosmos-sdk/issues/4480) which
is a term used to describe the functionality provided by this module together with
the `fee_grant` module from [ADR 029](adr-029-fee-grant-module.md) and the [group module](https://github.com/cosmos/cosmos-sdk/tree/main/x/group).
the `fee_grant` module from [ADR 029](./adr-029-fee-grant-module.md) and the [group module](https://github.com/cosmos/cosmos-sdk/tree/main/x/group).

The "sub-keys" functionality roughly refers to the ability for one account to grant some subset of its capabilities to
other accounts with possibly less robust, but easier to use security measures. For instance, a master account representing
Expand Down
10 changes: 5 additions & 5 deletions docs/build/architecture/adr-031-msg-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ One consequence of this convention is that each `Msg` type can be the request pa

### Encoding

Encoding of transactions generated with `Msg` services do not differ from current Protobuf transaction encoding as defined in [ADR-020](adr-020-protobuf-transaction-encoding.md). We are encoding `Msg` types (which are exactly `Msg` service methods' request parameters) as `Any` in `Tx`s which involves packing the
Encoding of transactions generated with `Msg` services do not differ from current Protobuf transaction encoding as defined in [ADR-020](./adr-020-protobuf-transaction-encoding.md). We are encoding `Msg` types (which are exactly `Msg` service methods' request parameters) as `Any` in `Tx`s which involves packing the
binary-encoded `Msg` with its type URL.

### Decoding

Since `Msg` types are packed into `Any`, decoding transactions messages are done by unpacking `Any`s into `Msg` types. For more information, please refer to [ADR-020](adr-020-protobuf-transaction-encoding.md#transactions).
Since `Msg` types are packed into `Any`, decoding transactions messages are done by unpacking `Any`s into `Msg` types. For more information, please refer to [ADR-020](./adr-020-protobuf-transaction-encoding.md#transactions).

### Routing

Expand All @@ -122,7 +122,7 @@ For backward compatability, the old handlers are not removed yet. If BaseApp rec

### Module Configuration

In [ADR 021](adr-021-protobuf-query-encoding.md), we introduced a method `RegisterQueryService`
In [ADR 021](./adr-021-protobuf-query-encoding.md), we introduced a method `RegisterQueryService`
to `AppModule` which allows for modules to register gRPC queriers.

To register `Msg` services, we attempt a more extensible approach by converting `RegisterQueryService`
Expand Down Expand Up @@ -198,5 +198,5 @@ Finally, closing a module to client API opens desirable OCAP patterns discussed
* [Initial Github Issue \#7122](https://github.com/cosmos/cosmos-sdk/issues/7122)
* [proto 3 Language Guide: Defining Services](https://developers.google.com/protocol-buffers/docs/proto3#services)
* [Initial pre-`Any` `Msg` designs](https://docs.google.com/document/d/1eEgYgvgZqLE45vETjhwIw4VOqK-5hwQtZtjVbiXnIGc)
* [ADR 020](adr-020-protobuf-transaction-encoding.md)
* [ADR 021](adr-021-protobuf-query-encoding.md)
* [ADR 020](./adr-020-protobuf-transaction-encoding.md)
* [ADR 021](./adr-021-protobuf-query-encoding.md)
Loading

0 comments on commit b10dff5

Please sign in to comment.