-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R4R: Slashing, validator set, and governance simulation #1783
Changes from all commits
15a5cd5
2a04c04
79e870a
a1ea7cc
727b7bd
9c55ec5
782fcd7
e4d0b17
0f85d6c
d2709e2
6c07f4a
01264b9
d7f1553
738009c
b032b8e
2bf2c9a
e69f7fc
3a4aed5
9a07c07
be70a21
d151988
f0cff46
5058379
8cacb96
d9000fb
7a02762
ce52253
d36d739
529b93a
14c4642
8ccde07
a2ed2d1
7fb08f8
4036295
e7a732d
2a9061e
462e0cc
afed984
d69107c
c3b9818
23d96f0
fd6594b
2163e96
416e0d7
9a4a42b
dfb81f0
6caaebc
b1b7d9d
ebd394c
03d9378
36aa0af
d9c1d67
fadfe87
7b2b989
73d5028
a4c7fa7
64a2e5b
0a3f610
bce3f5d
75f8f15
268c0ac
f18c01d
1a64c87
2b703c9
b40c9e8
198f0f3
f172dd6
63762e9
11ae0f3
70cc9bd
44c5ae7
4bd01b0
6e58500
1e1f337
c13dd76
93060d7
54ee496
617a503
169260f
eb3e623
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,15 +130,17 @@ test_unit: | |
test_race: | ||
@go test -race $(PACKAGES_NOSIMULATION) | ||
|
||
test_sim: | ||
@echo "Running individual module simulations." | ||
@go test $(PACKAGES_SIMTEST) -v | ||
@echo "Running full Gaia simulation. This may take several minutes." | ||
@echo "Pass the flag 'SimulationSeed' to run with a constant seed." | ||
@echo "Pass the flag 'SimulationNumKeys' to run with the specified number of keys." | ||
@echo "Pass the flag 'SimulationNumBlocks' to run with the specified number of blocks." | ||
@echo "Pass the flag 'SimulationBlockSize' to run with the specified block size (operations per block)." | ||
@go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationBlockSize=200 -v | ||
test_sim_modules: | ||
@echo "Running individual module simulations..." | ||
@go test $(PACKAGES_SIMTEST) | ||
|
||
test_sim_gaia_fast: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not able to send a successful There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point! We should resolve this, but I strongly think we should get this PR merged, and fix this once its merged. Reviewing / rebasing / etc. is becoming a pain, and it will be much easier to parallelize work once its on develop. Mentioned your point about SIGINT #1924 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just send |
||
@echo "Running full Gaia simulation. This may take several minutes..." | ||
@go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationNumBlocks=1000 -v -timeout 24h | ||
|
||
test_sim_gaia_slow: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above. |
||
@echo "Running full Gaia simulation. This may take several minutes..." | ||
@go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationNumBlocks=1000 -SimulationVerbose=true -v -timeout 24h | ||
|
||
test_cover: | ||
@bash tests/test_cover.sh | ||
|
@@ -204,4 +206,4 @@ localnet-stop: | |
check_tools check_dev_tools get_tools get_dev_tools get_vendor_deps draw_deps test test_cli test_unit \ | ||
test_cover test_lint benchmark devdoc_init devdoc devdoc_save devdoc_update \ | ||
build-linux build-docker-gaiadnode localnet-start localnet-stop \ | ||
format check-ledger test_sim update_tools update_dev_tools | ||
format check-ledger test_sim_modules test_sim_gaia_fast test_sim_gaia_slow update_tools update_dev_tools |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -379,7 +379,7 @@ func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeg | |
} else { | ||
// In the first block, app.deliverState.ctx will already be initialized | ||
// by InitChain. Context is now updated with Header information. | ||
app.deliverState.ctx = app.deliverState.ctx.WithBlockHeader(req.Header) | ||
app.deliverState.ctx = app.deliverState.ctx.WithBlockHeader(req.Header).WithBlockHeight(req.Header.Height) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be fixed on develop through a seperate PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe, it's minor and wasn't caught before since we only hit this case on height 0 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added to the changelog here for now |
||
} | ||
|
||
if app.beginBlocker != nil { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a full simulation? If so can this be worded as tests all gaia modules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It tests them together though, rather than individually (that's
test_sim_modules
).