Skip to content
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

chore(simapp/v2): consensus server isn't command dep #23480

Merged
merged 4 commits into from
Jan 23, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup
julienrbrt committed Jan 23, 2025

Verified

This commit was signed with the committer’s verified signature.
commit f66627745405084e8de0d55c179f92abefe8c971
2 changes: 1 addition & 1 deletion runtime/v2/builder.go
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@ func (a *AppBuilder[T]) Build(opts ...AppBuilderOption[T]) (*App[T], error) {
}
a.app.stf = stf

a.app.AppManager = appmanager.New[T](
a.app.AppManager = appmanager.New(
appmanager.Config{
ValidateTxGasLimit: a.app.config.GasConfig.ValidateTxGasLimit,
QueryGasLimit: a.app.config.GasConfig.QueryGasLimit,
2 changes: 1 addition & 1 deletion server/v2/appmanager/config.go
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ package appmanager

// Config represents the configuration options for the app manager.
type Config struct {
ValidateTxGasLimit uint64 `mapstructure:"validate-tx-gas-limit"` // TODO: check how this works on app mempool
ValidateTxGasLimit uint64 `mapstructure:"validate-tx-gas-limit"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe this can be removed, we should open an issue on it to track it.

Copy link
Member Author

@julienrbrt julienrbrt Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's being used here actually:

res := a.stf.ValidateTx(ctx, latestState, a.config.ValidateTxGasLimit, tx)

It is part of the stf interface:

res := a.stf.ValidateTx(ctx, latestState, a.config.ValidateTxGasLimit, tx)

QueryGasLimit uint64 `mapstructure:"query-gas-limit"`
SimulationGasLimit uint64 `mapstructure:"simulation-gas-limit"`
}
3 changes: 2 additions & 1 deletion simapp/v2/app_config.go
Original file line number Diff line number Diff line change
@@ -197,7 +197,8 @@ var (
},
// Uncomment if you want to set a custom migration order here.
// OrderMigrations: []string{},
// TODO GasConfig was added to the config in runtimev2. Where/how was it set in v1?
// GasConfig is used to set the gas configuration for the queries and transactions.
// This config is aimed to app-wide and shouldn't be overriden by individual validators.
GasConfig: &runtimev2.GasConfig{
ValidateTxGasLimit: 10_000_000,
QueryGasLimit: 100_000,
Loading