Skip to content

Conversation

@algoidurovic
Copy link
Contributor

@algoidurovic algoidurovic commented Sep 30, 2022

Summary

This PR intends to fix the following issues in PingPong's pps.prepareApps():

  • pps.cinfo.AppParams is used in multiples places (ex. terminating from the app creation loop and appID access in the opt in loop) where its contents lag behind what the code expects. The solution is to either block until there are no longer apps pending creation and then update AppParams or remove the reference to AppParams entirely.
  • The app creation loop only allows for one app per account, meaning PingPong won't support more apps than accounts.

Test Plan

Tested on local Algorand network.

@codecov
Copy link

codecov bot commented Sep 30, 2022

Codecov Report

Merging #4613 (a819bb3) into master (5be155b) will increase coverage by 0.04%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #4613      +/-   ##
==========================================
+ Coverage   54.20%   54.25%   +0.04%     
==========================================
  Files         402      402              
  Lines       51830    51849      +19     
==========================================
+ Hits        28096    28130      +34     
+ Misses      21370    21358      -12     
+ Partials     2364     2361       -3     
Impacted Files Coverage Δ
shared/pingpong/accounts.go 3.27% <0.00%> (-0.14%) ⬇️
crypto/merkletrie/trie.go 66.42% <0.00%> (-2.19%) ⬇️
crypto/merkletrie/node.go 91.62% <0.00%> (-1.87%) ⬇️
network/wsNetwork.go 64.63% <0.00%> (-0.20%) ⬇️
ledger/catchpointtracker.go 62.89% <0.00%> (ø)
ledger/accountdb.go 73.03% <0.00%> (+0.15%) ⬆️
catchup/service.go 69.38% <0.00%> (+0.49%) ⬆️
ledger/acctonline.go 78.64% <0.00%> (+0.52%) ⬆️
ledger/acctupdates.go 70.19% <0.00%> (+0.59%) ⬆️
agreement/proposalManager.go 98.03% <0.00%> (+1.96%) ⬆️
... and 4 more

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

@algoidurovic algoidurovic changed the title Fix lagging cinfo.AppParams data structure in PingPong tools: fix lagging cinfo.AppParams data structure in PingPong Sep 30, 2022
@algoidurovic algoidurovic marked this pull request as ready for review September 30, 2022 18:06
pps.schedule(len(txgroup))
err = pps.sendAsGroup(txgroup, client, senders)
appsPerAddr := make(map[string]int)
totalAppCnt := 0
Copy link
Contributor

Choose a reason for hiding this comment

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

This loses the possibility that accounts with apps already exist. One of the big changes in my recent pingpong hacking was that we can now have stable accounts and apps and assets that exist over multiple invocations of pingpong. Maybe existingAppCnt := len(pps.cinfo.AppParams) and then loop while newAppCnt + existingAppCnt < pps.cfg.NumApp

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah got it. That explains a few things I was confused about, like why some failing pingpong invocations worked on subsequent runs. Your suggestion makes sense.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants