Skip to content

iotaledger/evil-tools

Repository files navigation

evil-tools

Evil tools

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

The evil-tools app has three applications:

  • spammer - to spam the network with transactions, nested conflicts, etc.
  • accounts - to create, convert and destroy accounts.
  • info - to print details about the network, accounts, delegations, etc. List of all possible flags can be found in configuration.md

Setup

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

  • --tool.nodeURLs - the list of URLs of the nodes in the network
  • --tool.faucetURL - the URL of the faucet in the network
  • --tool.blockIssuerPrivateKey - the private key of the existing block issuer account, best some account created in the genesis. Spammer will mostly use mana from this account to pay for the issuance.
  • --tools.accountID - the corresponding account ID of the existing block issuer account.

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.

  • --tools.faucetRequestsBlockIssuerPrivateKey - the private key of the existing block issuer account. It will be used for the faucet funds creation.
  • --tools.faucetRequestsAccountID - the corresponding account ID of the existing block issuer account for the faucet funds splitting.

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-tx

Single transaction

  • peace

Peace

  • bb - blow ball structure
Conflicts
  • ds

Double spend

  • conflict-circle

Conflict circle

  • guava

Guava

  • orange

Orange

  • mango

Mango

  • pear

Pear

  • lemon

Lemon

  • banana

Banana

  • kiwi

Kiwi

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages