forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cosmos#333 from cosmos/docs
README makeover
- Loading branch information
Showing
6 changed files
with
101 additions
and
65 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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## Design Goals | ||
|
||
More details about the design goals of particular components follows. | ||
|
||
### 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 | ||
|
||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
|
||
TODO: write a blog post ... | ||
|
||
# Inspiration | ||
|
||
The basic concept for this SDK comes from years of web development. A number of | ||
patterns have arisen in that realm of software which enable people to build remote | ||
servers with APIs remarkably quickly and with high stability. The | ||
[ABCI](https://github.com/tendermint/abci) application interface is similar to | ||
a web API (`DeliverTx` is like POST and `Query` is like GET while `SetOption` is like | ||
the admin playing with the config file). Here are some patterns that might be | ||
useful: | ||
|
||
* MVC - separate data model (storage) from business logic (controllers) | ||
* Routers - easily direct each request to the appropriate controller | ||
* Middleware - a series of wrappers that provide global functionality (like | ||
authentication) to all controllers | ||
* Modules (gems, package, etc) - developers can write a self-contained package | ||
with a given set of functionality, which can be imported and reused in other | ||
apps | ||
|
||
Also at play is the concept of different tables/schemas in databases, thus you can | ||
keep the different modules safely separated and avoid any accidental (or malicious) | ||
overwriting of data. | ||
|
||
Not all of these can be compare one-to-one in the blockchain world, but they do | ||
provide inspiration for building orthogonal pieces that can easily be combined | ||
into various applications. |
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