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

tools: pingpong improvements #4294

Merged
merged 12 commits into from
Sep 9, 2022
Merged

Conversation

brianolson
Copy link
Contributor

Summary

can configure one pingpong to deliver a weighted mix of traffic
libgoal can optionally keep cache of SuggestedParams so that it doesn't query before every construct-txn
pingpong can use deterministic accounts that are reusable across pingpong runs
deterministic account code by @cce

Test Plan

pingpong is a test tool I have been using to test algod private networks

can configure one pingpong to deliver a weighted mix of traffic
libgoal can optionally keep cache of SuggestedParams so that it doesn't query before every construct-txn
pingpong can use deterministic accounts that are reusable across pingpong runs
@brianolson brianolson requested review from cce and egieseke July 25, 2022 18:14
@brianolson brianolson self-assigned this Jul 25, 2022
@brianolson brianolson changed the title pingpong improvements tools: pingpong improvements Jul 25, 2022
@brianolson brianolson marked this pull request as ready for review August 23, 2022 18:50
@codecov
Copy link

codecov bot commented Aug 23, 2022

Codecov Report

Merging #4294 (6bba3b6) into master (e83acec) will decrease coverage by 1.25%.
The diff coverage is 2.45%.

@@            Coverage Diff             @@
##           master    #4294      +/-   ##
==========================================
- Coverage   55.25%   54.00%   -1.26%     
==========================================
  Files         398      401       +3     
  Lines       50297    51467    +1170     
==========================================
+ Hits        27793    27795       +2     
- Misses      20171    21336    +1165     
- Partials     2333     2336       +3     
Impacted Files Coverage Δ
libgoal/libgoal.go 2.67% <0.00%> (-0.04%) ⬇️
libgoal/transactions.go 0.00% <0.00%> (ø)
shared/pingpong/config.go 0.00% <0.00%> (ø)
shared/pingpong/pingpong.go 0.00% <0.00%> (ø)
shared/pingpong/accounts.go 3.41% <6.47%> (ø)
ledger/voters.go 68.65% <0.00%> (-4.48%) ⬇️
network/wsPeer.go 65.47% <0.00%> (-3.02%) ⬇️
ledger/blockqueue.go 85.63% <0.00%> (-2.88%) ⬇️
ledger/acctonline.go 77.60% <0.00%> (-0.53%) ⬇️
catchup/service.go 68.39% <0.00%> (-0.50%) ⬇️
... and 6 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@egieseke egieseke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the preconfigured accounts have their balances automatically adjusted?

runCmd.Flags().Int64Var(&randSeed, "seed", 0, "input to math/rand.Seed(), defaults to time.Now().UnixNano()")
runCmd.Flags().BoolVar(&deterministicKeys, "deterministicKeys", false, "Draw from set of netgoal-created accounts using deterministic keys")
runCmd.Flags().Uint32Var(&generatedAccountsCount, "genaccounts", 0, "The total number of accounts pre-generated by netgoal")
runCmd.Flags().StringVar(&generatedAccountSampleMethod, "gensamplemethod", "random", "The method of sampling from the total # of pre-generated accounts")
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the pre-generated accounts get automatically topped off from a source account?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's code to make low balance accounts the destination of natural traffic, so they'll tend to refill.

@@ -90,6 +111,8 @@ var DefaultConfig = PpConfig{
Rekey: false,
MaxRuntime: 0,

ProgramProbability: 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The probability of using a LogicSig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants