forked from cosmos/cosmos-sdk
-
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.
Update docs/design.md and docs/basics.md
- Loading branch information
Showing
2 changed files
with
40 additions
and
55 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 |
---|---|---|
@@ -1,62 +1,31 @@ | ||
## Design philosphy | ||
|
||
The design of the Cosmos SDK is based on the principles of "cababilities systems". | ||
|
||
TODO If you see this on the sdk2 branch, it's because I'm still expanding this high-level section. | ||
|
||
Sections: | ||
|
||
* Introduction | ||
- Note to skip to Basecoin example to dive into code. | ||
- Note to skip to Basecoin example to dive into code. | ||
* Capabilities systems | ||
- http://www.erights.org/elib/capability/ode/ode.pdf | ||
- Need for module isolation | ||
- Capability is implied permission | ||
- http://www.erights.org/elib/capability/ode/ode.pdf | ||
* Tx & Msg | ||
* MultiStore | ||
- MultiStore is like a filesystem | ||
- Mounting an IAVLStore | ||
* Context & Handler | ||
* AnteHandler | ||
- Fees | ||
- Authentication | ||
- Handling Fee payment | ||
- Handling Authentication | ||
* Accounts and x/auth | ||
* AccountStore | ||
- sdk.Account | ||
- auth.BaseAccount | ||
- auth.AccountMapper | ||
* Wire codec | ||
- vs encoding/json | ||
- vs protobuf | ||
- vs encoding/json | ||
- vs protobuf | ||
* Dummy example | ||
* Basecoin example | ||
* Conclusion | ||
|
||
## ###################################### | ||
## TODO bring the below up. | ||
|
||
### Store | ||
|
||
- Fast balanced dynamic Merkle tree for storing application state | ||
- Support multiple Merkle tree backends in a single store | ||
- allows using Ethereum Patricia Trie and Tendermint IAVL in same app | ||
- Support iteration | ||
- Provide caching for intermediate state during execution of blocks and transactions (including for iteration) | ||
- Retain some amount of recent historical state | ||
- Allow many kinds of proofs (exists, absent, range, etc.) on current and retained historical state | ||
|
||
### ABCI Application | ||
|
||
- Simple connector between developer's application logic and the ABCI protocol | ||
- Simplify discrepancy between DeliverTx and CheckTx | ||
- Handles ABCI handshake logic and historical state | ||
- Provide simple hooks to BeginBlock and EndBlock | ||
|
||
### Transaction Processing | ||
|
||
- Transactions consist of composeable messages | ||
- Processing via series of handlers that handle authenticate, deduct fees, transfer coins, etc. | ||
- Developers control tx encoding | ||
- Default go-wire | ||
- Must be able to write eg. Ethermint using the SDK with Ethereum-native transaction encoding | ||
- Handler access to the store is restricted via capabilities and interfaces | ||
- Context object holds | ||
|
||
### Data Types | ||
|
||
- Default Ethereum-style Account | ||
- Default multi-asset Coins | ||
|