keep-ecdsa icon indicating copy to clipboard operation
keep-ecdsa copied to clipboard

System Tests: Client

Open nkuba opened this issue 5 years ago • 9 comments

Client Configuration

Start client with:

  • [x] valid configuration

    • Client starts successfully.
  • [x] missing config file

    • Client fails to start.
  • [x] config file in default location

    • Client starts successfully.
  • [x] config file in custom location

    • Client starts successfully.
  • [x] invalid formatted config file

    • Client fails to start.
  • [x] invalid ETH URL

    • Client fails to start.
  • [x] invalid ETH URLRPC

    • Client fails to start.
  • [x] missing ethereum key file

    • Client fails to start.
  • [x] invalid ethereum key file

    • Client fails to start.
  • [x] no ethereum password environment variable provided

    • Client fails to start.
  • [x] incorrect ethereum password environment variable provided

    • Client fails to start.
  • [x] after some keeps are open restart client with incorrect ethereum password

    • Client fails to start.
  • [x] missing BondedECDSAKeepFactory contract address

    • Client fails to start.
  • [x] BondedECDSAKeepFactory contract address of other contract which is not the factory

    • Client starts successfully but doesn't get any events from the factory.
  • [x] BondedECDSAKeepFactory contract address of old factory

    • Client starts successfully and gets events from the old factory.
  • [x] invalid sanctioned application ethereum address

    • Client fails to start.
  • [x] not registered sanctioned application address

    • Client fails to start.
  • [x] one sanctioned application address

    • Client starts successfully.
  • [x] missing storage path

  • [x] storage path where last directory doesn't exist

    • Existing path /home/keep/storage, provided path: /home/keep/storage/client-1

    • Client fails to start.

  • [x] storage path where current and archive directories don't exist

    • Existing path /home/keep/storage/client-1, provided path: /home/keep/storage/client-1

    • Client starts, directories get created:

      • /home/keep/storage/client-1/current
    • /home/keep/storage/client-1/archive

  • [x] storage path already containing some keep data

    • current and archive directories already contain some keep data

    • Client starts preserving the data and reading keeps from current directory.

  • [x] empty LibP2P peers list

    • Client starts successfully, but doesn't establish connection to any peers.
  • [x] address where LibP2P peer is not working

    • Client starts successfully, but doesn't establish connection the peer.
  • [x] one LibP2P peer address

    • Client starts successfully, establishes connection to the peer and discovers other peers.
  • [x] LibP2P peer that is running different client version

    • Case is not supported but it should not break the network.
  • [x] multiple peer addresses

    • Client starts successfully, establishes connection to the peers and discovers other peers.
  • [x] multiple peer addresses where one is not working

    • Client starts successfully, establishes connection to the peers and discovers other peers.
  • [x] LibP2P port that is already in use

    • Client fails to start.
  • [x] LibP2P port behind firewall for in traffic

    • Client starts successfully, but doesn't establish connection peers.
  • [x] LibP2P port behind firewall for in/out traffic

    • Client starts successfully, but doesn't establish connection peers.
  • [x] LibP2P port behind firewall for out traffic

    • Client starts successfully, but doesn't establish connection peers.
  • [x] LibP2P announced address not provided

    • Client starts successfully with a default address settings, establishes connection to peers.
  • [x] LibP2P announced incorrect address provided

    • Client starts successfully with a default address settings, establishes connection to peers.
  • [x] LibP2P announced address dns4 provided

    • Client starts successfully with the specified address, establishes connection to peers.
  • [x] LibP2P announced address ip4 provided

    • Client starts successfully with the specified address, establishes connection to peers.
  • [x] LibP2P announced address dns4 + ip4 provided

    • Client starts successfully with the specified address, establishes connection to peers.

Multiple Clients

  • [x] Run min number of clients

    • Run 1 client, open new keep and request a signature :x: - https://github.com/keep-network/keep-ecdsa/issues/392
  • [ ] Run n clients

    • Run clients, open new keeps and request signatures

    • [x] n # 10

    • [ ] n # 100

    • [ ] n # 1000

  • [x] New nodes joining continuously and are getting picked for new groups randomly

    • Nodes discovering all other peers by the bootstrap peers specified in the config
  • [ ] Run two groups of clients supporting one address of BondedECDSAKeepFactory and the second group supporting another address of BondedECDSAKeepFactory. Submit some open keep and sign requests to both factory contracts.

    • Client should handle requests correctly.

nkuba avatar Apr 10 '20 09:04 nkuba

BondedECDSAKeepFactory contract address of other contract which is not the factory

  • Client starts successfully but doesn't get any events from the factory.

Client didn't start and was aborted because of the critical error.

dimpar avatar Apr 10 '20 16:04 dimpar

BondedECDSAKeepFactory contract address of other contract which is not the factory

  • Client starts successfully but doesn't get any events from the factory.

Client didn't start and was aborted because of the critical error.

I think this is even better and is really expected as the client cannot check the minimum stake condition on the factory.

pdyraga avatar Apr 10 '20 16:04 pdyraga

not registered sanctioned application address Client fails to start.

It didn't fail, instead a Warning:

operator is not eligible for application [0xdD92d9aaBa9b97E4BC0989e9e0f8f498cdA61183] registration.go:133

dimpar avatar Apr 10 '20 16:04 dimpar

LibP2P port that is already in use Client fails to start.

Client didn't fail to start, but wasn't connected to other peers

dimpar avatar Apr 13 '20 09:04 dimpar

  • LibP2P port behind firewall for in traffic Client starts successfully, but doesn't establish connection peers.

Correct

  • LibP2P port behind firewall for in/out traffic Client starts successfully, but doesn't establish connection peers.

Won't start because can't connect to ropsten.infura

  • LibP2P port behind firewall for out traffic Client starts successfully, but doesn't establish connection peers.

Failed to connect to ethereum node. Won't connect to ropsten.infura

Tested on external machine which was setup by @nkuba

dimpar avatar Apr 13 '20 10:04 dimpar

not registered sanctioned application address Client fails to start

Client will start, but will be waiting to register a member candidate for application

dimpar avatar Apr 13 '20 11:04 dimpar

  • invalid ETH URLRPC Client fails to start

Client started because it used URL. When should we observe URLRPC error?

dimpar avatar Apr 13 '20 12:04 dimpar

  • Run min number of clients Run 1 client, open new keep and request a signature ❌

Observed:

16:12:22.585 ERROR keep-ecdsa: failed to generate threshold signer: [group should have at least 2 members but got: [1]]

lukasz-zimnoch avatar Apr 15 '20 14:04 lukasz-zimnoch

@lukasz-zimnoch it's reported in https://github.com/keep-network/keep-ecdsa/issues/392.

nkuba avatar Apr 16 '20 14:04 nkuba