Skip to content

Commit

Permalink
Merge pull request #9 from multiversx/new-features-and-improvments
Browse files Browse the repository at this point in the history
Improvements and new features
  • Loading branch information
miiu96 authored Feb 22, 2024
2 parents d178091 + dd04ee0 commit 70f5aee
Show file tree
Hide file tree
Showing 11 changed files with 155 additions and 47 deletions.
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,42 @@ Example:
```


---
### `POST /simulator/add-keys`

This endpoint allows you to add new validator private keys in the multi key handler.

##### Request
- **Method:** POST
- **Path:** `/simulator/add-keys`


##### Request Body
The request body should be a JSON object representing an object with the next format.

Example:
```
{
"privateKeysBase64":[
"ZjVkYjgwZDE1NzE5MDJiN2UzMDNlNDIzOTUzZGU2NTQ4NzBiYzM1MDhmMThkNGRhODgzODk1NTI3ZjcyMjYxYw==",
"ZTVhYTU0NjI0ZmRjNDZkMDdmNDU5ZGZiZDFmNmUxYWZlMTRmN2YyOTY1ZTJiMGJhZjBmMGE0MGQ3ZjYwNDYxYg==",
]
}
```


##### Response
- **Status Codes:**
- `200 OK`: Validator keys were added successfully.
- `404 Bad Request`: Invalid request parameters.

#### Response Body
```json
{
"data": {},
"error": "",
"code": "successful"
}
```


---
Expand Down Expand Up @@ -220,6 +255,8 @@ The **_[config.toml](./cmd/chainsimulator/config/config.toml)_** file:
# round-duration-in-milliseconds parameter specifies the duration of a simulated round. The timestamp between two headers will correspond to the round duration but will not reflect real-time
round-duration-in-milliseconds = 6000
# rounds-per-epoch specifies the number of rounds per epoch
# initial-round when the chain simulator will start
initial-round = 1
rounds-per-epoch = 20
# mx-chain-go-repo will be used to fetch the node configs folder
mx-chain-go-repo = "https://github.com/multiversx/mx-chain-go"
Expand Down
2 changes: 2 additions & 0 deletions cmd/chainsimulator/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
round-duration-in-milliseconds = 6000
# rounds-per-epoch specifies the number of rounds per epoch
rounds-per-epoch = 20
# initial-round when the chain simulator will start
initial-round = 1
# mx-chain-go-repo will be used to fetch the node configs folder
mx-chain-go-repo = "https://github.com/multiversx/mx-chain-go"
# mx-chain-proxy-go-repo will be used to fetch the proxy configs folder
Expand Down
11 changes: 9 additions & 2 deletions cmd/chainsimulator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,15 @@ func startChainSimulator(ctx *cli.Context) error {

startTimeUnix := ctx.GlobalInt64(startTime.Name)
apiConfigurator := api.NewFreePortAPIConfigurator("localhost")

tempDir, err := os.MkdirTemp(os.TempDir(), "")
if err != nil {
return err
}

argsChainSimulator := chainSimulator.ArgsChainSimulator{
BypassTxSignatureCheck: bypassTxsSignature,
TempDir: os.TempDir(),
TempDir: tempDir,
PathToInitialConfig: nodeConfigs,
NumOfShards: uint32(cfg.Config.Simulator.NumOfShards),
GenesisTimestamp: startTimeUnix,
Expand All @@ -148,6 +154,7 @@ func startChainSimulator(ctx *cli.Context) error {
ApiInterface: apiConfigurator,
MinNodesPerShard: uint32(numValidatorsShard),
MetaChainMinNodes: uint32(numValidatorsMetaShard),
InitialRound: int64(cfg.Config.Simulator.InitialRound),
}
simulator, err := chainSimulator.NewChainSimulator(argsChainSimulator)
if err != nil {
Expand All @@ -164,7 +171,7 @@ func startChainSimulator(ctx *cli.Context) error {
metaNode := simulator.GetNodeHandler(core.MetachainShardId)
restApiInterfaces := simulator.GetRestAPIInterfaces()
outputProxyConfigs, err := configs.CreateProxyConfigs(configs.ArgsProxyConfigs{
TemDir: os.TempDir(),
TemDir: tempDir,
PathToProxyConfig: proxyConfigs,
ServerPort: cfg.Config.Simulator.ServerPort,
RestApiInterfaces: restApiInterfaces,
Expand Down
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type Config struct {
NumOfShards int `toml:"num-of-shards"`
RoundsPerEpoch int `toml:"rounds-per-epoch"`
RoundDurationInMs int `toml:"round-duration-in-milliseconds"`
InitialRound int `toml:"initial-round"`
MxChainRepo string `toml:"mx-chain-go-repo"`
MxProxyRepo string `toml:"mx-chain-proxy-go-repo"`
} `toml:"simulator"`
Expand Down
31 changes: 16 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ go 1.20

require (
github.com/gin-gonic/gin v1.9.1
github.com/multiversx/mx-chain-core-go v1.2.18
github.com/multiversx/mx-chain-go v1.6.4-0.20231229113646-14c74cbebec4
github.com/multiversx/mx-chain-logger-go v1.0.13
github.com/multiversx/mx-chain-core-go v1.2.19-0.20240129082057-a76d0c995cf2
github.com/multiversx/mx-chain-go v1.6.16-0.20240212083448-9b5f0ab6cf86
github.com/multiversx/mx-chain-logger-go v1.0.14-0.20240129144507-d00e967c890c
github.com/multiversx/mx-chain-proxy-go v1.1.41
github.com/stretchr/testify v1.8.4
github.com/urfave/cli v1.22.10
)

require (
github.com/TwiN/go-color v1.1.0 // indirect
github.com/beevik/ntp v1.3.0 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand All @@ -24,7 +25,7 @@ require (
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
Expand Down Expand Up @@ -114,15 +115,16 @@ require (
github.com/multiformats/go-multistream v0.4.1 // 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.0.8 // indirect
github.com/multiversx/mx-chain-crypto-go v1.2.9 // indirect
github.com/multiversx/mx-chain-es-indexer-go v1.4.13 // indirect
github.com/multiversx/mx-chain-storage-go v1.0.13 // indirect
github.com/multiversx/mx-chain-vm-common-go v1.5.7 // indirect
github.com/multiversx/mx-chain-vm-go v1.5.19 // indirect
github.com/multiversx/mx-chain-vm-v1_2-go v1.2.61 // indirect
github.com/multiversx/mx-chain-vm-v1_3-go v1.3.62 // indirect
github.com/multiversx/mx-chain-vm-v1_4-go v1.4.90 // indirect
github.com/multiversx/mx-chain-communication-go v1.0.13-0.20240126121117-627adccf10ad // indirect
github.com/multiversx/mx-chain-crypto-go v1.2.10-0.20231206065052-38843c1f1479 // indirect
github.com/multiversx/mx-chain-es-indexer-go v1.4.19-0.20240129150813-a772c480d33a // indirect
github.com/multiversx/mx-chain-scenario-go v1.3.1-0.20240129145446-ca4fba98f6d1 // indirect
github.com/multiversx/mx-chain-storage-go v1.0.15-0.20240129144933-b1c0d642d7f8 // indirect
github.com/multiversx/mx-chain-vm-common-go v1.5.12-0.20240129145149-4fe61574f566 // indirect
github.com/multiversx/mx-chain-vm-go v1.5.27-0.20240129150501-7c828af05c83 // indirect
github.com/multiversx/mx-chain-vm-v1_2-go v1.2.66-0.20240129145751-f814f5525edb // indirect
github.com/multiversx/mx-chain-vm-v1_3-go v1.3.67-0.20240129150004-536a22d9c618 // indirect
github.com/multiversx/mx-chain-vm-v1_4-go v1.4.95-0.20240129150215-43996b664ada // indirect
github.com/multiversx/mx-components-big-int v1.0.0 // indirect
github.com/onsi/ginkgo/v2 v2.11.0 // indirect
github.com/onsi/gomega v1.27.10 // indirect
Expand All @@ -145,9 +147,8 @@ require (
github.com/quic-go/webtransport-go v0.5.3 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/tidwall/gjson v1.14.0 // indirect
Expand Down
60 changes: 32 additions & 28 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/TwiN/go-color v1.1.0 h1:yhLAHgjp2iAxmNjDiVb6Z073NE65yoaPlcki1Q22yyQ=
github.com/TwiN/go-color v1.1.0/go.mod h1:aKVf4e1mD4ai2FtPifkDPP5iyoCwiK08YGzGwerjKo0=
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/beevik/ntp v1.3.0 h1:/w5VhpW5BGKS37vFm1p9oVk/t4HnnkKZAZIubHM6F7Q=
Expand Down Expand Up @@ -68,8 +70,9 @@ github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -390,33 +393,34 @@ 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.0.8 h1:sTx4Vmx+QCpngUFq/LF/Ka8bevlK2vMxfclE284twfc=
github.com/multiversx/mx-chain-communication-go v1.0.8/go.mod h1:+oaUowpq+SqrEmAsMPGwhz44g7L81loWb6AiNQU9Ms4=
github.com/multiversx/mx-chain-core-go v1.2.18 h1:fnub2eFL7XYOLrKKVZAPPsaM1TWEnaK5qqY3FLUv168=
github.com/multiversx/mx-chain-core-go v1.2.18/go.mod h1:BILOGHUOIG5dNNX8cgkzCNfDaVtoYrJRYcPnpxRMH84=
github.com/multiversx/mx-chain-crypto-go v1.2.9 h1:OEfF2kOQrtzUl273Z3DEcshjlTVUfPpJMd0R0SvTrlU=
github.com/multiversx/mx-chain-crypto-go v1.2.9/go.mod h1:fkaWKp1rbQN9wPKya5jeoRyC+c/SyN/NfggreyeBw+8=
github.com/multiversx/mx-chain-es-indexer-go v1.4.13 h1:3Ayaw9bSpeNOF+Z3L/11MN1rIJH8Rc6dqtt+o4Wfdno=
github.com/multiversx/mx-chain-es-indexer-go v1.4.13/go.mod h1:g0REyU8rqJfoBq6mIfqEi6IdpLofECLEvKKGMJO8ZhM=
github.com/multiversx/mx-chain-go v1.6.4-0.20231229113646-14c74cbebec4 h1:z6HrTTfqABcqGOUPlDUfOtEl0VD8kkDoxozbd2btOww=
github.com/multiversx/mx-chain-go v1.6.4-0.20231229113646-14c74cbebec4/go.mod h1:1Vt+2H+Sx0Ig4oElq703pEGHs4cF8Cg59CG6PDtaxig=
github.com/multiversx/mx-chain-logger-go v1.0.13 h1:eru/TETo0MkO4ZTnXsQDKf4PBRpAXmqjT02klNT/JnY=
github.com/multiversx/mx-chain-logger-go v1.0.13/go.mod h1:MZJhTAtZTJxT+yK2EHc4ZW3YOHUc1UdjCD0iahRNBZk=
github.com/multiversx/mx-chain-communication-go v1.0.13-0.20240126121117-627adccf10ad h1:izxTyKCxvT7z2mhXCWAZibSxwRVgLmq/kDovs4Nx/6Y=
github.com/multiversx/mx-chain-communication-go v1.0.13-0.20240126121117-627adccf10ad/go.mod h1:n4E8BWIV0g3AcNGe1gf+vcjUC8A2QCJ4ARQSbiUDGrI=
github.com/multiversx/mx-chain-core-go v1.2.19-0.20240129082057-a76d0c995cf2 h1:pFh9bwOTRgW173aHqA8Bmax+jYzLnRyXqRvi5alF7V4=
github.com/multiversx/mx-chain-core-go v1.2.19-0.20240129082057-a76d0c995cf2/go.mod h1:B5zU4MFyJezmEzCsAHE9YNULmGCm2zbPHvl9hazNxmE=
github.com/multiversx/mx-chain-crypto-go v1.2.10-0.20231206065052-38843c1f1479 h1:beVIhs5ysylwNplQ/bZ0h5DoDlqKNWgpWE/NMHHNmAw=
github.com/multiversx/mx-chain-crypto-go v1.2.10-0.20231206065052-38843c1f1479/go.mod h1:Ap6p7QZFtwPlb++OvCG+85BfuZ+bLP/JtQp6EwjWJsI=
github.com/multiversx/mx-chain-es-indexer-go v1.4.19-0.20240129150813-a772c480d33a h1:mOMUhbsjTq7n5oAv4KkVnL67ngS0+wkqmkiv1XJfBIY=
github.com/multiversx/mx-chain-es-indexer-go v1.4.19-0.20240129150813-a772c480d33a/go.mod h1:3aSGRJNvfUuPQkZUGHWuF11rPPxphsKGuAuIB+eD3is=
github.com/multiversx/mx-chain-go v1.6.16-0.20240212083448-9b5f0ab6cf86 h1:e0mY7Ou1GB952NmCGqR5eWTnN+Kul6NUa2meGSkITUM=
github.com/multiversx/mx-chain-go v1.6.16-0.20240212083448-9b5f0ab6cf86/go.mod h1:yWjiHiKqrQoBsH8PB0WW4sQJQNzt3yTKbEPZG3jnl7k=
github.com/multiversx/mx-chain-logger-go v1.0.14-0.20240129144507-d00e967c890c h1:QIUOn8FgNRa5cir4BCWHZi/Qcr6Gg0eGNhns4+jy6+k=
github.com/multiversx/mx-chain-logger-go v1.0.14-0.20240129144507-d00e967c890c/go.mod h1:fH/fR/GEBsDjPkBoZDVJMoYo2HhlA7++DP6QfITJ1N8=
github.com/multiversx/mx-chain-proxy-go v1.1.41 h1:u5LTek2keNvd25jrOmHLp0N4AFwYFImBnrs+GR7IGRY=
github.com/multiversx/mx-chain-proxy-go v1.1.41/go.mod h1:El07IztR9QuhbNPZkd2ew2H8KS2bUqG7/0eQ28BPPsY=
github.com/multiversx/mx-chain-scenario-go v1.2.1 h1:9eC6VcOEAKRRKZ7EbSWPLzCdNIMWwuNBtAZlgR4cSMA=
github.com/multiversx/mx-chain-storage-go v1.0.13 h1:i41VPDJZ0pn5gf18zTXrac5xeiolUOztNuzL3wEXRuI=
github.com/multiversx/mx-chain-storage-go v1.0.13/go.mod h1:sJ2q49tgjxNpMpsHysjABqCAB0FLBmDblbjBkQ8XfmA=
github.com/multiversx/mx-chain-vm-common-go v1.5.7 h1:GiT2MWG2aCQX59iOk5waB+z7XSLHH7N5xO8b91j6L6s=
github.com/multiversx/mx-chain-vm-common-go v1.5.7/go.mod h1:sqkKMCnwkWl8DURdb9q7pctK8IANghdHY1KJLE0ox2c=
github.com/multiversx/mx-chain-vm-go v1.5.19 h1:3kTYI0+dKgU7XhEy0q5Dnhx2r1schiywpMbOzXiOdds=
github.com/multiversx/mx-chain-vm-go v1.5.19/go.mod h1:uZ4uinTCa2r3UT1WwbGg6yMq5HLeivHnFemmPG/4V+o=
github.com/multiversx/mx-chain-vm-v1_2-go v1.2.61 h1:7c3VRhr5JDu7qs3AkmKQu7DzWGGIoiHfSIMrzw3x5Ao=
github.com/multiversx/mx-chain-vm-v1_2-go v1.2.61/go.mod h1:bQFh+KuUIEBmCfKJ0qVN2+DbRRbAqW0huKfHpiTbyEE=
github.com/multiversx/mx-chain-vm-v1_3-go v1.3.62 h1:rQaWRbrQwrEhSN0ZEQQ0JAbttgi+OrMf/CLziWpRUCA=
github.com/multiversx/mx-chain-vm-v1_3-go v1.3.62/go.mod h1:RJaDHRU9Fk4oGWQH1sUp8soCsfW6FmNfWyhImTg0294=
github.com/multiversx/mx-chain-vm-v1_4-go v1.4.90 h1:tavoUgxPmcs2AjRc9r890FUiNX5ghmsADs2q4ZLWz1Y=
github.com/multiversx/mx-chain-vm-v1_4-go v1.4.90/go.mod h1:ZvI1nJCnfl0xJiTSWK39U2G3oHZIyMPWjlxUw/8NunI=
github.com/multiversx/mx-chain-scenario-go v1.3.1-0.20240129145446-ca4fba98f6d1 h1:hkeHftnhRuJoT5FrfF97gEtb5aY351SWEjZPaTb6D+Y=
github.com/multiversx/mx-chain-scenario-go v1.3.1-0.20240129145446-ca4fba98f6d1/go.mod h1:ndk45i9J9McuCJpTcgiaK4ocd0yhnBBCPrlFwO6GRcs=
github.com/multiversx/mx-chain-storage-go v1.0.15-0.20240129144933-b1c0d642d7f8 h1:/EYv/HGX0OKbeNFt667J0yZRtuJiZH0lEK8YtobuH/c=
github.com/multiversx/mx-chain-storage-go v1.0.15-0.20240129144933-b1c0d642d7f8/go.mod h1:zl1A6teNe39T8yhdZlkX3ckm5aLYrMIJJZ6Ord1E71M=
github.com/multiversx/mx-chain-vm-common-go v1.5.12-0.20240129145149-4fe61574f566 h1:zImJa/r6B5L2OLWbKTn5io53U11PPGDla12H2OaJ9y0=
github.com/multiversx/mx-chain-vm-common-go v1.5.12-0.20240129145149-4fe61574f566/go.mod h1:OUyhCFqZKqUk1uaPsenyPDwO1830SlHNDU7Q7b6CBVI=
github.com/multiversx/mx-chain-vm-go v1.5.27-0.20240129150501-7c828af05c83 h1:G/d9aplnwP/9MrLE3gcANEpGfn5e8ZZufijPv2XVUfw=
github.com/multiversx/mx-chain-vm-go v1.5.27-0.20240129150501-7c828af05c83/go.mod h1:64dTd60QUGWx5W3eU28IOfpqAWApWqB/Z7mJHmuQfXo=
github.com/multiversx/mx-chain-vm-v1_2-go v1.2.66-0.20240129145751-f814f5525edb h1:UtiY8X73llF9OLtGb2CM7Xewae1chvPjLc8B+ZmDLjw=
github.com/multiversx/mx-chain-vm-v1_2-go v1.2.66-0.20240129145751-f814f5525edb/go.mod h1:8uugq3HUeDiE6G4AS3F8/B3zA1Pabzbl7SSD6Cebwz8=
github.com/multiversx/mx-chain-vm-v1_3-go v1.3.67-0.20240129150004-536a22d9c618 h1:1uMlT5TjiHUlx81fEH/WQANWlY0PjF3opMlW+E3L3GI=
github.com/multiversx/mx-chain-vm-v1_3-go v1.3.67-0.20240129150004-536a22d9c618/go.mod h1:4uezxguZiX42kUaYMK/x46LLbgpYqn/iQXbcGM7zdM0=
github.com/multiversx/mx-chain-vm-v1_4-go v1.4.95-0.20240129150215-43996b664ada h1:NZLV2QmNPW+QTefuAhC24sOuGbOsAQEXzfv2CWoRJKc=
github.com/multiversx/mx-chain-vm-v1_4-go v1.4.95-0.20240129150215-43996b664ada/go.mod h1:tCjtWeBEZCfjEjlBcgLIRDGJbVmdV8dsmG6ydtiUtSo=
github.com/multiversx/mx-components-big-int v1.0.0 h1:Wkr8lSzK2nDqixOrrBa47VNuqdhV1m/aJhaP1EMaiS8=
github.com/multiversx/mx-components-big-int v1.0.0/go.mod h1:maIEMgHlNE2u78JaDD0oLzri+ShgU4okHfzP3LWGdQM=
github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=
Expand Down Expand Up @@ -493,8 +497,9 @@ github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6po
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
Expand All @@ -519,7 +524,6 @@ github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b
github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ=
github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk=
github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4=
github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=
Expand Down
6 changes: 6 additions & 0 deletions pkg/dtos/validators.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package dtos

// ValidatorKeys is the dto for the validators private key structure
type ValidatorKeys struct {
PrivateKeysBase64 []string `json:"privateKeysBase64"`
}
1 change: 1 addition & 0 deletions pkg/facade/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ type SimulatorHandler interface {
GenerateBlocks(numOfBlocks int) error
SetKeyValueForAddress(address string, keyValueMap map[string]string) error
SetStateMultiple(stateSlice []*dtos.AddressState) error
AddValidatorKeys(validatorsPrivateKeys [][]byte) error
IsInterfaceNil() bool
}
Loading

0 comments on commit 70f5aee

Please sign in to comment.