Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
662771d
go.mod update
axenteoctavian Dec 10, 2025
954e2f9
Update go.mod
axenteoctavian Dec 12, 2025
a6dc946
latest
miiu96 Dec 15, 2025
2e3b313
go.mod update
axenteoctavian Dec 16, 2025
bec59cc
go.mod mx-chain-go update to fixes-async-exe
axenteoctavian Dec 16, 2025
70f2390
go.mod mx-chain-proxy-go update to update-core-go
axenteoctavian Dec 16, 2025
cd1e2e4
go.mod mx-chain-go update to latest fixes-async-exec
axenteoctavian Dec 16, 2025
8ce4793
fix test
axenteoctavian Dec 17, 2025
58b0b9e
Update go.mod
axenteoctavian Dec 17, 2025
de59cbe
Merge pull request #194 from multiversx/fix-receipts-go-mod
axenteoctavian Dec 18, 2025
e4a0b50
Update go.mod
axenteoctavian Dec 18, 2025
d37ac0a
Update go.mod
axenteoctavian Dec 18, 2025
06cb7cb
change num of block to generate
miiu96 Dec 22, 2025
be699b1
update proxy
miiu96 Dec 22, 2025
e3ff735
fix action
miiu96 Dec 22, 2025
f25ef8d
one more blocks
miiu96 Dec 22, 2025
f50b798
one more blocks
miiu96 Dec 22, 2025
780dffd
rollback
miiu96 Dec 22, 2025
785b2ec
Merge pull request #193 from multiversx/lastestd-commit-chain-sim-asy…
miiu96 Dec 22, 2025
c4f8681
Update go.mod
axenteoctavian Dec 23, 2025
a4648cc
Merge branch 'feat/supernova-async-exec' into update-go-mod-23-dec
axenteoctavian Dec 23, 2025
b2f1688
Update go.mod
axenteoctavian Dec 23, 2025
7df2138
Merge pull request #196 from multiversx/update-go-mod-23-dec
axenteoctavian Dec 23, 2025
df9d2cc
Merge branch 'rc/supernova' into merge-rc-supernova-into-feat-9-ian
axenteoctavian Jan 9, 2026
9b1ccfe
update go.mod
axenteoctavian Jan 9, 2026
4b59698
Merge pull request #198 from multiversx/merge-rc-supernova-into-feat-…
axenteoctavian Jan 9, 2026
76b8ae7
Update go.mod with latest feat/supernova-async-exec
axenteoctavian Jan 12, 2026
35d7f99
Merge pull request #199 from multiversx/update-go-mod-12-ian
axenteoctavian Jan 12, 2026
92dd999
Update go.mod with latest feat/supernova-async-exec
axenteoctavian Jan 14, 2026
0dfb361
Merge pull request #200 from multiversx/update-go-mod-14-ian
axenteoctavian Jan 14, 2026
861acb6
Update go.mod with latest feat/supernova-async-exec
axenteoctavian Jan 21, 2026
37fa2d6
Merge pull request #202 from multiversx/update-go-mod-21-ian
axenteoctavian Jan 21, 2026
eb54366
update supernova async
miiu96 Jan 28, 2026
535d51e
Merge pull request #204 from multiversx/update-supernova-async
miiu96 Jan 28, 2026
7300a12
Create block time and bypass flags
axenteoctavian Jan 29, 2026
07c8d1f
Merge pull request #205 from multiversx/create-block-time-check-flags
sstanculeanu Feb 2, 2026
c6bc8bb
Update go.mod
axenteoctavian Feb 2, 2026
b211bb0
update go.mod
axenteoctavian Feb 2, 2026
22de031
update go.mod
axenteoctavian Feb 3, 2026
441fb5f
Merge pull request #206 from multiversx/update-go-mod-2-feb
AdoAdoAdo Feb 3, 2026
cb020a9
update go.mod
axenteoctavian Feb 4, 2026
132fbd1
Merge pull request #207 from multiversx/update-go-mod-4-feb
axenteoctavian Feb 4, 2026
87617f6
update go.mod
axenteoctavian Feb 6, 2026
72c689a
Merge pull request #208 from multiversx/update-go-mod-6-feb
axenteoctavian Feb 6, 2026
b2bce1d
update go.mod
axenteoctavian Feb 9, 2026
aea172a
Merge pull request #209 from multiversx/update-go-mod-9-feb
axenteoctavian Feb 9, 2026
a299852
update go.mod
axenteoctavian Feb 11, 2026
6ca39c7
Merge pull request #210 from multiversx/update-go-mod-11-feb
axenteoctavian Feb 11, 2026
b0a3d16
update go.mod
axenteoctavian Feb 16, 2026
b8d72cf
Merge pull request #211 from multiversx/update-go-mod-16-feb
axenteoctavian Feb 16, 2026
31d836d
go.mod update
axenteoctavian Feb 17, 2026
742a5cc
Merge pull request #213 from multiversx/enable-rounds-api-route
axenteoctavian Feb 17, 2026
436686e
go.mod update
axenteoctavian Feb 24, 2026
c56eb52
Merge pull request #214 from multiversx/update-go-mod-24-feb
axenteoctavian Feb 24, 2026
05a3be8
go.mod update
axenteoctavian Mar 2, 2026
a730321
Merge pull request #215 from multiversx/update-go-mod-2-mar
axenteoctavian Mar 2, 2026
c9f4a36
go.mod update
axenteoctavian Mar 9, 2026
6c6637c
Merge pull request #216 from multiversx/update-go-mod-9-mar
axenteoctavian Mar 9, 2026
37d9d25
go.mod update
axenteoctavian Mar 19, 2026
976e06f
Merge pull request #217 from multiversx/update-go-mod-19-mar
axenteoctavian Mar 19, 2026
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
9 changes: 9 additions & 0 deletions cmd/chainsimulator/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ var (
Name: "bypass-blocks-signature",
Usage: "This flag is used to bypass the blocks signature verification (by default true)",
}
bypassCreateBlockTimeCheck = cli.BoolTFlag{
Name: "bypass-create-block-time-check",
Usage: "This flag is used to bypass the create block time check (by default true)",
}
createBlockMaxTimePercent = cli.Float64Flag{
Name: "create-block-max-time-percent",
Usage: "The max time percent of round duration to create block (by default 25%)",
Value: 0.25,
}
numValidatorsPerShard = cli.IntFlag{
Name: "num-validators-per-shard",
Usage: "This flag is used to specify the number of validators per shard",
Expand Down
8 changes: 7 additions & 1 deletion cmd/chainsimulator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ func main() {
supernovaRoundDurationInMs,
bypassTransactionsSignature,
bypassBlocksSignature,
createBlockMaxTimePercent,
bypassCreateBlockTimeCheck,
numValidatorsPerShard,
numWaitingValidatorsPerShard,
numValidatorsMeta,
Expand Down Expand Up @@ -157,6 +159,8 @@ func startChainSimulator(ctx *cli.Context) error {
HasValue: true,
Value: uint64(cfg.Config.Simulator.SupernovaRoundsPerEpoch),
}
createBlockMaxTimePercent := ctx.GlobalFloat64(createBlockMaxTimePercent.Name)
bypassCreateBlockTimeCheck := ctx.GlobalBool(bypassCreateBlockTimeCheck.Name)

numValidatorsShard := ctx.GlobalInt(numValidatorsPerShard.Name)
if numValidatorsShard < 1 {
Expand Down Expand Up @@ -206,6 +210,8 @@ func startChainSimulator(ctx *cli.Context) error {
argsChainSimulator := chainSimulator.ArgsChainSimulator{
BypassTxSignatureCheck: bypassTxsSignature,
BypassBlockSignatureCheck: bypassBlocksSignature,
BypassCreateBlockTimeCheck: bypassCreateBlockTimeCheck,
CreateBlockMaxTimePercent: createBlockMaxTimePercent,
TempDir: tempDir,
PathToInitialConfig: nodeConfigs,
NumOfShards: uint32(cfg.Config.Simulator.NumOfShards),
Expand Down Expand Up @@ -416,7 +422,7 @@ func initializeLogger(ctx *cli.Context, cfg config.Config) (closing.Closer, erro
fileLogging, err := file.NewFileLogging(file.ArgsFileLogging{
WorkingDir: pathLogsSave,
DefaultLogsPath: cfg.Config.Logs.LogsPath,
LogFilePrefix: cfg.Config.Logs.LogFilePrefix,
LogFilePrefix: cfg.Config.Logs.LogFilePrefix + "-" + strconv.Itoa(cfg.Config.Simulator.ServerPort),
})
if err != nil {
return nil, fmt.Errorf("%w creating a log file", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def main():
if status.status != "pending":
sys.exit(f"incorrect status of transaction: expected->pending, received->{status}")

provider.do_post_generic(f"{GENERATE_BLOCKS_URL}/3", {})
status = status = provider.get_transaction_status(tx_hash)
provider.do_post_generic(f"{GENERATE_BLOCKS_URL}/6", {})
status = provider.get_transaction_status(tx_hash)
if status.status != "fail":
sys.exit(f"incorrect status of transaction: expected->fail, received->{status}")

Expand Down
24 changes: 12 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
module github.com/multiversx/mx-chain-simulator-go

go 1.23
go 1.23.0

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.2-0.20251022090220-a99e14e45706
github.com/multiversx/mx-chain-go v1.11.2-0.20251216115449-db8b601e9a5a
github.com/multiversx/mx-chain-core-go v1.4.2-0.20260219091525-015123fd1603
github.com/multiversx/mx-chain-go v1.11.2-0.20260318142640-0dca50ae579d
github.com/multiversx/mx-chain-logger-go v1.1.0
github.com/multiversx/mx-chain-proxy-go v1.3.1
github.com/multiversx/mx-chain-proxy-go v1.3.5-0.20260217073158-6a6ed53a320e
github.com/multiversx/mx-chain-storage-go v1.1.0
github.com/pelletier/go-toml v1.9.3
github.com/stretchr/testify v1.10.0
github.com/urfave/cli v1.22.16
Expand Down Expand Up @@ -118,12 +119,11 @@ require (
github.com/multiformats/go-multistream v0.6.0 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/multiversx/concurrent-map v0.1.4 // indirect
github.com/multiversx/mx-chain-communication-go v1.3.0 // indirect
github.com/multiversx/mx-chain-crypto-go v1.3.0 // indirect
github.com/multiversx/mx-chain-es-indexer-go v1.9.3-0.20251021150757-bd6aa66a0a90 // indirect
github.com/multiversx/mx-chain-communication-go v1.3.1 // indirect
github.com/multiversx/mx-chain-crypto-go v1.3.1-0.20260130144701-dfa5fd3ea5d7 // indirect
github.com/multiversx/mx-chain-es-indexer-go v1.9.4-0.20260219114236-37624897dc3a // indirect
github.com/multiversx/mx-chain-scenario-go v1.6.0 // indirect
github.com/multiversx/mx-chain-storage-go v1.1.0 // indirect
github.com/multiversx/mx-chain-vm-common-go v1.6.0 // indirect
github.com/multiversx/mx-chain-vm-common-go v1.6.1-0.20251127112501-0b5f28e33b2e // indirect
github.com/multiversx/mx-chain-vm-go v1.6.1-0.20250707105646-d7048a2657c2 // indirect
github.com/multiversx/mx-chain-vm-v1_2-go v1.2.69 // indirect
github.com/multiversx/mx-chain-vm-v1_3-go v1.3.70 // indirect
Expand Down Expand Up @@ -189,13 +189,13 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/crypto v0.32.0 // indirect
golang.org/x/crypto v0.35.0 // indirect
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sync v0.11.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/text v0.22.0 // indirect
golang.org/x/tools v0.29.0 // indirect
gonum.org/v1/gonum v0.15.1 // indirect
google.golang.org/protobuf v1.36.4 // indirect
Expand Down
40 changes: 20 additions & 20 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -408,26 +408,26 @@ github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/n
github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU=
github.com/multiversx/concurrent-map v0.1.4 h1:hdnbM8VE4b0KYJaGY5yJS2aNIW9TFFsUYwbO0993uPI=
github.com/multiversx/concurrent-map v0.1.4/go.mod h1:8cWFRJDOrWHOTNSqgYCUvwT7c7eFQ4U2vKMOp4A/9+o=
github.com/multiversx/mx-chain-communication-go v1.3.0 h1:ziNM1dRuiR/7al2L/jGEA/a/hjurtJ/HEqgazHNt9P8=
github.com/multiversx/mx-chain-communication-go v1.3.0/go.mod h1:gDVWn6zUW6aCN1YOm/FbbT5MUmhgn/L1Rmpl8EoH3Yg=
github.com/multiversx/mx-chain-core-go v1.4.2-0.20251022090220-a99e14e45706 h1:rs0XNP+cxwRWL5EnbfMecRHbXd5NzukImJnk58UNsiA=
github.com/multiversx/mx-chain-core-go v1.4.2-0.20251022090220-a99e14e45706/go.mod h1:IO+vspNan+gT0WOHnJ95uvWygiziHZvfXpff6KnxV7g=
github.com/multiversx/mx-chain-crypto-go v1.3.0 h1:0eK2bkDOMi8VbSPrB1/vGJSYT81IBtfL4zw+C4sWe/k=
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.3-0.20251021150757-bd6aa66a0a90 h1:Hf6AqpCSHccBo5ZV5Bfaxz3UdPYhtYCynU+3CF4jAa8=
github.com/multiversx/mx-chain-es-indexer-go v1.9.3-0.20251021150757-bd6aa66a0a90/go.mod h1:t1rkD2vHXSI4EClig0h7+kRCSUCRrMF+emr4DHxFtfA=
github.com/multiversx/mx-chain-go v1.11.2-0.20251216115449-db8b601e9a5a h1:qQ13SNyzG5dBhgc9faA6HyFQX2l8v77r/GAtKyUaIjQ=
github.com/multiversx/mx-chain-go v1.11.2-0.20251216115449-db8b601e9a5a/go.mod h1:G2LX81y+A75W5EqJod9p4fRAdnp22vpQrB+374pAveQ=
github.com/multiversx/mx-chain-communication-go v1.3.1 h1:rJj4FOTqacD+yaAfz61FoEtwpAYmOQFyLEHdy1YZya4=
github.com/multiversx/mx-chain-communication-go v1.3.1/go.mod h1:gDVWn6zUW6aCN1YOm/FbbT5MUmhgn/L1Rmpl8EoH3Yg=
github.com/multiversx/mx-chain-core-go v1.4.2-0.20260219091525-015123fd1603 h1:PhvZUz2zHo3cjx/zySG02enKgvY4r0Vy39l0FKxc+D4=
github.com/multiversx/mx-chain-core-go v1.4.2-0.20260219091525-015123fd1603/go.mod h1:IO+vspNan+gT0WOHnJ95uvWygiziHZvfXpff6KnxV7g=
github.com/multiversx/mx-chain-crypto-go v1.3.1-0.20260130144701-dfa5fd3ea5d7 h1:3cJf1poYPhurIenMd3GYCEh0npaEchodVzcdmHxJrY4=
github.com/multiversx/mx-chain-crypto-go v1.3.1-0.20260130144701-dfa5fd3ea5d7/go.mod h1:nPIkxxzyTP8IquWKds+22Q2OJ9W7LtusC7cAosz7ojM=
github.com/multiversx/mx-chain-es-indexer-go v1.9.4-0.20260219114236-37624897dc3a h1:4ExtYUKB8Hd+IlvxscVpAHjO6hMSYlL2yFfsKBUAzgY=
github.com/multiversx/mx-chain-es-indexer-go v1.9.4-0.20260219114236-37624897dc3a/go.mod h1:aPHgLkELJWxCDXBFF9+tbYaXJH2GIRk723YOaTejYWc=
github.com/multiversx/mx-chain-go v1.11.2-0.20260318142640-0dca50ae579d h1:jLSVxK01JA4+dY3sFzis/mueEpBIg1yvpiZ5JtTNI0Y=
github.com/multiversx/mx-chain-go v1.11.2-0.20260318142640-0dca50ae579d/go.mod h1:2rd07AciufLzuEYa31uOai7DyI6Fc0ntEtOA1+1JR18=
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=
github.com/multiversx/mx-chain-proxy-go v1.3.1/go.mod h1:cHuW0HW8ygFhnXENyBYHiVSWmK17uheAUjglNNgTTpc=
github.com/multiversx/mx-chain-proxy-go v1.3.5-0.20260217073158-6a6ed53a320e h1:ykO1INcCgcPtz3He0gUpjK9Xisx+71HBMT3CdcmoALQ=
github.com/multiversx/mx-chain-proxy-go v1.3.5-0.20260217073158-6a6ed53a320e/go.mod h1:kizqVThJggPV0cD29qeOCFhLwnrbuYQ7saGg+GzEOog=
github.com/multiversx/mx-chain-scenario-go v1.6.0 h1:cwDFuS1pSc4YXnfiKKDTEb+QDY4fulPQaiRgIebnKxI=
github.com/multiversx/mx-chain-scenario-go v1.6.0/go.mod h1:GrSYu1SnMvsIm9djUz1X13224HcvdY6Nb5KHNT3xZPA=
github.com/multiversx/mx-chain-storage-go v1.1.0 h1:M1Y9DqMrJ62s7Zw31+cyuqsnPIvlG4jLBJl5WzeZLe8=
github.com/multiversx/mx-chain-storage-go v1.1.0/go.mod h1:o6Jm7cjfPmcc6XpyihYWrd6sx3sgqwurrunw3ZrfyxI=
github.com/multiversx/mx-chain-vm-common-go v1.6.0 h1:M2zmf/ptEINciWxYCPLIkwOMTvvzWjELYYB+0MMQ5Gw=
github.com/multiversx/mx-chain-vm-common-go v1.6.0/go.mod h1:Lc7r4VDPYRDS0CVIaWAoLtf3YQn6PZEYHv4QtaOE2Z0=
github.com/multiversx/mx-chain-vm-common-go v1.6.1-0.20251127112501-0b5f28e33b2e h1:3gboKT4hPEb9ZkAYO2Z/y3sOaUBzxVMN4FhyLFcRSHI=
github.com/multiversx/mx-chain-vm-common-go v1.6.1-0.20251127112501-0b5f28e33b2e/go.mod h1:Lc7r4VDPYRDS0CVIaWAoLtf3YQn6PZEYHv4QtaOE2Z0=
github.com/multiversx/mx-chain-vm-go v1.6.1-0.20250707105646-d7048a2657c2 h1:mWerES8Wk3a9NJVgsjG7d39o3IHtT5AX4uR3Znbzd8k=
github.com/multiversx/mx-chain-vm-go v1.6.1-0.20250707105646-d7048a2657c2/go.mod h1:Qc2Sckw+EfQwnapkzghFfhuUAOGv29oSZgvj8LJ+xWQ=
github.com/multiversx/mx-chain-vm-v1_2-go v1.2.69 h1:5gSR3IMw1mcp/v5oO+vZ5YOyWO8w7O2qKhCKNPwsWNE=
Expand Down Expand Up @@ -709,8 +709,8 @@ golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE
golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs=
golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c h1:KL/ZBHXgKGVmuZBZ01Lt57yE5ws8ZPSkkihmEyq7FXc=
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU=
Expand Down Expand Up @@ -776,8 +776,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -840,8 +840,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
Expand Down
10 changes: 6 additions & 4 deletions pkg/facade/simulatorFacade.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ import (
)

const (
errMsgTargetEpochLowerThanCurrentEpoch = "target epoch must be greater than current epoch"
errMsgAccountNotFound = "account was not found")
errMsgTargetEpochLowerThanCurrentEpoch = "target epoch must be greater than current epoch"
errMsgAccountNotFound = "account was not found"
numBlocksToGenerate = 2
)

var log = logger.GetOrCreate("simulator/facade")

Expand Down Expand Up @@ -73,7 +75,7 @@ func (sf *simulatorFacade) SetStateMultiple(stateSlice []*dtos.AddressState, noG
return nil
}

return sf.simulator.GenerateBlocks(1)
return sf.simulator.GenerateBlocks(numBlocksToGenerate)
}

// SetStateMultipleOverwrite will set the entire state for the provided address and cleanup the old state of the provided addresses
Expand All @@ -96,7 +98,7 @@ func (sf *simulatorFacade) SetStateMultipleOverwrite(stateSlice []*dtos.AddressS
return nil
}

return sf.simulator.GenerateBlocks(1)
return sf.simulator.GenerateBlocks(numBlocksToGenerate)
}

// AddValidatorKeys will add the validator keys in the multi key handler
Expand Down
11 changes: 10 additions & 1 deletion pkg/proxy/creator/creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
processFactory "github.com/multiversx/mx-chain-proxy-go/process/factory"
versionsFactory "github.com/multiversx/mx-chain-proxy-go/versions/factory"
proxy2 "github.com/multiversx/mx-chain-simulator-go/pkg/proxy"
"github.com/multiversx/mx-chain-storage-go/timecache"
)

var log = logger.GetOrCreate("proxy")
Expand Down Expand Up @@ -138,7 +139,15 @@ func CreateProxy(args ArgsProxy) (*ArgsOutputProxy, error) {
valStatsProc.StartCacheUpdate()
nodeStatusProc.StartCacheUpdate()

blockProc, err := processProxy.NewBlockProcessor(bp)
blockCacher, err := timecache.NewTimeCacher(timecache.ArgTimeCacher{
DefaultSpan: time.Second,
CacheExpiry: time.Duration(args.Config.GeneralSettings.BlockCacheDurationSec) * time.Second,
})
if err != nil {
return nil, err
}

blockProc, err := processProxy.NewBlockProcessor(bp, blockCacher)
if err != nil {
return nil, err
}
Expand Down
Loading