Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions cmd/chainsimulator/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@
auto-generate-blocks = false
# block-time-in-milliseconds specifies the time between blocks generation in case auto-generate-blocks is enabled
block-time-in-milliseconds = 6000

[config.fetch-state]
enabled = false
gateway-url = "https://gateway.multiversx.com"
7 changes: 7 additions & 0 deletions cmd/chainsimulator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,13 @@ func startChainSimulator(ctx *cli.Context) error {
alterConfigsError = overridableConfig.OverrideConfigValues(overrideCfg.OverridableConfigTomlValues, cfg)
},
VmQueryDelayAfterStartInMs: 0,
FetchStateConfig: chainSimulator.FetchStateFromProvidedChainConfig{
Enabled: cfg.Config.FetchState.Enabled,
FetchNonce: true,
FetchRound: true,
FetchEpoch: true,
GatewayURL: cfg.Config.FetchState.GatewayUrl,
},
}
simulator, err := chainSimulator.NewChainSimulator(argsChainSimulator)
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ type Config struct {
LogsPath string `toml:"logs-path"`
} `toml:"logs"`
BlocksGenerator BlocksGeneratorConfig `toml:"blocks-generator"`
FetchState struct {
Enabled bool `toml:"enabled"`
GatewayUrl string `toml:"gateway-url"`
} `toml:"fetch-state"`
} `toml:"config"`
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792
github.com/gin-gonic/gin v1.10.0
github.com/multiversx/mx-chain-core-go v1.4.0
github.com/multiversx/mx-chain-go v1.10.5
github.com/multiversx/mx-chain-go v1.10.6-0.20250812073101-6e197d94a109
github.com/multiversx/mx-chain-logger-go v1.1.0
github.com/multiversx/mx-chain-proxy-go v1.3.1
github.com/pelletier/go-toml v1.9.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ github.com/multiversx/mx-chain-crypto-go v1.3.0 h1:0eK2bkDOMi8VbSPrB1/vGJSYT81IB
github.com/multiversx/mx-chain-crypto-go v1.3.0/go.mod h1:nPIkxxzyTP8IquWKds+22Q2OJ9W7LtusC7cAosz7ojM=
github.com/multiversx/mx-chain-es-indexer-go v1.9.1 h1:Jg/4CLzIiwyrjuy+ZccEJ4TcvlHXnBUr5o3pclVitGo=
github.com/multiversx/mx-chain-es-indexer-go v1.9.1/go.mod h1:t1rkD2vHXSI4EClig0h7+kRCSUCRrMF+emr4DHxFtfA=
github.com/multiversx/mx-chain-go v1.10.5 h1:wldx5GZ3+MZDJWV01QenHAUF8bGW615cmZsRJtdX7gs=
github.com/multiversx/mx-chain-go v1.10.5/go.mod h1:ELWAFinKEiqOeDe8kHJ+zN9zFL9leV4tNpMgH1fLnBE=
github.com/multiversx/mx-chain-go v1.10.6-0.20250812073101-6e197d94a109 h1:AiWrdhCsLOcPmYIKEYnROkY+l6iLaCV4cZkl1Nn2dIk=
github.com/multiversx/mx-chain-go v1.10.6-0.20250812073101-6e197d94a109/go.mod h1:ELWAFinKEiqOeDe8kHJ+zN9zFL9leV4tNpMgH1fLnBE=
github.com/multiversx/mx-chain-logger-go v1.1.0 h1:97x84A6L4RfCa6YOx1HpAFxZp1cf/WI0Qh112whgZNM=
github.com/multiversx/mx-chain-logger-go v1.1.0/go.mod h1:K9XgiohLwOsNACETMNL0LItJMREuEvTH6NsoXWXWg7g=
github.com/multiversx/mx-chain-proxy-go v1.3.1 h1:tjbTm3FpR0bjDvWAMK0zwRxRbbjGszSWltng7jv6CIg=
Expand Down
Loading