Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction load generation client #750

Open
Tracked by #14566
cwgoes opened this issue Mar 30, 2018 · 6 comments · May be fixed by #22778
Open
Tracked by #14566

Transaction load generation client #750

cwgoes opened this issue Mar 30, 2018 · 6 comments · May be fixed by #22778
Labels
T: Performance Performance improvements T: Tests tooling dev tooling within the sdk

Comments

@cwgoes
Copy link
Contributor

cwgoes commented Mar 30, 2018

An underappreciated requirement of peer-to-peer blockchain client implementations is high resistance to DoS attacks. These are not exploits targeting the consensus ruleset, just malicious nodes spamming expensive-to-reject transactions to slow other clients down, and possibly to attempt network partition attacks (which may be of particular concern due to Tendermint's requirement of a 2/3 stake-weighted quorum for liveness). See e.g. this Bitcoin wiki page for a list of the DoS mitigation techniques used by Bitcoin Core.

Any user of the Cosmos SDK will need to ensure that their application does not perform expensive transaction validations that can be repeatedly invoked by another node. The SDK will need to work in cooperation with Tendermint to detect peers spamming invalid transactions (which may or may not be intentional - could be an automated script gone awry) and ban them after appropriate thresholds.

One way to make this an easier property for SDK users to ensure would be to implement a simple "attack client" - a Cosmos SDK application with methods to construct and repeatedly send transactions, which SDK users can fork, add details for their application's additional transaction types, then use to simulate a malicious node and ensure their application handles the attacks gracefully.

@jackzampolin
Copy link
Member

I think this is a GREAT idea. Could some of the code we use for test transaction generation be repurposed for the attack client? This is also a good project we could get third party developers to help with!

@cwgoes
Copy link
Contributor Author

cwgoes commented Oct 12, 2018

This is also a good project we could get third party developers to help with!

Yes, this is an ideal case for third-party work as we'd prefer someone look for the best way to attack the code from an outside perspective.

@jackzampolin jackzampolin changed the title Proposal: DoS prevention discussion, generic attack client Transaction load generation client May 28, 2019
@jackzampolin
Copy link
Member

I think @thanethomson is working on something like this for tendermint. Maybe the work would be generalizable for the SDK?

@thanethomson
Copy link
Contributor

Yeah! I've been working on a distributed load testing tool called tm-load-test. The idea's that one would eventually be able to write a relatively generic load testing client, define some configuration, and work out one's deployment strategy and then have the load testing framework manage the interaction between clients and nodes.

I'd consider it alpha-quality software right now, but I'm actively working on it. More eyes on it would also help make it better 😁

@jackzampolin
Copy link
Member

@thanethomson Do you think you could implement the SDK state machine as well as just the KV store one? That would be huge!

@thanethomson
Copy link
Contributor

Do you think you could implement the SDK state machine as well as just the KV store one? That would be huge!

If I've got time in the coming week or two I can look into it and see what it'll take to build one for the SDK 👍

@jackzampolin jackzampolin added this to the v0.38.0 milestone Sep 5, 2019
@alexanderbez alexanderbez mentioned this issue Oct 11, 2019
4 tasks
@alexanderbez alexanderbez removed this from the v0.38.0 milestone Nov 30, 2019
@tac0turtle tac0turtle added the tooling dev tooling within the sdk label Oct 2, 2022
@odeke-em odeke-em self-assigned this Oct 21, 2022
@odeke-em odeke-em added the S:orijtech Squad: OrijTech label Oct 21, 2022
@tac0turtle tac0turtle mentioned this issue Jan 10, 2023
6 tasks
@julienrbrt julienrbrt removed the S:orijtech Squad: OrijTech label Oct 1, 2024
@tac0turtle tac0turtle linked a pull request Dec 12, 2024 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Performance Performance improvements T: Tests tooling dev tooling within the sdk
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants