-
Notifications
You must be signed in to change notification settings - Fork 493
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
Fixes to peer selector and TestBasicCatchpointCatchup #2285
Fixes to peer selector and TestBasicCatchpointCatchup #2285
Conversation
peerSelector.go: various bug fixes - introduce peerSelectorPeer to wrap the network.Peer and add peerClass information, to be able to distinguish between peers of the same address but different classes. - keep track of download failures to be able to increase the cost of each failure when failing more than succeeding. This is to evict the peer faster when constantly failing to download. - initialize rankSum and rankSamples to initialRank of the class. Otherwise, the peer rank will have a very long warmup time before relfecting the correct rank. - let resetRequestPenalty bound the rank within the class bounds. Otherwise, the penalty calculation pushes the rank out of the class bounds (bug). - getNextPeer is local to the package - getNextPeer, PeerDownloadDurationToRank and RankPeer use peerSelectorPeer instead of network.Peer - refreshAvailablePeers distinguishes between peers with the same address but of different peer class - findPeer returns the peer given the address and the peer class (instead of just the address) catchpointCatchup_test.go: - Remove comment about giving the second node all the stake, since it is not the case here. - Use the round from the catchpoint instead of guessing the round as 36. In case the following catchpoint was obtained due to race conditions, checking for round 37 will be trivial, since it will also be obtained from the catchpoint. catchpointService.go and service.go: - Update the code to use peerSelectorPeer instead of network.Peer with peerSelector peerSelector_test.go: - Update the tests to use peerSelectorPeer instead of network.Peer with peerSelector - Cleanup debugging printouts.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2285 +/- ##
==========================================
- Coverage 46.72% 46.71% -0.01%
==========================================
Files 344 344
Lines 55254 55267 +13
==========================================
+ Hits 25818 25820 +2
- Misses 26506 26512 +6
- Partials 2930 2935 +5 ☔ View full report in Codecov by Sentry. |
// the lowest rank value. Given that the peers are grouped by their ranks, allow us to | ||
// prioritize peers based on their class and/or performance. | ||
func (ps *peerSelector) GetNextPeer() (peer network.Peer, err error) { | ||
func (ps *peerSelector) getNextPeer() (psp *peerSelectorPeer, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that my preference here would to keep it with lower-case, as it's not being exported outside the scope of this package. ( we have plenty of components that do.. and it's a good marker for when we need to be more careful around interfaces )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good. But I wonder, is there a missing test for the case when a peer exists in multiple classes?
Yes. catchup/peerSelector_test.go line 431. |
…cCatchpointCatchup <!-- Thanks for submitting a pull request! We appreciate the time and effort you spent to get this far. If you haven't already, please make sure that you've reviewed the CONTRIBUTING guide: https://github.com/algorand/go-algorand/blob/master/CONTRIBUTING.md#code-guidelines In particular ensure that you've run the following: * make generate * make sanity (which runs make fmt, make lint, make fix and make vet) It is also a good idea to run tests: * make test * make integration --> ## Summary peerSelector.go: various bug fixes - introduce peerSelectorPeer to wrap the network.Peer and add peerClass information, to be able to distinguish between peers of the same address but different classes. - keep track of download failures to be able to exponentially increase the cost of each failure when failing more than succeeding. This is to evict the peer faster when constantly failing to download. - initialize rankSum and rankSamples to initialRank of the class. Otherwise, the peer rank will have a very long warmup time before relfecting the correct rank. - let resetRequestPenalty bound the rank within the class bounds. Otherwise, the penalty calculation pushes the rank out of the class bounds (bug). - getNextPeer, rankPeer, and peerDownloadDurationToRank are local to the package, since they are using non-exported peerSelectorPeer - getNextPeer, PeerDownloadDurationToRank and RankPeer use peerSelectorPeer instead of network.Peer - refreshAvailablePeers distinguishes between peers with the same address but of different peer class - findPeer returns the peer given the address and the peer class (instead of just the address) catchpointCatchup_test.go: - Remove comment about giving the second node all the stake, since it is not the case here. - Use the round from the catchpoint instead of guessing the round as 36. In case the following catchpoint was obtained due to race conditions, checking for round 37 will be trivial, since it will also be obtained from the catchpoint. catchpointService.go and service.go: - Update the code to use peerSelectorPeer instead of network.Peer with peerSelector peerSelector_test.go: - Add new tests to check the peerSelector fixes in this PR - Update the tests to use peerSelectorPeer instead of network.Peer with peerSelector - Cleanup debugging printouts. <!-- Explain the goal of this change and what problem it is solving. Format this cleanly so that it may be used for a commit message, as your changes will be squash-merged. --> ## Test Plan Added tests to confirm the fixes. - TestClassUpperBound - TestClassLowerBound - TestEvictionAndUpgrade <!-- How did you test these changes? Please provide the exact scenarios you tested in as much detail as possible including commands, output and rationale. -->
commit 9f4707617bcaeb991ff5ab3a1aa97595610b8051 Merge: fec01759 9982bb7 Author: Tsachi Herman <[email protected]> Date: Mon Jul 12 15:21:24 2021 -0400 Merge branch 'feature/txnsync' into tsachi/grouphash commit fec0175913accc7364a779339090824ae8a07050 Merge: b9ade6c0 2f2761a Author: Tsachi Herman <[email protected]> Date: Mon Jul 12 14:32:58 2021 -0400 Merge branch 'tsachi/merge15' into tsachi/grouphash commit b9ade6c061322120584019bbcd45f18f25f84cdf Merge: 5ad7c519 6fdf336 Author: Tsachi Herman <[email protected]> Date: Mon Jul 12 14:32:44 2021 -0400 Merge branch 'feature/txnsync' into tsachi/grouphash commit 2f2761a Merge: 6fdf336 10e91da Author: Tsachi Herman <[email protected]> Date: Mon Jul 12 12:58:30 2021 -0400 Merge branch 'master' into tsachi/merge15 commit 10e91da Author: Tsachi Herman <[email protected]> Date: Mon Jul 12 12:52:42 2021 -0400 Improve testing of alloc bounded slices. (algorand#2515) This change is needed in order to support codec types such as the following: ```golang //msgp:allocbound typeA 16 type typeA []typeB ``` since we want the codec object randomizer to recognize that `typeA` has a allocbound defined, and use that bound. ( this would be used in the feature/txnsync branch, but the change doesn't really related to any of the other changes in the feature/txnsync branch and would be a good change regardless ) commit da26ca7 Author: Tsachi Herman <[email protected]> Date: Mon Jul 12 10:31:14 2021 -0400 Make TestPeersDownloadFailed and TestHistoricData predictable (algorand#2516) Both the `TestPeersDownloadFailed` as well as `TestHistoricData` were randomly failing, as they were depending on a "genuine" random distribution of the random function in order to succeed. When that doesn't happen, they were failing. This PR make sure to "bake-in" the random seed so that the tests are repeatable and a success is repeatable as well. commit 5ad7c519cdb018d95438905b514bde17066006f9 Author: Tsachi Herman <[email protected]> Date: Sat Jul 10 23:59:37 2021 -0400 first draft commit 415d82c Author: Tsachi Herman <[email protected]> Date: Fri Jul 9 17:40:21 2021 -0400 Fix random failure in TestWebsocketNetworkPrioLimit (algorand#2509) The peers array is modified when adding/removing entries from it. When that does happen, we increase the peersChangeCounter, so that the broadcast method would know that it's peers list need to be refreshed. The said update was missing from prioTracker.setPriority, which was causing the issue. commit 66fbd60 Author: Brian Olson <[email protected]> Date: Fri Jul 9 13:28:22 2021 -0400 fix regex for matching charset of valid DNS hosts, add test (algorand#2505) A regex was trying to match valid DNS names but missed the '-' char. Fix. commit 398d606 Author: John Jannotti <[email protected]> Date: Fri Jul 9 13:22:53 2021 -0400 Creator access and app_params_get (algorand#2301) Adds the ability to get the creator of apps and assets in teal. This is a simple new field for `asset_params_get`, but it introduces a new opcode `app_params_get` to enable access for apps. Meanwhile `app_params_get` allows access to other global parameters about an app - the schema sizes, extra pages, and the programs themselves. This also begins work on LogicVersion=5, which should be AVM 1.0 commit 6cfcbeb Author: John Jannotti <[email protected]> Date: Fri Jul 9 13:22:21 2021 -0400 selector pseudo-op in support of ABI (algorand#2358) Adds a Teal pseudo-op `selector` that assembles as if it were the `byte` pseudo-op, but stores 4 bytes of hash. This allows Teal, like: ``` txn ApplicationArgs 0 selector "add(uint64,uint64)uint128" == bnz add ``` and avoid the need to embed the actual hash in a .teal file (which would also require calculating it) Unlike `byte`, the argument *must* be a quoted string - no base64 or hex allowed, as the argument should be a method signature. commit abc4058 Author: Tsachi Herman <[email protected]> Date: Thu Jul 8 12:43:34 2021 -0400 testing: avoid division by zero during TestBasicCatchpointWriter (algorand#2502) The `randomFullAccountData` method was dividing by `lastCreatableID` which could be zero. The probability for that is pretty slim, but given that it was found during a travis run, we should fix it. commit af8c2ce Author: Tsachi Herman <[email protected]> Date: Thu Jul 8 12:42:58 2021 -0400 disable TestAgreementSynchronous10 (algorand#2503) The test TestAgreementSynchronous10 is failing. We should be fixing it, but until we do that, I'm going to disable it so it won't mask other issues. commit 3ac481e Author: Brian Olson <[email protected]> Date: Wed Jul 7 17:25:58 2021 -0400 allow to parse ipv6 localhost "[::]:4601" (algorand#2430) Allow parsing of ipv6 localhost -colon- port address. "[::]:4601" was failing to parse. This and other forms pass ParseHostOrURL() now. commit f09d814 Author: Will Winder <[email protected]> Date: Wed Jul 7 16:08:15 2021 -0400 Fix 10 minute timeout in travis. (Revert parts of algorand#2324) (algorand#2494) We started seeing the 10-minute timeout error on travis after the recent changes to where travis_retry gets called. This means travis_wait is still needed. travis_wait and travis_retry don't play well together on the ephemeral build machine, so we basically need to rollback the entire change in algorand#2324 Note: while making this change I noticed that we don't use travis_retry for all of the build_test.sh / integration_test.sh entries. Not sure why but I left them as they were before algorand#2324 commit d52eef5 Author: algonautshant <[email protected]> Date: Tue Jul 6 20:53:35 2021 -0400 enable TestPartkeyOnlyRewards on macos (algorand#2429) TestPartkeyOnlyRewards was disabled on darwin. It is no longer failing on darwin (5/5 runs passed). commit c4206f7 Author: Tsachi Herman <[email protected]> Date: Tue Jul 6 19:22:38 2021 -0400 optimize txtail memory consumption (algorand#2413) The changes in this PR are as follows: The unused method Ledger. GetRoundTxIds was removed. As a result, the txTail. getRoundTxIds can be removed as well. This makes the txids map stored in the roundTxMembers structure redundant. In the cow.go, avoid adding empty leases to the cb.mods.Txleases map. Since we already not testing for empty leases, we can safely avoid storing them. Optimize the txTail. loadFromDisk to generate optimal lastValid map sizes. Optimize the txTail. loadFromDisk to avoid storing empty leases in the txleases map. commit 2169e05 Merge: 6dbfd3c e4c7ecb Author: John Lee <[email protected]> Date: Tue Jul 6 17:17:44 2021 -0400 Merge pull request algorand#2451 from Algo-devops-service/relstable2.7.1-remerge go-algorand relstable2.7.1-remerge commit 6dbfd3c Author: Jacob Daitzman <[email protected]> Date: Tue Jul 6 17:16:29 2021 -0400 Initialize past side effects with correct length during dryrun requests (algorand#2448) This PR fixes a typo in the dryrun code that caused certain dryrun requests containing multiple transactions to fail. commit e4c7ecb Author: DevOps Service <[email protected]> Date: Tue Jul 6 21:13:45 2021 +0000 Bump Version, Remove buildnumber.dat and genesistimestamp.dat files. commit 3f6a279 Merge: 4f281b0 5e00bcd Author: DevOps Service <[email protected]> Date: Tue Jul 6 21:13:45 2021 +0000 Merge remote-tracking branch 'origin/rel/stable' into relstable2.7.1-remerge commit 4f281b0 Author: John Lee <[email protected]> Date: Tue Jul 6 11:04:17 2021 -0400 Fix docker repo update (algorand#2342) The scripts to update the docker repository do not do a full rebuild, and the submitted Dockerfile does not change. This means that if you run the docker image/repo update, it'll re-use the old image. To fix this, we call docker build with --no-cache. Other refactoring helps simplify the code. We add a new --cached flag to the docker/releases/build_releases.sh script to explicitly cache. Otherwise the testnet update would issue a full rebuild. We additionally automatically handle the 'latest' tagging in build_releases.sh as well. commit 8f41556 Author: algonautshant <[email protected]> Date: Fri Jul 2 19:37:00 2021 -0400 Fix and enable TestNewAccountCanGoOnlineAndParticipate (algorand#2238) * TestNewAccountCanGoOnlineAndParticipate was failing because the test was not waiting enough to get to the round where the newly funded account's funds will be considered for proposing purposes. It was miscalculating the round that it should wait form. Moreover, the rounds considered to when the account is funded was prone to race conditions. In addition, the test was using WaitForRoundWithTimeout which may be very slower if the current round is already ahead. Instead, now it is using ClientWaitForRound, which does not care about individual rounds delayed. * Addressing review commnets: - fixing a typo - getting exact transaction round for funding the account - testing exact blocks for the proposer - using a single node network instead of two nodes - waiting for exactly one round for the new account to propose and checking that - sending the funds and closing the rich account so there will be no possiblity of that proposing a block commit e38dcff Author: John Jannotti <[email protected]> Date: Fri Jul 2 12:51:14 2021 -0400 Specs and unit test to avoid forgetting in the future (algorand#2418) Specs and unit test to avoid forgetting in the future commit 70d15fe Author: Rakshith G <[email protected]> Date: Fri Jul 2 06:30:56 2021 -0700 testing: ensure deploy_linux_version generates a linux/amd64 binaries for algonet usage (algorand#2422) The deploy_linux_version.sh script currently creates a linux version of the current project tree with the same architecture as the hosting environment. When we attempt to builds on M1 Macs, it default to arm64 base images and as a result - makes a linux/arm64 compatible binaries. These resulting binaries, however, would not work correctly on an algonet deployed network, since the hosts there are amd64. To rectify that situation, we'll be changing the docker file to ensure linux/amd64 binaries are generated. This would ensure that the existing functionality works as intended. In the future, when we would add arm64 support for algonet, we could accompany that by creating corresponding images on docker as well. commit fc52ab9 Author: Tsachi Herman <[email protected]> Date: Thu Jul 1 18:10:09 2021 -0400 catchup: fix potential nil dereferencing (algorand#2420) The handing for returned peer was incorrect in case the getPeerErr is non-nil, as we would attempt to dereference the nil pointer. commit 29a6fec Author: bricerisingalgorand <[email protected]> Date: Thu Jul 1 17:39:03 2021 -0400 Implement hello circleci yaml (algorand#2417) This adds a hello world circleci yaml. This can be used to run circleci jobs on PRs until the pipeline is fully implemented. commit b0935e2 Author: Tsachi Herman <[email protected]> Date: Wed Jun 30 19:20:32 2021 -0400 Add initial devMode support (algorand#2334) Add new local private network mode - devmode. devMode allows the developer to deploy a single node network, where every transaction being sent to the node automatically generates a new block. This feature is focused primarily around 3rd parties that want to test their solution on the Algorand platform, without waiting for the network to make progress. commit 78e311e Author: Pavel Zbitskiy <[email protected]> Date: Wed Jun 30 18:28:25 2021 -0400 Add missing txna allowed args to doc and langspec (algorand#2336) We exposed Assets and Applications in TEAL v3 but did not update doc/langspec. This commit fixes it. commit 5e00bcd Merge: 8fe22d4 dc829f6 Author: John Lee <[email protected]> Date: Mon Jun 28 13:37:51 2021 -0400 Merge pull request algorand#2332 from Algo-devops-service/relstable2.7.1 go-algorand 2.7.1-stable commit fbae428 Author: pzbitskiy <[email protected]> Date: Mon Jun 28 09:26:55 2021 -0400 Add Fedora support into install_linux_deps.sh (algorand#2331) Add Fedora deps into install_linux_deps.sh commit f870265 Author: Will Winder <[email protected]> Date: Thu Jun 24 12:36:53 2021 -0400 testing: fix telemetry unit tests (algorand#2321) Fix and re-enable async telemetry unit test TestAsyncTelemetryHook_CloseDrop. commit b55b53f Author: Will Winder <[email protected]> Date: Thu Jun 24 12:34:28 2021 -0400 testing: move travis_retry to skip rebuilding (algorand#2324) Remove the top-level retry command. This will allow build / lint failures to terminate the build with no retry, and may speed up test failure retries. commit 90edab3 Author: Will Winder <[email protected]> Date: Thu Jun 24 12:32:57 2021 -0400 testing: fix gotestsum install (algorand#2328) testing: fix gotestsum install avoid installing swagger when not needed. commit 798c612 Author: algonautshant <[email protected]> Date: Wed Jun 23 21:58:16 2021 -0400 testing: enable previously disabled TestConfigMigrate unit test (algorand#2326) testing: enable previously disabled TestConfigMigrate unit test commit 93f2586 Author: John Lee <[email protected]> Date: Wed Jun 23 16:57:58 2021 -0400 Restore TestPeriodicSync and TestBasicCatchpointCatchup tests. (algorand#2315) commit ed9609d Author: Tsachi Herman <[email protected]> Date: Wed Jun 23 16:40:05 2021 -0400 Improve TestMetricSegment test realibility (algorand#2322) mprove TestMetricSegment test reliability by repeating the test with incrementing time delays. This implementation would allow faster execution on faster platforms, and allow fallback for slower platforms. commit 1cd8dd4 Author: Tsachi Herman <[email protected]> Date: Wed Jun 23 14:32:59 2021 -0400 Reduce unneeded contention around checking the peers connectivity. (algorand#2319) Existing `messageHandlerThread` was checking that all the connected peers are properly communicating by examining their recent message timings. This implementation served us well - however, it was executed redundantly. How much redundantly ? 19 times too many every 3 minutes ( and all of them at the **exact** same time.. ). This PR ensures that all the `messageHandlerThread` shares the same ticker for testing the `checkPeersConnectivity`. This is expected to reduce the pressure on the internal `peersLock`. commit 63b8241 Author: chris erway <[email protected]> Date: Tue Jun 22 21:07:24 2021 -0400 Run misspell linter with -w flag (algorand#2320) This runs the popular misspell linter with the -w flag to automatically correct spelling mistakes in go-algorand. commit dc829f6 Merge: d57586a 0b18c94 Author: John Lee <[email protected]> Date: Mon Jun 21 21:03:29 2021 -0400 Merge pull request algorand#2314 from onetechnical/onetechnical/relbeta2.7.1 go-algorand 2.7.1-beta commit 0b18c94 Author: John Lee <[email protected]> Date: Mon Jun 21 18:01:51 2021 -0400 Bump buildnumber.dat commit 855fac7 Author: Tsachi Herman <[email protected]> Date: Mon Jun 21 17:18:16 2021 -0400 Merge pull request algorand#2313 from algorandskiy/pavel/extra-pages-api REST API: make extra-program-pages and apps-total-extra-pages optional commit 708581b Merge: 2cd04d6 cff7771 Author: Tsachi Herman <[email protected]> Date: Mon Jun 21 17:18:16 2021 -0400 Merge pull request algorand#2313 from algorandskiy/pavel/extra-pages-api REST API: make extra-program-pages and apps-total-extra-pages optional commit 2cd04d6 Merge: 5d01664 6edb3f8 Author: Tsachi Herman <[email protected]> Date: Mon Jun 21 15:05:29 2021 -0400 Merge pull request algorand#2309 from figurestudios/patch-1 fix few README typos, grammar and inconsistencies commit 5d01664 Merge: 2824120 8faf82a Author: Tsachi Herman <[email protected]> Date: Mon Jun 21 15:01:09 2021 -0400 Merge pull request algorand#2308 from fabrice102/patch-3 Specify truncated division is used in TEAL Specify that the truncated division is used (https://en.wikipedia.org/wiki/Modulo_operation#Variants_of_the_definition) commit 2824120 Merge: 0cb300d 9d8a460 Author: Tsachi Herman <[email protected]> Date: Mon Jun 21 14:44:47 2021 -0400 Merge pull request algorand#2285 from algonautshant/shant/fixTestBasicCatchpointCatchup <!-- Thanks for submitting a pull request! We appreciate the time and effort you spent to get this far. If you haven't already, please make sure that you've reviewed the CONTRIBUTING guide: https://github.com/algorand/go-algorand/blob/master/CONTRIBUTING.md#code-guidelines In particular ensure that you've run the following: * make generate * make sanity (which runs make fmt, make lint, make fix and make vet) It is also a good idea to run tests: * make test * make integration --> ## Summary peerSelector.go: various bug fixes - introduce peerSelectorPeer to wrap the network.Peer and add peerClass information, to be able to distinguish between peers of the same address but different classes. - keep track of download failures to be able to exponentially increase the cost of each failure when failing more than succeeding. This is to evict the peer faster when constantly failing to download. - initialize rankSum and rankSamples to initialRank of the class. Otherwise, the peer rank will have a very long warmup time before relfecting the correct rank. - let resetRequestPenalty bound the rank within the class bounds. Otherwise, the penalty calculation pushes the rank out of the class bounds (bug). - getNextPeer, rankPeer, and peerDownloadDurationToRank are local to the package, since they are using non-exported peerSelectorPeer - getNextPeer, PeerDownloadDurationToRank and RankPeer use peerSelectorPeer instead of network.Peer - refreshAvailablePeers distinguishes between peers with the same address but of different peer class - findPeer returns the peer given the address and the peer class (instead of just the address) catchpointCatchup_test.go: - Remove comment about giving the second node all the stake, since it is not the case here. - Use the round from the catchpoint instead of guessing the round as 36. In case the following catchpoint was obtained due to race conditions, checking for round 37 will be trivial, since it will also be obtained from the catchpoint. catchpointService.go and service.go: - Update the code to use peerSelectorPeer instead of network.Peer with peerSelector peerSelector_test.go: - Add new tests to check the peerSelector fixes in this PR - Update the tests to use peerSelectorPeer instead of network.Peer with peerSelector - Cleanup debugging printouts. <!-- Explain the goal of this change and what problem it is solving. Format this cleanly so that it may be used for a commit message, as your changes will be squash-merged. --> ## Test Plan Added tests to confirm the fixes. - TestClassUpperBound - TestClassLowerBound - TestEvictionAndUpgrade <!-- How did you test these changes? Please provide the exact scenarios you tested in as much detail as possible including commands, output and rationale. --> commit 0cb300d Merge: 520e896 b27ab2c Author: Tsachi Herman <[email protected]> Date: Mon Jun 21 14:31:25 2021 -0400 Merge pull request algorand#2312 from algonathan/lruaccts-benchmark testing: improve lruaccts benchmark commit cff7771 Author: Pavel Zbitskiy <[email protected]> Date: Mon Jun 21 14:05:20 2021 -0400 REST API: make extra-program-pages and apps-total-extra-pages optional * This also helps in not exposing them before the protocol switch commit b27ab2c Author: Jonathan Weiss <[email protected]> Date: Mon Jun 21 18:25:24 2021 +0300 lruAccounts benchmark: a more controlled distribution between accounts in the benchmark commit d8f5b33 Merge: 3b85cdb 520e896 Author: algonathan <[email protected]> Date: Mon Jun 21 16:25:54 2021 +0300 Merge branch 'algorand:master' into lruaccts-benchmark commit 3b85cdb Author: Jonathan Weiss <[email protected]> Date: Mon Jun 21 16:22:51 2021 +0300 lruAccounts write fix: benchmark used too much memory commit 520e896 Merge: 9e07d6a ee3f371 Author: Tsachi Herman <[email protected]> Date: Mon Jun 21 08:58:19 2021 -0400 Merge pull request algorand#2311 from algonathan/lruaccts-benchmark added benchmark to measure the performance of the `lruAccounts.write` function commit ee3f371 Author: Jonathan Weiss <[email protected]> Date: Sun Jun 20 19:02:57 2021 +0300 fix: amount of accounts generated in lruAccounts write benchmark commit b726844 Author: Jonathan Weiss <[email protected]> Date: Sun Jun 20 16:48:46 2021 +0300 lruaccounts benchmark: filling the acounts with data before benchmarking commit f2ca4fe Author: Jonathan Weiss <[email protected]> Date: Sun Jun 20 09:05:27 2021 +0300 added benchmark to lruAccounts write function commit 8faf82a Author: John Jannotti <[email protected]> Date: Sat Jun 19 17:53:29 2021 -0400 Spec updates to go with division explanation. commit 6edb3f8 Author: figurestudios <[email protected]> Date: Sat Jun 19 03:00:19 2021 +0200 typos, grammar, inconsistencies mostly casing issues, ie, algorand > Algorand || sqlite > SQLite commit 07154fd Author: Fabrice Benhamouda <[email protected]> Date: Fri Jun 18 15:25:29 2021 -0400 Specify truncated division is used in TEAL Specify that the truncated division is used (https://en.wikipedia.org/wiki/Modulo_operation#Variants_of_the_definition) commit 9e07d6a Merge: 91b8ca1 bc473af Author: Tsachi Herman <[email protected]> Date: Thu Jun 17 16:44:19 2021 -0400 Merge pull request algorand#2306 from algorandskiy/pavel/extra-pages-e2e-subs testing: move extra page test to e2e_subs commit bc473af Author: Pavel Zbitskiy <[email protected]> Date: Thu Jun 17 14:27:48 2021 -0400 Move extra page test to e2e_subs commit 91b8ca1 Merge: 9549171 77b6e11 Author: Tsachi Herman <[email protected]> Date: Thu Jun 17 13:59:06 2021 -0400 Merge pull request algorand#2303 from cce/read-permutation-tests Add enums to player permutation tests: This made it easier for me to understand the different 7 initial player states * 14 simulated events when reading through each permutation's expected actions. I hope the enum names I picked are accurate — would appreciate any feedback on better names. commit 9549171 Merge: 5cb9d3a 19490d4 Author: Tsachi Herman <[email protected]> Date: Thu Jun 17 13:44:08 2021 -0400 Merge pull request algorand#2291 from winder/will/test-mac testing: enable unit tests on travis mac build commit 77b6e11 Author: chris erway <[email protected]> Date: Thu Jun 17 13:08:28 2021 -0400 Remove commented code in TestPlayerPermutation commit 5b80276 Author: chris erway <[email protected]> Date: Thu Jun 17 11:08:30 2021 -0400 make linter happy by removing underscores from enum names commit 5cb9d3a Merge: ebfc1fa 96f7b76 Author: Tsachi Herman <[email protected]> Date: Thu Jun 17 09:48:04 2021 -0400 Merge pull request algorand#2265 from nicholasguoalgorand/nguo/blockqueue-cover testing: add unit tests for ledger BlockQueue commit ebfc1fa Merge: c43e226 6997588 Author: Tsachi Herman <[email protected]> Date: Thu Jun 17 09:46:07 2021 -0400 Merge pull request algorand#2290 from grakshith/arm64-dev-build Fix go-algorand dev builds for darwin-arm64 machines (Apple's M1 CPUs). commit c43e226 Merge: 65aa0da 957958a Author: Tsachi Herman <[email protected]> Date: Thu Jun 17 09:45:09 2021 -0400 Merge pull request algorand#2284 from nicholasguoalgorand/nguo/ledger-cover Add tests to increase coverage for onlineacct roundlru txtail commit d57586a Merge: 34f7106 78a221c Author: John Lee <[email protected]> Date: Thu Jun 17 02:43:18 2021 -0400 Merge pull request algorand#2304 from Algo-devops-service/relbeta2.7.0 go-algorand 2.7.0-beta commit 78a221c Author: DevOps Service <[email protected]> Date: Thu Jun 17 04:36:40 2021 +0000 Update the Version, BuildNumber, genesistimestamp.data commit 65aa0da Author: Tsachi Herman <[email protected]> Date: Thu Jun 17 00:31:07 2021 -0400 testing: fix random failure in TestAppEmptyAccountsLocal (algorand#2302) The test had two unrelated bugs: 1. We need to call `WaitForCommit` before `reloadLedger` to ensure the block is being written to disk before the blockQ getting reinitialized ( and loose its content ). 2. The calculation of the total rewards unit in `makeNewEmptyBlock` was wrong. I corrected it. For tests that run only one or two rounds, this might be good enough, but for long-running tests, it would start fail pretty quickly. commit 1e7c43b Author: chris erway <[email protected]> Date: Wed Jun 16 23:46:16 2021 -0400 rename requireTraceContainsAction to requireTraceContains commit 11a4e39 Author: chris erway <[email protected]> Date: Wed Jun 16 17:29:36 2021 -0400 add playerPermutation enums to permutation test commit e8f9c70 Author: chris erway <[email protected]> Date: Wed Jun 16 16:48:46 2021 -0400 use enums for message event permutations, add require trace helpers commit 5fb7ac8 Author: Jason Paulos <[email protected]> Date: Wed Jun 16 13:24:11 2021 -0700 Expose extra program pages to API (algorand#2294) Add the AppsTotalExtraPages account field to the response returned by the /v2/accounts/{addr} endpoint. commit 0a3d9df Author: John Jannotti <[email protected]> Date: Wed Jun 16 15:24:46 2021 -0400 Allow fee to be below minfee, if given explicitly. (algorand#2295) This makes other txns accept explicitly low fees. Sorry for the code duplication, but I did not want to change libgoal's existing behavior where it increases fee to minfee. commit 96f7b76 Author: Nicholas Guo <[email protected]> Date: Wed Jun 16 11:12:38 2021 -0700 add another case commit 37b828a Author: John Jannotti <[email protected]> Date: Wed Jun 16 11:16:37 2021 -0400 Forgot to run .md generation (algorand#2292) commit 1ca4ef8 Author: Pavel Zbitskiy <[email protected]> Date: Wed Jun 16 11:14:56 2021 -0400 Introduce V28 consensus version (algorand#2255) * TEAL v4 * Larger programs * Larger app/asset lookup limits * Longer asset URL * Fee pooling within a group * Keyreg txn additional checks Removed InitialRewardsRateCalculation and PaysetCommit from vFuture since it is already in v26 Fixed some tests after exposing zero fees and strict keyreg as current consensus commit 19490d4 Author: Will Winder <[email protected]> Date: Wed Jun 16 10:54:40 2021 -0400 More changes. commit f937799 Author: Will Winder <[email protected]> Date: Wed Jun 16 06:18:39 2021 -0400 Enable unit tests on mac build script. commit f25c951 Author: Nicholas Guo <[email protected]> Date: Tue Jun 15 22:01:05 2021 -0700 address comments commit 6997588 Author: Rakshith Gopala Krishna <[email protected]> Date: Tue Jun 15 15:04:05 2021 -0700 Fix darwin-arm64 builds commit 957958a Author: Nicholas Guo <[email protected]> Date: Tue Jun 15 11:34:53 2021 -0700 add check commit 02eacd1 Author: John Jannotti <[email protected]> Date: Tue Jun 15 14:31:23 2021 -0400 report substring missing immediates properly (algorand#2287) Fixes crash that should be a clean error report for using substring wrong. Unit tests added to confirm and prevent regression. commit f878967 Author: Nicholas Guo <[email protected]> Date: Tue Jun 15 11:15:32 2021 -0700 fix tests commit ff9f69d Author: John Jannotti <[email protected]> Date: Tue Jun 15 12:48:37 2021 -0400 final v28 foundation spec (algorand#2286) Changes to readmes and specs to reflect the matching foundation spec. commit 9d8a460 Author: algonautshant <[email protected]> Date: Tue Jun 15 12:24:44 2021 -0400 Fix the test name so it runs commit 4aa0f48 Author: algonautshant <[email protected]> Date: Tue Jun 15 02:08:47 2021 -0400 test for error first commit d8b73f8 Author: algonautshant <[email protected]> Date: Tue Jun 15 02:06:04 2021 -0400 Added tests, exponential increase of download failure impact, local functions. commit eb6604c Author: Nicholas Guo <[email protected]> Date: Mon Jun 14 22:28:51 2021 -0700 rename test commit 3eed93f Author: Nicholas Guo <[email protected]> Date: Mon Jun 14 22:27:36 2021 -0700 fix import commit 3dc1512 Author: Nicholas Guo <[email protected]> Date: Mon Jun 14 22:09:44 2021 -0700 write tests commit a2be5f1 Author: algonautshant <[email protected]> Date: Mon Jun 14 19:01:04 2021 -0400 In this chage, fixes to peer selector and the test. peerSelector.go: various bug fixes - introduce peerSelectorPeer to wrap the network.Peer and add peerClass information, to be able to distinguish between peers of the same address but different classes. - keep track of download failures to be able to increase the cost of each failure when failing more than succeeding. This is to evict the peer faster when constantly failing to download. - initialize rankSum and rankSamples to initialRank of the class. Otherwise, the peer rank will have a very long warmup time before relfecting the correct rank. - let resetRequestPenalty bound the rank within the class bounds. Otherwise, the penalty calculation pushes the rank out of the class bounds (bug). - getNextPeer is local to the package - getNextPeer, PeerDownloadDurationToRank and RankPeer use peerSelectorPeer instead of network.Peer - refreshAvailablePeers distinguishes between peers with the same address but of different peer class - findPeer returns the peer given the address and the peer class (instead of just the address) catchpointCatchup_test.go: - Remove comment about giving the second node all the stake, since it is not the case here. - Use the round from the catchpoint instead of guessing the round as 36. In case the following catchpoint was obtained due to race conditions, checking for round 37 will be trivial, since it will also be obtained from the catchpoint. catchpointService.go and service.go: - Update the code to use peerSelectorPeer instead of network.Peer with peerSelector peerSelector_test.go: - Update the tests to use peerSelectorPeer instead of network.Peer with peerSelector - Cleanup debugging printouts. commit 7ca6fd1 Author: Nicholas Guo <[email protected]> Date: Wed Jun 9 19:00:18 2021 -0700 lint commit 33885fc Author: Nicholas Guo <[email protected]> Date: Wed Jun 9 13:00:51 2021 -0700 wrote tests
Summary
peerSelector.go: various bug fixes
catchpointCatchup_test.go:
catchpointService.go and service.go:
peerSelector_test.go:
Test Plan
Added tests to confirm the fixes.