docs: first update (#188)

* docs: update

* update +

* txs

* update docs

* more docs

* spec update

* doc fixes
This commit is contained in:
Federico Kunze Küllmer
2021-08-03 17:35:31 +00:00
committed by GitHub
parent 2bd107ee79
commit f7bcc8d12e
28 changed files with 402 additions and 631 deletions
-8
View File
@@ -15,14 +15,6 @@ The `StateDB` interface from geth represents an EVM database for full state quer
contracts and accounts. The concrete type that fulfills this interface on Ethermint is the
`CommitStateDB`.
## State Object
A `stateObject` represents an Ethereum account which is being modified.
The usage pattern is as follows:
* First you need to obtain a state object.
* Account values can be accessed and modified through the object.
## Genesis State
The `x/evm` module `GenesisState` defines the state necessary for initializing the chain from a previous exported height.
-26
View File
@@ -53,29 +53,3 @@ The functionalities provided by the Ethermint `StateDB` are:
* Auxiliary functions
* Copy state
* Reset state
## State Objects
State objects are used by the VM which is unable to deal with database-level errors. Any error that occurs during a database read is memoized here and will eventually be returned by `StateDB.Commit`.
The Ethermint `stateObject` is a concrete type that mimics the functionality from the `go-ethereum`
private `stateObject` type. It keeps track of the interim values for the contract bytecode, storage
state and balance of an `EthAccount`.
The storage entries (original and "dirty") for each state object are represented as slices instead
of maps since latter can cause non-deterministic block app hashes, which result in the chain
halting.
When a `stateObject` is committed during `EndBlock`. It sets sets the account contract code to store, as well as the dirty storage state. The account's nonce and the account balance are updated by calling the `auth` and `bank` module setter functions, respectively.
+++ https://github.com/tharsis/ethermint/blob/v0.3.1/x/evm/types/state_object.go#L49-L81
The functionalities provided by the Ethermint `stateObject` are:
* Storage state getter and setter (temporary)
* Contract bytecode getter and setter (temporary)
* Balance getter and setter (temporary)
* Balance accounting (temporary)
* Account nonce and address getter and setter (temporary)
* Auxiliary functions: copy, RLP encoding, empty
* Commit state object (final)
+10 -7
View File
@@ -11,10 +11,13 @@ interface).
## MsgEthereumTx
| Type | Attribute Key | Attribute Value |
|----------|---------------|-----------------|
| ethereum | `"amount"` | `{amount}` |
| ethereum | `"recipient"` | `{eth_address}` |
| message | `"sender"` | `{eth_address}` |
| message | `"action"` | `"ethereum"` |
| message | `"module"` | `"evm"` |
| Type | Attribute Key | Attribute Value |
|-------------|--------------------|-------------------------|
| ethereum_tx | `"amount"` | `{amount}` |
| ethereum_tx | `"recipient"` | `{hex_address}` |
| ethereum_tx | `"contract"` | `{hex_address}` |
| ethereum_tx | `"txHash"` | `{tendermint_hex_hash}` |
| ethereum_tx | `"ethereumTxHash"` | `{hex_hash}` |
| message | `"sender"` | `{eth_address}` |
| message | `"action"` | `"ethereum"` |
| message | `"module"` | `"evm"` |