-
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
Update TM to latest (+add test) #7442
Merged
Merged
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
92278b4
Add test for /block_results
amaury1093 7380c1d
Merge branch 'master' into am-7401-blockresults
amaury1093 4c07e6e
Fix test
amaury1093 b383532
Merge branch 'master' of ssh://github.com/cosmos/cosmos-sdk into am-7…
amaury1093 38aed91
Use http RPC client
amaury1093 1edf106
Fix temporarily block_results
amaury1093 b8e5cfa
Use init
amaury1093 62d920f
Add flag back
amaury1093 b9ba9cd
Remove init
amaury1093 9ddcf22
Update TM master
amaury1093 3a43230
Merge branch 'master' into am-7401-blockresults
amaury1093 0b8f8c1
Merge branch 'master' into am-7401-blockresults
amaury1093 a904c1b
Merge branch 'master' into am-7401-blockresults
aaronc 9e1d19f
Merge branch 'master' of ssh://github.com/cosmos/cosmos-sdk into am-7…
amaury1093 48f10db
Address comments
amaury1093 40482fc
Fix build
amaury1093 fe3f9cf
require refactor
amaury1093 c4e200e
Merge branch 'master' into am-7401-blockresults
mergify[bot] 2e87d57
Merge branch 'master' into am-7401-blockresults
mergify[bot] 0aeb0ef
Add build flag back
amaury1093 917fc36
Merge branch 'am-7401-blockresults' of ssh://github.com/cosmos/cosmos…
amaury1093 2352678
Merge branch 'master' into am-7401-blockresults
mergify[bot] 3e1a27b
More timeout on test
amaury1093 8ba50d0
Merge branch 'am-7401-blockresults' of ssh://github.com/cosmos/cosmos…
amaury1093 5fe0081
fix timeout-minutes
amaury1093 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ import ( | |
srvconfig "github.com/cosmos/cosmos-sdk/server/config" | ||
servertypes "github.com/cosmos/cosmos-sdk/server/types" | ||
"github.com/cosmos/cosmos-sdk/simapp" | ||
"github.com/cosmos/cosmos-sdk/simapp/params" | ||
storetypes "github.com/cosmos/cosmos-sdk/store/types" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" | ||
|
@@ -52,13 +53,16 @@ var lock = new(sync.Mutex) | |
// creates an ABCI Application to provide to Tendermint. | ||
type AppConstructor = func(val Validator) servertypes.Application | ||
|
||
func NewSimApp(val Validator) servertypes.Application { | ||
return simapp.NewSimApp( | ||
val.Ctx.Logger, dbm.NewMemDB(), nil, true, make(map[int64]bool), val.Ctx.Config.RootDir, 0, | ||
simapp.MakeEncodingConfig(), | ||
baseapp.SetPruning(storetypes.NewPruningOptionsFromString(val.AppConfig.Pruning)), | ||
baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), | ||
) | ||
// NewAppConstructor returns a new simapp AppConstructor | ||
func NewAppConstructor(encodingCfg params.EncodingConfig) AppConstructor { | ||
return func(val Validator) servertypes.Application { | ||
return simapp.NewSimApp( | ||
val.Ctx.Logger, dbm.NewMemDB(), nil, true, make(map[int64]bool), val.Ctx.Config.RootDir, 0, | ||
encodingCfg, | ||
baseapp.SetPruning(storetypes.NewPruningOptionsFromString(val.AppConfig.Pruning)), | ||
baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), | ||
) | ||
} | ||
Comment on lines
+56
to
+65
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 a refactor to avoid creating an additional |
||
} | ||
|
||
// Config defines the necessary configuration used to bootstrap and start an | ||
|
@@ -98,7 +102,7 @@ func DefaultConfig() Config { | |
LegacyAmino: encCfg.Amino, | ||
InterfaceRegistry: encCfg.InterfaceRegistry, | ||
AccountRetriever: authtypes.AccountRetriever{}, | ||
AppConstructor: NewSimApp, | ||
AppConstructor: NewAppConstructor(encCfg), | ||
GenesisState: simapp.ModuleBasics.DefaultGenesis(encCfg.Marshaler), | ||
TimeoutCommit: 2 * time.Second, | ||
ChainID: "chain-" + tmrand.NewRand().Str(6), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@alessio I'm doubling the timeout here, because:
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.
There seems to be a test or something else that is consuming a massive amount time. Increasing the timeout to 30m defeats the purpose of splitting tests into multiple jobs (decrease overall time)
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.
Agreed 👍 . I see this more as a band-aid patch, as it's blocking ~3-4 automerge PRs. Unless someone has an idea for a quick fix?
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.
okay! 👍 . If its hanging then 30m wont change it
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.
my hypothesis is that it's not hanging, it passes in some PRs, the test I linked above finished in 14m39s.
but anyways, "Cancelled after 15m" https://github.com/cosmos/cosmos-sdk/pull/7442/checks?check_run_id=1225173890#step:7:1 :(Edit: fixed.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's probably due to the IBC tests. We rely heavily on simapp since it's kinda hard to unit test interactions between different chains and using simapp makes testing a lot more robust. I noticed recently the test times on my machine almost doubled in duration, so I wonder if there was a change to simapp that slowed things down?
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.
the
-race
flag slows things down a lot. This plus the IBC tests could be the culprit.