Various improvements coming out of stress testing #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created a simple stress testing tool which can submit a large number of vote requests across all active polls on the network. It takes a start and end derivation index, and uses a base mnemonic secret phrase to create a large number of accounts. The only manual process is assigning tokens with the faucet. The tool invokes the client via its command line interface. This required moving all of the client logic from its
main.rs
intolib.rs
. The verification logic was moved into its own file.The following improvements were made as a result:
subscan
by retrying afterRetry-After
seconds (if the header is present)429 Too Many Requests
status code on/vote
and/remove-vote
if the DynamoDB operation errors withProvisionedThroughputExceededException
orRequestLimitExceeded
. The client has been updated with retry logic to deal with this.subscan
to retrieve extrinsic sender account when determining the voters for a poll (which is done to check for clients voting outside of Glove), instead of using thesystem
BlockHash
storage. Node endpoint services (or at least some of them) seem to be discarding blocks after a certain amount of time and can't be relied upon for this.The
node_endpoint
field from/info
has also been removed. Some endpoint services require an API key, which would be part of the URL, and thus having the endpoint in/info
would be leaking it. Clients can pick their own endpoint using thenetwork_name
field.