Commit Graph

73 Commits

Author SHA1 Message Date
Cuong Manh Le
4b11ac66c4
all: add benchmarks to core components (#493)
Fixes #480
2021-08-26 08:20:27 +00:00
Federico Kunze Küllmer
1ad9b4c1a5
evm: EIP1559 & go-ethereum related updates (#469)
* updates

* more changes

* proto updates

* tidy

* v1beta1

* update buf

* lint

* comments

* typo
2021-08-25 14:45:51 +00:00
Federico Kunze Küllmer
83c838330f
rpc: configure gas cap (#457)
* rpc: configure gas cap

* c++

* rm old const

* docs
2021-08-18 14:11:51 +00:00
Federico Kunze Küllmer
6f5f15fc6d
proto: v1alpha to v1 (#448)
* proto: v1alpha to v1

* c++

* go mod
2021-08-17 15:30:35 +00:00
Federico Kunze Küllmer
aa1b728d34
feat: update chain-id format (#447)
* feat: update chain-id format

* c++

* docs

* additional context'
2021-08-17 14:11:26 +00:00
Federico Kunze Küllmer
09746c6a51
feat: import ethermint without forking (#378)
* cmd: cleanup

* update gh action

* lint

* more cleanup

* update config

* register denom
2021-07-28 05:47:29 -04:00
Thomas Nguy
c8b88a3a8b
evm, rpc: fix parameters and block gas limit in getBlockByHeight and getBlockByHash (#312)
* fix evm set parameters

* recompute header hash only if its not set

* Update x/evm/keeper/state_transition.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-07-19 01:52:44 +00:00
Federico Kunze Küllmer
5f1f252361
evm: TxData as proto.Any (#220)
* evm: TxData as proto.Any

* proto message

* fix protobuf any generation

* Int pointer

* fix build and tests

* ante tests

* swagger

* cleanup

* c++
2021-07-05 16:39:08 +00:00
Federico Kunze Küllmer
86e30e8fa3
feat: use sdk.Int for TxData (#208)
* feat: use sdk.Int for TxData

* c++

* fix

* fix test

* fix rpc

* lint
2021-06-30 15:28:38 +00:00
Federico Kunze Küllmer
dcc9585595
all: bump SDK to v0.43.0-rc0 (#194)
* all: bump SDK to v0.43.0-rc0

* more updates

* keys

* accounting

* update account

* ante changes

* readonly

* readonly build

* minor changes from self review

* fixes

* evm debug

* custom config & rosetta

* fix
2021-06-29 13:02:21 -04:00
crypto-facs
1363a45e93
fix: remove zero address validation (#205)
* fix: remove zero address validation

* test: update test invalid Ethereum address

* test: fix ValidateBassic test for invalid To address input

* remove unnecesary comment

* fix: remove zero address validation

* test: update test invalid Ethereum address

* test: fix ValidateBassic test for invalid To address input

* remove unnecesary comment
2021-06-29 11:08:07 -04:00
Federico Kunze
459a290951
tests: add testutils for integration testing (#132)
* tests: add testutils for integration testing

* update util

* fix config

* more updates

* rand chain-id

* add rpc client integration test example

* makefile

* rename

* updates to makefile
2021-06-25 05:18:37 -04:00
Federico Kunze
6000ab2098
chore: un-fork from cosmos (#166)
* chore: un-fork from cosmos

* rm LoC
2021-06-22 06:49:18 -04:00
Federico Kunze
bb91d8d93d
ante, evm: fix panic when checking BlockGasMeter (#120)
* ante, evm: fix panic when checking BlockGasMeter

* update block gas limit function
2021-06-14 10:24:08 -04:00
Federico Kunze
9509e18842
encoding: fix test (#64) 2021-06-04 09:45:37 -04:00
Federico Kunze
b77aab43bb
evm: refactor state transition (#41)
* 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
2021-06-02 04:52:53 -04:00
Federico Kunze
ba5bf33f19
proto, evm: use string for address and hash protobuf message fields (#23)
* proto, evm: use string for address and hash protobuf message fields

* fix tests

* msg test
2021-05-14 02:52:18 -04:00
Federico Kunze
5a3d514ba0
conflicts 2021-04-17 12:00:07 +02:00
Helder Moreira
99112e1cbd
init: add random chain-id generator (#797)
* init: add random chain-id generator

* Update types/chain_id.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-02-26 15:50:22 +00:00
Federico Kunze
9cbb4dcf6d
stargate: migrate types (#670)
* changelog v0.4.0

* stargate: types changes

* msg and handler changes

* validation

* fixes

* more fixes

* more test fixes

* changelog

* changelog

* lint

* rm comment

* lint

* redundant if condition
2021-01-06 17:56:40 -03:00
Federico Kunze
ef1bef16e5
rpc: protocol version (#575)
* evm: protocol version

* changelog

* version

* fix

* support latest version only
2020-12-08 20:51:26 +01:00
Alessio Treglia
e4b9ea20d5
deps: update to cosmos-sdk v0.39.2-rc3 (#608)
* update to cosmos-sdk v0.39.2

* fix HD path test
2020-11-20 19:04:14 +01:00
Daniel Choi
0870a27018
crypto: fix Bip44 derivation path (#577)
* change derivationpath to geth's const

* fix lint

* change to var

* add hd path and derivation tests

* replace method

* add to tests

* fix test; pr to sdk

* Update types/config.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update types/config.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* add wrong path/acct test

* use BytesToAddress

* add to changelog

* update tests

* update changelog

* minor comment change

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-10-16 10:51:00 -03:00
Federico Kunze
4e01da905a
crypto: refactor for stargate (#559)
* changelog

* update changelog

* crypto: refactor for stargate

* fixes

* fix keys

* changelog
2020-10-06 20:57:55 +02:00
Federico Kunze
a924b20091
update chain-id format (#542)
* chain_id.go

* rpc changes

* update scripts

* additional test

* changelog

* fix tests

* update script

* rpc updates

* validate testnet command chain-id

* validate rest server chain-id

* fix lint

* rpc updates

* changelog

* comment simulations
2020-09-24 14:50:47 -03:00
Federico Kunze
44876ac72f
types: account balance fix (#507)
* fix hardcoded photon on account balance getter/setter

* types: testing suite

* balance test

* update zero diff

* add case for other coin

* changelog

* fix journal test
2020-09-09 10:53:14 -03:00
Federico Kunze
d6783707dc
types: unmarshal account from hex address (#504)
* types: unmarshal account from hex address:

* changelog
2020-09-08 12:58:19 -03:00
Federico Kunze
1505ba89a1
atto photon refactor (#503)
* atto photon refactor

* update testnet command

* fix test

* changelog
2020-09-08 11:39:48 -03:00
Federico Kunze
b485542b0b
types: support eth hex address on accounts (#502)
* types: support eth hex address on accounts

* changelog

* doc update

* add note for keyring output
2020-09-08 10:57:49 -03:00
Federico Kunze
d3529dd959
types: update account pubkey JSON to string (#494)
* types: update account pubkey JSON to string

* changelog

* Update app/ethermint.go

* tests

* update

* fix secp256k1 public key formatting (#501)

* use Compress and Decompress pubkey for secp256k1 keys

* cleanup

* update estimate gas test

* comments

Co-authored-by: noot <36753753+noot@users.noreply.github.com>
2020-09-07 10:04:50 -03:00
Justin Thompson
4344dc10c7
change photon to aphoton (#476)
* change photon to aphoton

* fix test

* photon docs

* update doc

Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-08-31 12:40:53 -04:00
Federico Kunze
8a3692e174
Fix BIP44 coin type (#480)
* fix docsearch

* update BIP44 coin type

* changelog

* set HD path
2020-08-28 11:35:10 -04:00
huanglins
b3c895d039
fix default account addr prefix (#472) 2020-08-25 08:16:31 -04:00
Federico Kunze
261f86fdf2
bump SDK to v0.39.1 (#386)
* bump sdk version to v0.39.0 candidate

* updates

* update evm

* bump commit

* more changes

* build

* genesis

* fix tests

* fix tests

* bump commit

* bump commit

* bump commit

* add keygen func

* bump version to 0.39.0-rc0

* update AnteHandler

* fix TxDecoder

* lint

* fix test

* update statedb

* changelog

* fixes

* remove extra files

* update make test-import

* rename test

* bump SDK version to final release

* update to 0.39.1-rc1

* fix evm tests

* update RPC

* minor fixes

* update to rc2

* bump to v0.39.1

* fix personal API

* fix string type cast ambiguity (#449)

* init

* fix estimate gas test

* minor genesis change

* remove comments from unstable commit (stargate release)

Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
2020-08-23 17:41:54 -04:00
Federico Kunze
5ff2b316cb
app: change bech32 prefix cosmos -> eth (#429) 2020-08-05 09:27:48 -04:00
Federico Kunze
90f39390bc
evm: fix non-determinism (#352)
* evm: fix non-determinism

* fixes

* typo

* fix tests

* use Storage slice

* more fixes

* lint

* merge development

* additional tests
2020-07-13 16:01:45 -04:00
Federico Kunze
c8b8f49675
run make format (#351)
* run make format

* fix yaml

* fixes
2020-07-02 11:19:48 -04:00
Federico Kunze
9d208e165b
bump error codes (#279) 2020-05-05 12:54:03 -04:00
Federico Kunze
4d609b2a22
bump Cosmos SDK version to v0.38.2 (#183)
* evm: move Keeper and Querier to /keeper package

* keeper: update keeper_test.go

* fix format

* evm: use aliased types

* bump SDK version to v0.38.1

* app: updates from new version

* errors: switch sdk.Error -> error

* errors: switch sdk.Error -> error. Continuation

* more fixes

* update app/

* update keys and client pkgs

* build

* fix tests

* lint

* minor changes

* changelog

* address @austinbell comments

* Fix keyring usage in rpc API and CLI

* fix keyring

* break line

* Misc cleanup (#188)

* evm: move Begin and EndBlock to abci.go

* evm: use expected keeper interfaces

* app: use EthermintApp for integration and unit test setup

* evm: remove count type; update codec

* go mod verify

* evm: rename msgs for consistency

* evm: events

* minor cleanup

* lint

* ante: update tests

* changelog

* nolint

* evm: update statedb to create ethermint Account instead of BaseAccount

* fix importer test

* address @austinabell comments

* update README

* changelog

* evm: update codec

* fix event sender

* store logs in keeper after transition (#210)

* add some comments

* begin log handler test

* update TransitionCSDB to return ReturnData

* use rlp for result data encode/decode

* update tests

* implement SetBlockLogs

* implement GetBlockLogs

* test log set/get

* update keeper get/set logs to use hash as key

* fix test

* move logsKey to csdb

* attempt to fix test

* attempt to fix test

* attempt to fix test

* lint

* lint

* lint

* save logs after handling msg

* update k.Logs

* cleanup

* remove unused

* fix issues

* comment out handler test

* address comments

* lint

* fix handler test

* address comments

* use amino

* lint

* address comments

* merge

* fix encoding bug

* minor fix

* rpc: error handling

* rpc: simulate only returns gasConsumed

* rpc: error ineffassign

* go: bump version to 1.14 and SDK version to latest master

* rpc: fix simulation return value

* breaking changes from SDK

* sdk: breaking changes; build

* tests: fixes

* minor fix

* proto: ethermint types attempt

* proto: define EthAccount proto type and extend sdk std.Codec

* evm: fix panic on handler test

* evm: minor state object changes

* cleanup

* tests: update test-importer

* fix pubkey registration

* lint

* cleanup

* more test checks for importer

* minor change

* codec fixes

* rm init func

* fix importer test build

* fix marshaling for TxDecoder

* use amino codec for evm

* fix marshaling for SimulationResponse

* use jsonpb for unmarshaling

* fix method handler crashed

* return err on VerifySig

* switch stateObject balance to sdk.Int

* fixes to codec and encoding

* cleanup

* set tmhash -> ethhash in state transition

* add tmhash->ethereumhash to csdb.GetLogs

* attempt to  fix tests

* update GetLogs to switch with Has

* ante panic

* diff changes

* update SetLogs

* evm/cli: use ethermint codec

* use LengthPrefixed for encoding

* add check for nil *big.Int

* add balance to UpdateAccounts

* fix previous balance

* fix balance bug

* prevent panic on make test-import

Co-authored-by: austinabell <austinabell8@gmail.com>
Co-authored-by: noot <36753753+noot@users.noreply.github.com>
Co-authored-by: noot <elizabethjbinks@gmail.com>
2020-04-22 15:26:01 -04:00
Federico Kunze
c30205cae9
error migration (#254)
* migrate errors

* ante handler errors

* return err instead of panic
2020-04-16 11:47:39 -04:00
Federico Kunze
87b625ed50
Tools configuration and linters (#215)
* tools config

* lint

* lint

* codecov
2020-03-16 19:53:24 -03:00
Austin Abell
ce8a94a98e
Cosmos PR changes (#158)
* 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
2019-12-13 14:50:19 -05:00
Austin Abell
9311f9efd0
Update keybase back to cosmos-sdk with support (#147)
* 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
2019-11-13 12:00:21 -05:00
Austin Abell
327abc4edf
Coin balance fix (#151)
* 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)
2019-11-12 16:07:34 -05:00
Austin Abell
97f73063a5
Updates SDK and implement application genaccounts (#143)
* 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
2019-11-04 15:45:02 -05:00
Dustin Brickwood
fc57cabcab
Linted Repo (#136)
* Linted
* Updated lint to include config file
* Linted repo
* Updated make command

* made requested changes

* added no lint
2019-11-01 10:26:53 -05:00
Austin Abell
2b4d2bea82 Implements eth_call (#127)
* Fixed tx receipt error on failed transaction

* Add returnData to failed transaction for logs bloom

* Added simulate call option, without returning evm data

* Added encoding and decoding of data from EVM execution for usability

* Remove unused context parameter

* Fix function comment and remove unnecessary logging on eth_call
2019-10-22 11:40:34 -05:00
Austin Abell
160e82b2ad
Implement eth_pendingTransactions, bump sdk version (#124)
* Update sdk version, implement pending txs, fix nonce check

* Bump cached dependencies in circleCI

* bump circleci go version

* updated linter and fixed bugs relating to go version 1.13
2019-10-19 08:23:09 +09:00
Austin Abell
69567e29d5
Override auth module codec for all references to Ethermint codec (#103) 2019-09-18 14:50:06 -04:00
Austin Abell
1b5c33cf33
EVM Transaction handler and contract creation (#96)
* 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
2019-09-18 09:51:18 -04:00