diff --git a/cmd/chainsimulator/flags.go b/cmd/chainsimulator/flags.go index e3efd18..45d461b 100644 --- a/cmd/chainsimulator/flags.go +++ b/cmd/chainsimulator/flags.go @@ -4,8 +4,9 @@ import ( "time" logger "github.com/multiversx/mx-chain-logger-go" - "github.com/multiversx/mx-chain-simulator-go/config" "github.com/urfave/cli" + + "github.com/multiversx/mx-chain-simulator-go/config" ) const nodeOverrideDefaultFilename = "nodeOverrideDefault.toml" @@ -95,6 +96,10 @@ var ( Name: "bypass-txs-signature", Usage: "This flag is used to bypass the transactions signature verification (by default true)", } + bypassBlocksSignature = cli.BoolTFlag{ + Name: "bypass-blocks-signature", + Usage: "This flag is used to bypass the blocks signature verification (by default true)", + } numValidatorsPerShard = cli.IntFlag{ Name: "num-validators-per-shard", Usage: "This flag is used to specify the number of validators per shard", diff --git a/cmd/chainsimulator/main.go b/cmd/chainsimulator/main.go index 12b9cec..300016b 100644 --- a/cmd/chainsimulator/main.go +++ b/cmd/chainsimulator/main.go @@ -23,6 +23,8 @@ import ( "github.com/multiversx/mx-chain-go/node/chainSimulator/components/api" logger "github.com/multiversx/mx-chain-logger-go" "github.com/multiversx/mx-chain-logger-go/file" + "github.com/urfave/cli" + "github.com/multiversx/mx-chain-simulator-go/config" "github.com/multiversx/mx-chain-simulator-go/pkg/facade" "github.com/multiversx/mx-chain-simulator-go/pkg/factory" @@ -30,7 +32,6 @@ import ( "github.com/multiversx/mx-chain-simulator-go/pkg/proxy/configs" "github.com/multiversx/mx-chain-simulator-go/pkg/proxy/configs/git" "github.com/multiversx/mx-chain-simulator-go/pkg/proxy/creator" - "github.com/urfave/cli" ) const timeToAllowProxyToStart = time.Millisecond * 10 @@ -77,6 +78,7 @@ func main() { roundDurationInMs, supernovaRoundDurationInMs, bypassTransactionsSignature, + bypassBlocksSignature, numValidatorsPerShard, numWaitingValidatorsPerShard, numValidatorsMeta, @@ -142,7 +144,9 @@ func startChainSimulator(ctx *cli.Context) error { } bypassTxsSignature := ctx.GlobalBool(bypassTransactionsSignature.Name) - log.Warn("signature", "bypass", bypassTxsSignature) + log.Debug("signature", "bypass", bypassTxsSignature) + bypassBlocksSignature := ctx.GlobalBool(bypassBlocksSignature.Name) + log.Debug("blocks", "bypass", bypassBlocksSignature) roundDurationInMillis := uint64(cfg.Config.Simulator.RoundDurationInMs) supernovaRoundDurationInMillis := uint64(cfg.Config.Simulator.SupernovaRoundDurationInMs) rounds := core.OptionalUint64{ @@ -201,6 +205,7 @@ func startChainSimulator(ctx *cli.Context) error { var alterConfigsError error argsChainSimulator := chainSimulator.ArgsChainSimulator{ BypassTxSignatureCheck: bypassTxsSignature, + BypassBlockSignatureCheck: bypassBlocksSignature, TempDir: tempDir, PathToInitialConfig: nodeConfigs, NumOfShards: uint32(cfg.Config.Simulator.NumOfShards), diff --git a/go.mod b/go.mod index f3bcbf5..5c348cc 100644 --- a/go.mod +++ b/go.mod @@ -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.2-0.20251022090220-a99e14e45706 - github.com/multiversx/mx-chain-go v1.11.2-0.20251215095623-aaca4d73f477 + github.com/multiversx/mx-chain-go v1.11.2-0.20251216115449-db8b601e9a5a 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 diff --git a/go.sum b/go.sum index 5ad3ad6..249a356 100644 --- a/go.sum +++ b/go.sum @@ -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.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.20251215095623-aaca4d73f477 h1:0q0KCLjYrG4AXKcNIBQnyMrqBcMbx1xRDG4bgcyVLqc= -github.com/multiversx/mx-chain-go v1.11.2-0.20251215095623-aaca4d73f477/go.mod h1:G2LX81y+A75W5EqJod9p4fRAdnp22vpQrB+374pAveQ= +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-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=