iotaledger / goshimmer

Prototype implementation of IOTA 2.0
https://wiki.iota.org/goshimmer/welcome
Apache License 2.0
389 stars 114 forks source link

enablePlugins ["spammer"] in config.json no taken into account by -c config #796

Closed santiagorr closed 3 years ago

santiagorr commented 3 years ago

Testing a local goshimmer network, I am unable to enable spammer using this in config.json:

...
  "node": {
    "disablePlugins": [],
    "enablePlugins": ["syncbeaconfollower,spammer"]
  },
...

After running ./goshimmer -c config, I see this in stdout:

2020-10-15T13:02:27Z    INFO    Node    node/node.go:86 Skipping Plugin: Spammer

and I got this when trying to start the spammer:

curl -X GET -H 'Content-Type:application/json' -H 'X-IOTA-API-Version:1' 'http://127.0.0.1:8080/spammer?cmd=start&tps=1000'
{"message":"Not Found"}

I have to manually run ./goshimmer -c config --node.enablePlugins=syncbeaconfollower,spammer so:

2020-10-15T13:34:12Z    INFO    Node    node/node.go:117        Starting Plugin: Spammer ... done 
$ curl -X GET -H 'Content-Type:application/json' -H 'X-IOTA-API-Version:1' 'http://127.0.0.1:8080/spammer?cmd=start&tps=1000'
{"message":"started spamming messages","error":""}

(I don't see the spamming messages in the dashboard, but I suppose that's another story)

Hardware specification

What hardware are you using?

capossele commented 3 years ago

Have you tried defining the plugins you want to enable like this?

...
  "node": {
    "disablePlugins": [],
    "enablePlugins": ["syncbeaconfollower","spammer"]
  },
...

Regarding the spam request, you need to define mpm (message per minute) rather than mps since currently we have a very high PoW difficulty in the official Pollen testnet.

santiagorr commented 3 years ago

That works, thanks. I thought I have already tried that, but it seems I was wrong.