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

Voting bot for stake off #1477

Closed
4 of 5 tasks
timmoreton opened this issue Oct 24, 2019 · 6 comments · Fixed by #2327
Closed
4 of 5 tasks

Voting bot for stake off #1477

timmoreton opened this issue Oct 24, 2019 · 6 comments · Fixed by #2327
Assignees
Labels
protocol All issues relating to protocol packages stake-off-bubble Issues under the Stake Off Engineering Bubble

Comments

@timmoreton
Copy link
Contributor

timmoreton commented Oct 24, 2019

Expected Behavior

We would like a number of instances of a voting bot to run in a testnet. For simplicity, we could extend the load testing client to do this for us (see celo-monorepo/packages/celotool/src/cmds/geth/simulate_client.ts )

  • lock up gold initially (maybe in the migrations?)
  • wake up at a random interval
  • with a given probability, do nothing, otherwise evaluate whether to change vote
  • implement a strategy that picks the group that can receive votes AND has highest recent rewards
  • add some degree of randomness to it: with certain probability pick a random group

@rcroessmann and @asaj will have ideas based on their recent simulation.

Current Behavior

Rely on external users to vote.

@timmoreton timmoreton added protocol All issues relating to protocol packages stake-off-bubble Issues under the Stake Off Engineering Bubble labels Oct 24, 2019
@yerdua
Copy link
Contributor

yerdua commented Dec 5, 2019

The load test client appears to be a thing that we run on-demand, and this sounds like something we want running continuously for the duration of the stake off. That difference makes me think they shouldn't be combined, and the voting bot should be a standalone thing.

Especially if we want gold to be locked up in migrations, the account(s) used by the voting bot will need to be funded in the genesis block. How much gold is an appropriate amount?

Roughly how many bots do we want running?

cc: @asaj @rcroessmann

@timmoreton
Copy link
Contributor Author

@timmoreton
Copy link
Contributor Author

They get a configurable amount of CG each, currently 1000 CG.

@timmoreton
Copy link
Contributor Author

I think we run the load test continuously to generate constant background tx load @tkporter ? feels like the simplest place to add support for voting as it already has funds and the infra is already in place.

@tkporter
Copy link
Contributor

tkporter commented Dec 5, 2019

The way load test clients work is each pod is constantly running with 1 container running an ultralight client with an unlocked account and 1 container running celotooljs geth simulate-client ..... that creates transactions every few seconds. We could maybe add another container to the pod that runs a separate celotool command that votes every once in a while (we could even make this conditional using a helm template).

Just to verify, the nonce should be set by the ultralight client & not contractkit, so we shouldn't run into conflicting nonce issues by having 2 separate containers send a transaction simultaneously, right?

@yerdua
Copy link
Contributor

yerdua commented Dec 6, 2019

Oh cool! Thanks for the info. If the plan is to have these load test clients running for the duration of the stake off, it seems fine to have them do the voting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol All issues relating to protocol packages stake-off-bubble Issues under the Stake Off Engineering Bubble
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants