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

block-generator: Improve payment algorithm to allow sending many more transactions. #864

Merged
merged 9 commits into from
Feb 9, 2022

Conversation

winder
Copy link
Contributor

@winder winder commented Feb 3, 2022

Summary

Update the block-generator payment algorithm to cycle through accounts if the genesis account runs out of algos.

Test Plan

Accounts were running out of algos during a 1hr run of the jumbo payment scenario, now it isn't.

@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2022

Codecov Report

Merging #864 (6f97710) into develop (455ef3e) will decrease coverage by 0.40%.
The diff coverage is 62.50%.

❗ Current head 6f97710 differs from pull request most recent head 1618543. Consider uploading reports for the commit 1618543 to get more accurate results

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #864      +/-   ##
===========================================
- Coverage    58.93%   58.53%   -0.41%     
===========================================
  Files           36       37       +1     
  Lines         4374     4406      +32     
===========================================
+ Hits          2578     2579       +1     
- Misses        1483     1514      +31     
  Partials       313      313              
Impacted Files Coverage Δ
cmd/block-generator/generator/generate.go 58.87% <62.50%> (+0.11%) ⬆️
util/diff.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 455ef3e...1618543. Read the comment docs.

shiqizng
shiqizng previously approved these changes Feb 4, 2022
cmd/block-generator/generator/generate.go Outdated Show resolved Hide resolved
@tolikzinovyev
Copy link
Contributor

Are you using a config with genesis_account_balance = 10^15? With that number assuming 10K TPS, accounts shouldn't run out of money at least for one day. Also, I'd rather decrease the payment amount; it's simpler and doesn't change the nature of transactions.

@winder
Copy link
Contributor Author

winder commented Feb 4, 2022

Are you using a config with genesis_account_balance = 10^15? With that number assuming 10K TPS, accounts shouldn't run out of money at least for one day. Also, I'd rather decrease the payment amount; it's simpler and doesn't change the nature of transactions.

Good call, I wanted to make sure new accounts got extra algod but didn't consider reducing the amount for the other transactions.

I think you already updated the genesis account balance.

@tolikzinovyev
Copy link
Contributor

Are you using a config with genesis_account_balance = 10^15? With that number assuming 10K TPS, accounts shouldn't run out of money at least for one day. Also, I'd rather decrease the payment amount; it's simpler and doesn't change the nature of transactions.

Good call, I wanted to make sure new accounts got extra algod but didn't consider reducing the amount for the other transactions.

I think you already updated the genesis account balance.

I did update it, but are you sure you are not using a custom config?

cmd/block-generator/generator/generate.go Outdated Show resolved Hide resolved
cmd/block-generator/generator/generate.go Outdated Show resolved Hide resolved
cmd/block-generator/generator/generate.go Outdated Show resolved Hide resolved
cmd/block-generator/generator/generate.go Outdated Show resolved Hide resolved
cmd/block-generator/generator/generate.go Outdated Show resolved Hide resolved
@winder winder force-pushed the will/generate-more-payments branch from c043dec to e8cf359 Compare February 7, 2022 21:29
@winder winder merged commit 621a4ee into develop Feb 9, 2022
@winder winder deleted the will/generate-more-payments branch February 9, 2022 14:26
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.

None yet

4 participants