iotaledger / evil-tools

Apache License 2.0
2 stars 1 forks source link

evil-tools

Evil tools

go build
./evil-tools [spammer,accounts] [[script-flag-set]]

The evil-tools app has three applications:

Setup

To run the evil spammer tool on a network different than the local docker network, remember to provide:

Optionally you can provide separate private key and accountID for faucet requests, to make sure that funds requesting will not be interrupted by congestion caused by the spammer. If not provided spammer will use --tool.blockIssuerPrivateKey and --tools.AccountID. faucet requesting does not require mana, but the spammer is dividing an output from the single faucet request up to many more, to speed up the process, so mana is needed to pay for the split transactions.

spammer

Usage for spammer tool: ./evil-tools spammer [FLAGS]

Possible spam scenarios: blk, tx, peace, bb, ds, conflict-circle, guava ,orange, mango, pear, lemon, banana, kiwi

accounts

Usage for accounts tool: ./evil-tools accounts [COMMAND] [FLAGS]

Possible commands: create, convert, destroy, allot

Examples for the spammer

Possible Spam with scenario tx

./evil-tools spammer --spammer.type tx --spammer.rate 10 --spammer.duration 100s

Infinite spam is enabled when no duration flag is provided.

./evil-tools spammer --spammer.type tx --spammer.rate 10

You can provide urls for clients and the faucet, each client should run the inx-indexer:

./evil-tools spammer --tool.nodeURLs "http://localhost:8050" --tool.faucetURL  "http://localhost:8088" --spammer.type tx --spammer.rate 10

Enable deep spam:

./evil-tools spammer --spammer.type tx --spammer.rate 10 --spammer.duration 100s --spammer.deepSpamEnabled

Spam with the account created by the evil-tools app:

./evil-tools spammer --spammer.type tx --spammer.rate 10 --spammer.duration 100s --spammer.accountAlias A

Examples for the accounts

Create implicit account with alias A:

./evil-tools accounts create --accounts.create.alias A --accounts.create.implicit

Create account with genesis account paying for creation transaction:

./evil-tools accounts create --accounts.create.alias A

Delegate 1000 tokens (requested from the Faucet) and store it under alias A:

./evil-tools accounts delegate --accounts.delegate.fromAlias A --accounts.delegate.amount 100000

Allot at least amount of mana to the account with alias A:

./evil-tools accounts allot --accounts.allot.alias A --accounts.allot.amount 100000

Claim all rewards under alias A:

./evil-tools accounts claim --accounts.claim.alias A

Examples for printing tool details and info about the network

List all accounts stored in the wallet.dat file of the evil-tools app:

./evil-tools info accounts

List all delegations done with the evil-tools app to be claimed:

./evil-tools info delegations

Request validators endpoint:

./evil-tools info validators

Request committee endpoint:

./evil-tools info committee

List rewards endpoint responses for all delegations done by the app:

./evil-tools info rewards

Scenario diagrams:

No conflicts

Single transaction

Peace

Conflicts

Double spend

Conflict circle

Guava

Orange

Mango

Pear

Lemon

Banana

Kiwi