Merge branch 'rigel/move-spec' into rigel/fee-distribution
This commit is contained in:
commit
38c6090a9b
2
Makefile
2
Makefile
|
@ -157,7 +157,7 @@ test_sim_gaia_nondeterminism:
|
||||||
|
|
||||||
test_sim_gaia_fast:
|
test_sim_gaia_fast:
|
||||||
@echo "Running quick Gaia simulation. This may take several minutes..."
|
@echo "Running quick Gaia simulation. This may take several minutes..."
|
||||||
@go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationNumBlocks=50 -v -timeout 24h
|
@go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationNumBlocks=150 -v -timeout 24h
|
||||||
|
|
||||||
test_sim_gaia_slow:
|
test_sim_gaia_slow:
|
||||||
@echo "Running full Gaia simulation. This may take awhile!"
|
@echo "Running full Gaia simulation. This may take awhile!"
|
||||||
|
|
|
@ -35,6 +35,8 @@ BREAKING CHANGES
|
||||||
* [x/slashing] [#2122](https://github.com/cosmos/cosmos-sdk/pull/2122) - Implement slashing period
|
* [x/slashing] [#2122](https://github.com/cosmos/cosmos-sdk/pull/2122) - Implement slashing period
|
||||||
* [types] \#2119 Parsed error messages and ABCI log errors to make them more human readable.
|
* [types] \#2119 Parsed error messages and ABCI log errors to make them more human readable.
|
||||||
* [simulation] Rename TestAndRunTx to Operation [#2153](https://github.com/cosmos/cosmos-sdk/pull/2153)
|
* [simulation] Rename TestAndRunTx to Operation [#2153](https://github.com/cosmos/cosmos-sdk/pull/2153)
|
||||||
|
* [tools] Removed gocyclo [#2211](https://github.com/cosmos/cosmos-sdk/issues/2211)
|
||||||
|
* [baseapp] Remove `SetTxDecoder` in favor of requiring the decoder be set in baseapp initialization. [#1441](https://github.com/cosmos/cosmos-sdk/issues/1441)
|
||||||
|
|
||||||
* Tendermint
|
* Tendermint
|
||||||
|
|
||||||
|
|
|
@ -26,12 +26,6 @@ func (app *BaseApp) SetCMS(cms store.CommitMultiStore) {
|
||||||
}
|
}
|
||||||
app.cms = cms
|
app.cms = cms
|
||||||
}
|
}
|
||||||
func (app *BaseApp) SetTxDecoder(txDecoder sdk.TxDecoder) {
|
|
||||||
if app.sealed {
|
|
||||||
panic("SetTxDecoder() on sealed BaseApp")
|
|
||||||
}
|
|
||||||
app.txDecoder = txDecoder
|
|
||||||
}
|
|
||||||
func (app *BaseApp) SetInitChainer(initChainer sdk.InitChainer) {
|
func (app *BaseApp) SetInitChainer(initChainer sdk.InitChainer) {
|
||||||
if app.sealed {
|
if app.sealed {
|
||||||
panic("SetInitChainer() on sealed BaseApp")
|
panic("SetInitChainer() on sealed BaseApp")
|
||||||
|
|
|
@ -189,7 +189,7 @@ func TestAppStateDeterminism(t *testing.T) {
|
||||||
t.Skip("Skipping Gaia simulation")
|
t.Skip("Skipping Gaia simulation")
|
||||||
}
|
}
|
||||||
|
|
||||||
numSeeds := 5
|
numSeeds := 3
|
||||||
numTimesToRunPerSeed := 5
|
numTimesToRunPerSeed := 5
|
||||||
appHashList := make([]json.RawMessage, numTimesToRunPerSeed)
|
appHashList := make([]json.RawMessage, numTimesToRunPerSeed)
|
||||||
|
|
||||||
|
@ -206,10 +206,11 @@ func TestAppStateDeterminism(t *testing.T) {
|
||||||
testAndRunTxs(app),
|
testAndRunTxs(app),
|
||||||
[]simulation.RandSetup{},
|
[]simulation.RandSetup{},
|
||||||
[]simulation.Invariant{},
|
[]simulation.Invariant{},
|
||||||
20,
|
50,
|
||||||
20,
|
100,
|
||||||
true,
|
false,
|
||||||
)
|
)
|
||||||
|
app.Commit()
|
||||||
appHash := app.LastCommitID().Hash
|
appHash := app.LastCommitID().Hash
|
||||||
appHashList[j] = appHash
|
appHashList[j] = appHash
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ INEFFASSIGN_CHECK := $(shell command -v ineffassign 2> /dev/null)
|
||||||
MISSPELL_CHECK := $(shell command -v misspell 2> /dev/null)
|
MISSPELL_CHECK := $(shell command -v misspell 2> /dev/null)
|
||||||
ERRCHECK_CHECK := $(shell command -v errcheck 2> /dev/null)
|
ERRCHECK_CHECK := $(shell command -v errcheck 2> /dev/null)
|
||||||
UNPARAM_CHECK := $(shell command -v unparam 2> /dev/null)
|
UNPARAM_CHECK := $(shell command -v unparam 2> /dev/null)
|
||||||
GOCYCLO_CHECK := $(shell command -v gocyclo 2> /dev/null)
|
# GOCYCLO_CHECK := $(shell command -v gocyclo 2> /dev/null)
|
||||||
|
|
||||||
check_tools:
|
check_tools:
|
||||||
ifndef DEP_CHECK
|
ifndef DEP_CHECK
|
||||||
|
@ -126,12 +126,12 @@ else
|
||||||
@echo "Installing unparam"
|
@echo "Installing unparam"
|
||||||
go get -v $(UNPARAM)
|
go get -v $(UNPARAM)
|
||||||
endif
|
endif
|
||||||
ifdef GOCYCLO_CHECK
|
# ifdef GOCYCLO_CHECK
|
||||||
@echo "gocyclo is already installed. Run 'make update_tools' to update."
|
# @echo "gocyclo is already installed. Run 'make update_tools' to update."
|
||||||
else
|
# else
|
||||||
@echo "Installing gocyclo"
|
# @echo "Installing gocyclo"
|
||||||
go get -v $(GOCYCLO)
|
# go get -v $(GOCYCLO)
|
||||||
endif
|
# endif
|
||||||
|
|
||||||
update_tools:
|
update_tools:
|
||||||
@echo "Updating dep"
|
@echo "Updating dep"
|
||||||
|
@ -153,8 +153,8 @@ update_dev_tools:
|
||||||
go get -u -v $(ERRCHECK)
|
go get -u -v $(ERRCHECK)
|
||||||
@echo "Updating unparam"
|
@echo "Updating unparam"
|
||||||
go get -u -v $(UNPARAM)
|
go get -u -v $(UNPARAM)
|
||||||
@echo "Updating goyclo"
|
# @echo "Updating goyclo"
|
||||||
go get -u -v $(GOCYCLO)
|
# go get -u -v $(GOCYCLO)
|
||||||
|
|
||||||
# To avoid unintended conflicts with file names, always add to .PHONY
|
# To avoid unintended conflicts with file names, always add to .PHONY
|
||||||
# unless there is a reason not to.
|
# unless there is a reason not to.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"Linters": {
|
"Linters": {
|
||||||
"vet": "go tool vet -composites=false :PATH:LINE:MESSAGE"
|
"vet": "go tool vet -composites=false :PATH:LINE:MESSAGE"
|
||||||
},
|
},
|
||||||
"Enable": ["golint", "vet", "ineffassign", "unparam", "unconvert", "misspell", "gocyclo"],
|
"Enable": ["golint", "vet", "ineffassign", "unparam", "unconvert", "misspell"],
|
||||||
"Deadline": "500s",
|
"Deadline": "500s",
|
||||||
"Vendor": true,
|
"Vendor": true,
|
||||||
"Cyclo": 11
|
"Cyclo": 11
|
||||||
|
|
|
@ -155,7 +155,7 @@ func createBlockSimulator(testingMode bool, tb testing.TB, t *testing.T, event f
|
||||||
AssertAllInvariants(t, app, invariants, log)
|
AssertAllInvariants(t, app, invariants, log)
|
||||||
}
|
}
|
||||||
if opCount%50 == 0 {
|
if opCount%50 == 0 {
|
||||||
fmt.Printf("\rSimulating... block %d/%d, operation %d/%d.", header.Height, totalNumBlocks, opCount, blocksize)
|
fmt.Printf("\rSimulating... block %d/%d, operation %d/%d. ", header.Height, totalNumBlocks, opCount, blocksize)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
opCount++
|
opCount++
|
||||||
|
|
Loading…
Reference in New Issue