Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
fedekunze committed May 2, 2022
1 parent 0c6f2fe commit 28e051b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
* Move `rpc/ethereum/backend` -> `rpc/backend`
* Move `rpc/ethereum/namespaces` -> `rpc/namespaces/ethereum`

### Improvements

* (ci, evm) [tharsis#1063](https://github.com/tharsis/ethermint/pull/1063) Run simulations on CI.

### Bug Fixes

* (rpc) [tharsis#1059](https://github.com/tharsis/ethermint/pull/1059) Remove unnecessary event filtering logic on the `eth_baseFee` JSON-RPC endpoint.
Expand All @@ -65,7 +69,6 @@ Ref: https://keepachangelog.com/en/1.0.0/

* (deps) [tharsis#1046](https://github.com/tharsis/ethermint/pull/1046) Bump Cosmos SDK version to [`v0.45.3`](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.3)
* (rpc) [tharsis#1056](https://github.com/tharsis/ethermint/pull/1056) Make json-rpc namespaces extensible
* (app) [https://github.com/tharsis/ethermint/pull/1063] Update github actions to run evm simulation, add more tests for evm simulation, use random gascap in simulation.

### Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion x/evm/simulation/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// NewDecodeStore returns a decoder function closure that unmarshals the KVPair's
// Value to the corresponding evm type.
// value to the corresponding EVM type.
func NewDecodeStore() func(kvA, kvB kv.Pair) string {
return func(kvA, kvB kv.Pair) string {
switch {
Expand Down
10 changes: 5 additions & 5 deletions x/evm/simulation/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,24 @@ const (
extraEIPsKey = "extra_eips"
)

// GenExtraEIPs randomly generates specific extra eips or not.
// GenExtraEIPs defines a set of extra EIPs with 50% probability
func GenExtraEIPs(r *rand.Rand) []int64 {
var extraEIPs []int64
// 50% chance of having extra eips
// 50% chance of having extra EIPs
if r.Intn(2) == 0 {
extraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529}
}
return extraEIPs
}

// GenEnableCreate enables the EnableCreate param with 80% probability
func GenEnableCreate(r *rand.Rand) bool {
// 80% chance of enabling create contract
enableCreate := r.Intn(100) < 80
return enableCreate
}

// GenEnableCall enables the EnableCall param with 80% probability
func GenEnableCall(r *rand.Rand) bool {
// 80% chance of enabling evm account transfer and calling contract
enableCall := r.Intn(100) < 80
Expand All @@ -39,9 +41,7 @@ func GenEnableCall(r *rand.Rand) bool {
// RandomizedGenState generates a random GenesisState for the EVM module
func RandomizedGenState(simState *module.SimulationState) {
// evm params
var (
extraEIPs []int64
)
var extraEIPs []int64

simState.AppParams.GetOrGenerate(
simState.Cdc, extraEIPsKey, &extraEIPs, simState.Rand,
Expand Down

0 comments on commit 28e051b

Please sign in to comment.