* clean up logic by ignoring cosmos gas meter
* set gas used in txResponse
* reset and set the gas in context
* rename ante handler
* fix refundedgas logic
* remove gas update logic in keeper
* update context in keeper
* add test for EthSetupContextDecorator
* fix broken test due to gas logic change
* fix `AddLog` unmarshaling tx
Closes#187
* use cosmos tx in AddLog unit test
* Apply suggestions from code review
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* ante: check that sender is a EOA
* fix: GetCodeSize handles nil case and comments
* docs: add TODO comment
* fix: use EmptyCodeHash check
* lint: evmtypes instead of types
* lint: fix suite error
* test: set code to act not as EOA
* undo comment on GetCodeSize
* keeper: fix input checks
* Apply suggestions from code review
Co-authored-by: Akash Khosla <me@akashkhosla.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* evm: keeper statedb refactor
* keeper: implement stateDB account, balance, nonce and suicide functions
* keeper: implement stateDB code and iterator functions
* keeper: implement stateDB log and preimage functions
* update code to use CommitStateDB
* tests updates
* journal changes (wip)
* cache fields
* journal and logs
* minor cleanup
* evm: state transition refactor
* evm: unpack revert errors
* evm: update state transition (wip)
* evm: remove journal related changes
* evm: delete empty account code and storage state
* update gas limit
* evm: header hash to/from context
* evm: minor params and state transition changes
* ante: state transition changes
* ante: refactor default sig gas consumer
* ante: ignore gas costs from ops other than intrinsic gas
* ante: CanTransferDecorator
* evm: refund gas
* update comments
* state transition comments
* ante: CanTransfer and AccessList decorator tests
* evm: cleanup state transition
* ignore nonce increment during ante handler on contract creation
* fix ante tests
* more test fixes
* ante: cherry-pick changes from state transition refactor
* ante: test setup
* ante: fixes
* ante: test (wip)
* ante: finish unit tests
* ante: intrinsic gas test
* ante: chaindecorators test (wip)
* update tests
* ante: cleanup tests
* ante: add test consuption test
* remove the operation code that makes gas meter into zero
* just delete the code
Co-authored-by: Daniel Choi <13338103+araskachoi@users.noreply.github.com>
* fix panic when start a node with snapshot
* change the return value of evm.NewKeeper to a pointer, roll back the before change
* add changelog
* fix importer test
* add test for sending tx w/ 21000 gas
* improve rpc transfer test
* use ctx in EndBlock
* UpdateAccounts and ClearStateObjects with passed in context
* log ethereum address on error
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
* Changes necessary for enforced custom account encoding/decoding and keyring keybase changes
* updates cosmos dependency and fixes inconsistency in gas usage for simulated/real txs
* Update PR changes
* Remove unused password prompt when using OS keyring
* Update from changes to sdk
* Update to merged PR commit :the_horns:
* updated code to handle keyring backend options
* update documentation and replace cosmos-sdk with fork (temporarily)
* update cosmos dependency from fork
* update documentation
* Basic transactions set up (to be separated)
* Change transaction command to not include create operation (to include other command in next commit)
* set up create command and made minor changes
* wip implements module queries
* Added tests for query address decoding
* Added ambiguous encoding of to address in transaction and added tests
* Fix linting issue
* Move registering key types to application level to allow module usage to ignore
* Move genaccounts code to be reused
* Switches nonce increase to always happen in ante handler
* change SetNonce from keeper to point to actual nonce operation
* Remove no op nonce switch (not needed with clearing cache)
* Changes to update all accounts pre state transition and clear cache at end of block
* Update accounts before end of block commit (edge case where necessary)
* Fix nonce of sender going into evm in case it's checked, and let evm set contract starting nonce
* Migrate keybase back to Cosmos-sdk using temporary fork
* Cleaned up other affected code
* Change to updated tendermint
* fmt
* Change auth codec update
* clean up codec registration to respective packages
* Fix import fmt
* Remove no longer necessary replace
* Fix function comment
* Fix setting account balances from assuming single denom
* Set order for end blocker to not override account balances
* Panic instead of ignoring error (case should never be hit)
* Transition to updated sdk with modular ante handler and new genaccounts setup
* Update genesis account type to be an Ethermint account
* Change default keybase and tidy modules
* Fix lint
* Draft eth_estimateGas
* implemented eth_estimateGas
* refactored doCall to be used for both eth_call and eth_estiamteGas
* updated to reflect requested changes
* moved GenerateFromArgs func
* removed todo
* revert comment
* fixes dereference issue
* gofmted
* Set up gas consumption based on gas limit
* Convert evm gas meter to be infinite since being ignored
* Remove unnecessary declaration
* Update fees paid to validators to be function of gas limit and price instead of just gas
* added nonce check for node tx execution
* Increment account nonce after mempool check
* Remove unnecessary nonce increment
* Set up block hash to height mapping storage and fixed linting issues
* fix typos
* Set up module query for block height
* fix bug with block mappings and implemented get block by hash
* Fix other consensus hash references
* WIP implementing state transition function
* Error handling and application setup fix
* Fixed error comment
* Allow creation of state objects with a BaseAccount
* Fixed parameters and finalise state after transaction
* updated transaction signing and cli signature
* Set up consistent account encoding and decoding
* Update txbuilder to get sequence before generating eth tx
* Added create functionality to the CLI command
* Remove need to copy over context for statedb interactions
* Updated account retriever
* Cleaned up handler code and updated TODO
* Make recoverEthSig private again
* Add error check for committing to kv store
* Remove commented out code
* Update evm chain config for state transition
* Add time in context for dapps
* WIP setting up evm tx command and updating emint keys output
* Fix linting issue
* Wip restructuring to allow for ethereum signing and encoding
* WIP setting up keybase and context to use Ethermint keys
* Fixed encoding and decoding of emint keys
* Adds command for generating explicit ethereum tx
* Fixed evm route for handling tx
* Fixed tx and msg encoding which allows transactions to be sent
* Added relevant documentation for changes and cleaned up code
* Added documentation and indicators why code was overriden
* Update CosmosSDK version to 0.36 LTR
* Added basic EthermintApp run/export test
* Go mod tidy from dependency update
* Update export comments
* Remove confusing comment
* WIP setting up Ethereum key CLI commands
* Functional key gen and showing Ethereum address
* Cleaned up changes
* WIP setting up Ethereum key CLI commands
* Functional key gen and showing Ethereum address
* Cleaned up changes
* Changed address to cosmos specific address
* Remove default bech32 prefixes and add basic add command test
* Changed Private key type to slice of bytes for compatibility and storability
* switch back to using cosmos crypto Keybase interfaces
* Changed key output to ethereum addressing instead of bitcoin and key generation to allow seeding from mnemonic and bip39 password
* Updated show command and added test
* Remove prefix requirement for showing keys and added existing keys commands to CLI temporarily
* Removed unnecessary duplicate code
* Readd prefixes for accounts temporarily
* Fix linting issue
* Remove TODO for setting PK to specific length of bytes (all functions use slice)
* Cleaned up descriptions to remove multi-sigs
- Adds ethermint query command (`emintcli query ethermint <query>`)
- Supports block number, storage, code, balance lookups
- Implements RPC API methods `eth_blockNumber`, `eth_getStorageAt`, `eth_getBalance`, and `eth_getCode`
- Adds tester utility for RPC calls
- Adheres to go test format, but should not be run with regular suite
- Requires daemon and RPC server to be running
- Excluded from `make test`, available with `make test-rpc`
- Implemented AppModule interface and added EVM module to app
- Required for routing
- Implements `InitGenesis` (`x/evm/genesis.go`) and stubs `ExportGenesis`
- Modifies GenesisAccount to match expected format
- Implements Keeper. This is a wrapper around the "real" keeper (CSDB). Since we need to pass the context into the keeper we need to abstract the CSDB from the
- Adds WithContext() to CSDB to support the above requirement
- Adds Keeper to app
* syncing with updated ethereum version with local versions
* Revert updates back to go-ethereum v1.8.27
* Fixed chain-test change from undoing recent go-ethereum changes
* Fixes linting issues
* Remove unused interface implementations
* Updates cosmos-sdk version from relative dependency and updates auxiliary changes
* Upgrading ethereum version back to most recent since 1.9 release <:)
* syncing with updated ethereum version with local versions
* Revert updates back to go-ethereum v1.8.27
* Fixed chain-test change from undoing recent go-ethereum changes
* Fixes linting issues
* Remove unused interface implementations
* Updates cosmos-sdk version from relative dependency and updates auxiliary changes
* Upgrading ethereum version back to most recent since 1.9 release <:)
* Added documentation for cloned functions
* Wip converting to updated Cosmos SDK version
* Fixed test failures from updating SDK
* cleaned and verified changes
* Wip converting to updated Cosmos SDK version
* Fixed test failures from updating SDK
* cleaned and verified changes
* wip - updating to version 0.36.0
* Switched supply keeper to dummy for testing
* Formatting fixes
* Changed relative dependency of cosmos SDK to specific commit
* Fixed circleci config and fixed linting warnings
* Updated circleCI for go version 1.12 and split jobs for build/testing
* updated go version to 1.12.5 for circleCI
* Go mod tidy dependencies
* Updated linting tools and cleared up code lint smells
* Added workflow to run build and test jobs
* Moved linting command to build workflow
* Get dependencies before linting by default
* Added go module flag to linter and increased deadline to pull packages