summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Smith <jack.smith@algorand.com>2022-01-07 16:37:53 -0500
committerJack Smith <jack.smith@algorand.com>2022-01-07 16:37:53 -0500
commit5e08c82482532b0c55ca344c15d36d06bbed673c (patch)
treeb41960a63c5e0ed794d6cf2018fb42687340b0be
parent4ddf2b5fd350c99f12628e26c737e907c3aea747 (diff)
parentf9497d9e754c059c735081a01c5ecabed580ae12 (diff)
Merge branch 'master' into multiverse-changesmultiverse-changes
-rw-r--r--README.md2
-rw-r--r--agreement/abstractions.go2
-rw-r--r--agreement/actions.go2
-rw-r--r--agreement/actor.go2
-rw-r--r--agreement/agreeInstall.go2
-rw-r--r--agreement/agreementtest/keyManager.go2
-rw-r--r--agreement/agreementtest/simulate.go2
-rw-r--r--agreement/agreementtest/simulate_test.go2
-rw-r--r--agreement/asyncVoteVerifier.go2
-rw-r--r--agreement/asyncVoteVerifier_test.go2
-rw-r--r--agreement/autopsy.go2
-rw-r--r--agreement/bundle.go2
-rw-r--r--agreement/bundle_test.go2
-rw-r--r--agreement/cadaver.go2
-rw-r--r--agreement/certificate.go2
-rw-r--r--agreement/certificate_test.go2
-rw-r--r--agreement/common_test.go2
-rw-r--r--agreement/coservice.go2
-rw-r--r--agreement/cryptoRequestContext.go2
-rw-r--r--agreement/cryptoRequestContext_test.go2
-rw-r--r--agreement/cryptoVerifier.go2
-rw-r--r--agreement/cryptoVerifier_test.go2
-rw-r--r--agreement/demux.go20
-rw-r--r--agreement/demux_test.go2
-rw-r--r--agreement/doc.go2
-rw-r--r--agreement/encoding_test.go2
-rw-r--r--agreement/errors.go2
-rw-r--r--agreement/events.go2
-rw-r--r--agreement/fuzzer/bandwidthFilter_test.go2
-rw-r--r--agreement/fuzzer/catchupFilter_test.go2
-rw-r--r--agreement/fuzzer/clockedFilter_test.go2
-rw-r--r--agreement/fuzzer/dropMessageFilter_test.go2
-rw-r--r--agreement/fuzzer/duplicateMessageFilter_test.go2
-rw-r--r--agreement/fuzzer/filter_test.go2
-rw-r--r--agreement/fuzzer/fuzzer.go2
-rw-r--r--agreement/fuzzer/fuzzer_test.go2
-rw-r--r--agreement/fuzzer/ledger_test.go2
-rw-r--r--agreement/fuzzer/messageDecoderFilter_test.go2
-rw-r--r--agreement/fuzzer/messageDelayFilter_test.go2
-rw-r--r--agreement/fuzzer/messageDuplicationFilter_test.go2
-rw-r--r--agreement/fuzzer/messagePriorityQueue_test.go2
-rw-r--r--agreement/fuzzer/messageReflectionFilter_test.go2
-rw-r--r--agreement/fuzzer/messageRegossipFilter_test.go2
-rw-r--r--agreement/fuzzer/messageReorderingFilter_test.go2
-rw-r--r--agreement/fuzzer/networkFacade_test.go2
-rw-r--r--agreement/fuzzer/nodeCrashFilter_test.go2
-rw-r--r--agreement/fuzzer/nullFilter_test.go2
-rw-r--r--agreement/fuzzer/router_test.go2
-rw-r--r--agreement/fuzzer/schedulerFilter_test.go2
-rw-r--r--agreement/fuzzer/tests_test.go2
-rw-r--r--agreement/fuzzer/topologyFilter_test.go2
-rw-r--r--agreement/fuzzer/trafficStatisticsFilter_test.go2
-rw-r--r--agreement/fuzzer/validator_test.go2
-rw-r--r--agreement/fuzzer/voteFilter_test.go2
-rw-r--r--agreement/gossip/network.go2
-rw-r--r--agreement/gossip/networkFull_test.go5
-rw-r--r--agreement/gossip/network_test.go2
-rw-r--r--agreement/keyManager_test.go2
-rw-r--r--agreement/listener.go2
-rw-r--r--agreement/message.go2
-rw-r--r--agreement/message_test.go2
-rw-r--r--agreement/params.go2
-rw-r--r--agreement/persistence.go2
-rw-r--r--agreement/persistence_test.go2
-rw-r--r--agreement/player.go2
-rw-r--r--agreement/playerContract.go2
-rw-r--r--agreement/player_permutation_test.go2
-rw-r--r--agreement/player_test.go2
-rw-r--r--agreement/proposal.go2
-rw-r--r--agreement/proposalManager.go2
-rw-r--r--agreement/proposalManagerContract.go2
-rw-r--r--agreement/proposalManager_test.go2
-rw-r--r--agreement/proposalStore.go2
-rw-r--r--agreement/proposalStoreContract.go2
-rw-r--r--agreement/proposalStore_test.go2
-rw-r--r--agreement/proposalTable.go2
-rw-r--r--agreement/proposalTracker.go2
-rw-r--r--agreement/proposalTrackerContract.go2
-rw-r--r--agreement/proposalTracker_test.go2
-rw-r--r--agreement/proposal_test.go2
-rw-r--r--agreement/pseudonode.go2
-rw-r--r--agreement/pseudonode_test.go2
-rw-r--r--agreement/router.go2
-rw-r--r--agreement/selector.go2
-rw-r--r--agreement/service.go2
-rw-r--r--agreement/service_test.go2
-rw-r--r--agreement/state_machine_test.go2
-rw-r--r--agreement/trace.go2
-rw-r--r--agreement/traceTime.go2
-rw-r--r--agreement/types.go2
-rw-r--r--agreement/vote.go25
-rw-r--r--agreement/voteAggregator.go5
-rw-r--r--agreement/voteAggregatorContract.go2
-rw-r--r--agreement/voteAggregator_test.go2
-rw-r--r--agreement/voteAuxiliary.go2
-rw-r--r--agreement/voteAuxiliaryContract.go2
-rw-r--r--agreement/voteAuxiliary_test.go2
-rw-r--r--agreement/voteTracker.go2
-rw-r--r--agreement/voteTrackerContract.go2
-rw-r--r--agreement/voteTracker_test.go2
-rw-r--r--agreement/vote_test.go2
-rw-r--r--catchup/catchpointService.go2
-rw-r--r--catchup/fetcher_test.go2
-rw-r--r--catchup/ledgerFetcher.go2
-rw-r--r--catchup/ledgerFetcher_test.go2
-rw-r--r--catchup/peerSelector.go2
-rw-r--r--catchup/peerSelector_test.go2
-rw-r--r--catchup/pref_test.go2
-rw-r--r--catchup/service.go2
-rw-r--r--catchup/service_test.go2
-rw-r--r--catchup/universalFetcher.go2
-rw-r--r--catchup/universalFetcher_test.go2
-rw-r--r--cmd/algocfg/datadir.go2
-rw-r--r--cmd/algocfg/getCommand.go2
-rw-r--r--cmd/algocfg/main.go2
-rw-r--r--cmd/algocfg/messages.go2
-rw-r--r--cmd/algocfg/report.go2
-rw-r--r--cmd/algocfg/resetCommand.go2
-rw-r--r--cmd/algocfg/setCommand.go2
-rw-r--r--cmd/algod/main.go2
-rw-r--r--cmd/algod/main_test.go2
-rw-r--r--cmd/algofix/deadlock.go2
-rw-r--r--cmd/algofix/deadlock_test.go2
-rw-r--r--cmd/algoh/blockWatcher.go2
-rw-r--r--cmd/algoh/blockWatcher_test.go2
-rw-r--r--cmd/algoh/blockstats.go2
-rw-r--r--cmd/algoh/blockstats_test.go2
-rw-r--r--cmd/algoh/client.go2
-rw-r--r--cmd/algoh/deadman.go2
-rw-r--r--cmd/algoh/eventsender.go2
-rw-r--r--cmd/algoh/main.go2
-rw-r--r--cmd/algoh/mockClient.go2
-rw-r--r--cmd/algokey/common.go2
-rw-r--r--cmd/algokey/export.go2
-rw-r--r--cmd/algokey/generate.go2
-rw-r--r--cmd/algokey/import.go2
-rw-r--r--cmd/algokey/main.go2
-rw-r--r--cmd/algokey/multisig.go2
-rw-r--r--cmd/algokey/part.go2
-rw-r--r--cmd/algokey/sign.go2
-rw-r--r--cmd/algons/commands.go2
-rw-r--r--cmd/algons/dnsCmd.go2
-rw-r--r--cmd/algorelay/commands.go2
-rw-r--r--cmd/algorelay/eb/eb.go2
-rw-r--r--cmd/algorelay/relayCmd.go2
-rw-r--r--cmd/buildtools/commands.go2
-rw-r--r--cmd/buildtools/genesis.go2
-rw-r--r--cmd/catchpointdump/commands.go2
-rw-r--r--cmd/catchpointdump/database.go2
-rw-r--r--cmd/catchpointdump/file.go2
-rw-r--r--cmd/catchpointdump/net.go2
-rw-r--r--cmd/catchupsrv/download.go2
-rw-r--r--cmd/catchupsrv/download_test.go2
-rw-r--r--cmd/catchupsrv/main.go2
-rw-r--r--cmd/catchupsrv/tarblocks.go2
-rw-r--r--cmd/dbgen/main.go2
-rw-r--r--cmd/diagcfg/main.go2
-rw-r--r--cmd/diagcfg/messages.go2
-rw-r--r--cmd/diagcfg/metric.go2
-rw-r--r--cmd/diagcfg/telemetry.go2
-rw-r--r--cmd/dispenser/server.go2
-rw-r--r--cmd/genesis/newgenesis.go2
-rw-r--r--cmd/goal/account.go2
-rw-r--r--cmd/goal/accountsList.go2
-rw-r--r--cmd/goal/application.go107
-rw-r--r--cmd/goal/asset.go2
-rw-r--r--cmd/goal/clerk.go2
-rw-r--r--cmd/goal/commands.go2
-rw-r--r--cmd/goal/commands_test.go2
-rw-r--r--cmd/goal/common.go2
-rw-r--r--cmd/goal/completion.go2
-rw-r--r--cmd/goal/formatting.go2
-rw-r--r--cmd/goal/formatting_test.go2
-rw-r--r--cmd/goal/inspect.go2
-rw-r--r--cmd/goal/inspect_test.go2
-rw-r--r--cmd/goal/interact.go2
-rw-r--r--cmd/goal/kmd.go2
-rw-r--r--cmd/goal/ledger.go2
-rw-r--r--cmd/goal/logging.go2
-rw-r--r--cmd/goal/messages.go2
-rw-r--r--cmd/goal/multisig.go2
-rw-r--r--cmd/goal/network.go2
-rw-r--r--cmd/goal/node.go2
-rw-r--r--cmd/goal/tealsign.go2
-rw-r--r--cmd/goal/wallet.go2
-rw-r--r--cmd/incorporate/incorporate.go2
-rw-r--r--cmd/kmd/codes/codes.go2
-rw-r--r--cmd/kmd/main.go2
-rw-r--r--cmd/kmd/mlock_darwin.go2
-rw-r--r--cmd/kmd/mlock_linux.go2
-rw-r--r--cmd/kmd/mlock_windows.go2
-rw-r--r--cmd/loadgenerator/config.go2
-rw-r--r--cmd/loadgenerator/main.go2
-rw-r--r--cmd/msgpacktool/main.go2
-rw-r--r--cmd/netdummy/main.go2
-rw-r--r--cmd/netgoal/commands.go2
-rw-r--r--cmd/netgoal/generate.go2
-rw-r--r--cmd/netgoal/messages.go2
-rw-r--r--cmd/netgoal/network.go2
-rw-r--r--cmd/netgoal/recipe.go2
-rw-r--r--cmd/nodecfg/apply.go2
-rw-r--r--cmd/nodecfg/commands.go2
-rw-r--r--cmd/nodecfg/download.go2
-rw-r--r--cmd/nodecfg/get.go2
-rw-r--r--cmd/opdoc/opdoc.go2
-rw-r--r--cmd/opdoc/tmLanguage.go2
-rw-r--r--cmd/partitiontest_linter/linter.go2
-rw-r--r--cmd/partitiontest_linter/linter_test.go2
-rw-r--r--cmd/partitiontest_linter/plugin/plugin.go2
-rw-r--r--cmd/partitiontest_linter/testdata/linter_testdata_test.go2
-rw-r--r--cmd/pingpong/commands.go2
-rw-r--r--cmd/pingpong/runCmd.go2
-rw-r--r--cmd/pingpong/teal_programs.go2
-rwxr-xr-xcmd/tealdbg/bundle_home_html.sh2
-rw-r--r--cmd/tealdbg/cdt/proto.go2
-rw-r--r--cmd/tealdbg/cdtSession.go2
-rw-r--r--cmd/tealdbg/cdtSession_test.go2
-rw-r--r--cmd/tealdbg/cdtState.go2
-rw-r--r--cmd/tealdbg/cdtdbg.go2
-rw-r--r--cmd/tealdbg/cdtdbg_test.go2
-rw-r--r--cmd/tealdbg/debugger.go2
-rw-r--r--cmd/tealdbg/debugger_test.go2
-rw-r--r--cmd/tealdbg/dryrunRequest.go2
-rw-r--r--cmd/tealdbg/homepage.go2
-rw-r--r--cmd/tealdbg/local.go2
-rw-r--r--cmd/tealdbg/localLedger.go2
-rw-r--r--cmd/tealdbg/localLedger_test.go2
-rw-r--r--cmd/tealdbg/local_test.go2
-rw-r--r--cmd/tealdbg/main.go2
-rw-r--r--cmd/tealdbg/remote.go2
-rw-r--r--cmd/tealdbg/remote_test.go2
-rw-r--r--cmd/tealdbg/server.go2
-rw-r--r--cmd/tealdbg/server_test.go2
-rw-r--r--cmd/tealdbg/util.go2
-rw-r--r--cmd/tealdbg/util_test.go2
-rw-r--r--cmd/tealdbg/webdbg.go2
-rw-r--r--cmd/tealdbg/webdbg_test.go2
-rw-r--r--cmd/updater/commands.go2
-rw-r--r--cmd/updater/sendCmd.go2
-rw-r--r--cmd/updater/toolsCmd.go2
-rw-r--r--cmd/updater/util.go2
-rw-r--r--cmd/updater/versionCmd.go2
-rw-r--r--cmd/updater/version_test.go2
-rw-r--r--compactcert/abstractions.go2
-rw-r--r--compactcert/builder.go2
-rw-r--r--compactcert/db.go2
-rw-r--r--compactcert/db_test.go2
-rw-r--r--compactcert/signer.go2
-rw-r--r--compactcert/worker.go2
-rw-r--r--compactcert/worker_test.go2
-rw-r--r--components/mocks/mockCatchpointCatchupAccessor.go2
-rw-r--r--components/mocks/mockNetwork.go2
-rw-r--r--config/buildvars.go2
-rw-r--r--config/config.go2
-rw-r--r--config/config_test.go2
-rw-r--r--config/consensus.go6
-rw-r--r--config/consensus_test.go2
-rw-r--r--config/defaultsGenerator/defaultsGenerator.go2
-rw-r--r--config/keyfile.go2
-rw-r--r--config/localTemplate.go22
-rw-r--r--config/local_defaults.go7
-rw-r--r--config/migrate.go2
-rw-r--r--config/version.go2
-rw-r--r--crypto/batchverifier.go2
-rw-r--r--crypto/batchverifier_test.go2
-rw-r--r--crypto/compactcert/bigfloat.go2
-rw-r--r--crypto/compactcert/bigfloat_test.go2
-rw-r--r--crypto/compactcert/builder.go2
-rw-r--r--crypto/compactcert/builder_test.go2
-rw-r--r--crypto/compactcert/common.go2
-rw-r--r--crypto/compactcert/common_test.go2
-rw-r--r--crypto/compactcert/structs.go2
-rw-r--r--crypto/compactcert/verifier.go2
-rw-r--r--crypto/crypto_test.go2
-rw-r--r--crypto/cryptoerror.go2
-rw-r--r--crypto/curve25519.go2
-rw-r--r--crypto/curve25519_test.go2
-rw-r--r--crypto/encoding_test.go2
-rw-r--r--crypto/memcpy_chk_windows.c2
-rw-r--r--crypto/merklearray/array.go2
-rw-r--r--crypto/merklearray/layer.go2
-rw-r--r--crypto/merklearray/layer_test.go2
-rw-r--r--crypto/merklearray/merkle.go2
-rw-r--r--crypto/merklearray/merkle_test.go2
-rw-r--r--crypto/merklearray/partial.go2
-rw-r--r--crypto/merklearray/worker.go2
-rw-r--r--crypto/merkletrie/bitset.go2
-rw-r--r--crypto/merkletrie/bitset_test.go2
-rw-r--r--crypto/merkletrie/cache.go2
-rw-r--r--crypto/merkletrie/cache_test.go2
-rw-r--r--crypto/merkletrie/committer.go2
-rw-r--r--crypto/merkletrie/committer_test.go2
-rw-r--r--crypto/merkletrie/node.go2
-rw-r--r--crypto/merkletrie/node_test.go2
-rw-r--r--crypto/merkletrie/trie.go2
-rw-r--r--crypto/merkletrie/trie_test.go2
-rw-r--r--crypto/multisig.go2
-rw-r--r--crypto/multisig_test.go2
-rw-r--r--crypto/onetimesig.go2
-rw-r--r--crypto/onetimesig_test.go2
-rw-r--r--crypto/passphrase/errors.go2
-rw-r--r--crypto/passphrase/passphrase.go2
-rw-r--r--crypto/passphrase/passphrase_test.go2
-rw-r--r--crypto/passphrase/wordlist.go2
-rw-r--r--crypto/rand.go2
-rw-r--r--crypto/rand_test.go2
-rw-r--r--crypto/util.go2
-rw-r--r--crypto/util_test.go2
-rw-r--r--crypto/vrf.go2
-rw-r--r--crypto/vrf_test.go2
-rw-r--r--daemon/algod/api/algod.oas2.json100
-rw-r--r--daemon/algod/api/algod.oas3.yml137
-rw-r--r--daemon/algod/api/client/encoding.go2
-rw-r--r--daemon/algod/api/client/restClient.go2
-rw-r--r--daemon/algod/api/server/common/handlers.go2
-rw-r--r--daemon/algod/api/server/common/metrics.go2
-rw-r--r--daemon/algod/api/server/common/responses.go2
-rw-r--r--daemon/algod/api/server/common/routes.go2
-rw-r--r--daemon/algod/api/server/lib/common.go2
-rw-r--r--daemon/algod/api/server/lib/middlewares/auth.go2
-rw-r--r--daemon/algod/api/server/lib/middlewares/auth_test.go2
-rw-r--r--daemon/algod/api/server/lib/middlewares/connectionLimiter.go48
-rw-r--r--daemon/algod/api/server/lib/middlewares/connectionLimiter_test.go100
-rw-r--r--daemon/algod/api/server/lib/middlewares/cors.go2
-rw-r--r--daemon/algod/api/server/lib/middlewares/logger.go2
-rw-r--r--daemon/algod/api/server/router.go18
-rw-r--r--daemon/algod/api/server/router_test.go2
-rw-r--r--daemon/algod/api/server/v1/handlers/errors.go2
-rw-r--r--daemon/algod/api/server/v1/handlers/handlers.go2
-rw-r--r--daemon/algod/api/server/v1/handlers/handlers_test.go2
-rw-r--r--daemon/algod/api/server/v1/handlers/responses.go2
-rw-r--r--daemon/algod/api/server/v1/routes/routes.go2
-rw-r--r--daemon/algod/api/server/v2/account.go2
-rw-r--r--daemon/algod/api/server/v2/account_test.go2
-rw-r--r--daemon/algod/api/server/v2/dryrun.go2
-rw-r--r--daemon/algod/api/server/v2/dryrun_test.go2
-rw-r--r--daemon/algod/api/server/v2/errors.go2
-rw-r--r--daemon/algod/api/server/v2/generated/private/routes.go313
-rw-r--r--daemon/algod/api/server/v2/generated/private/types.go2
-rw-r--r--daemon/algod/api/server/v2/generated/routes.go346
-rw-r--r--daemon/algod/api/server/v2/generated/types.go2
-rw-r--r--daemon/algod/api/server/v2/handlers.go31
-rw-r--r--daemon/algod/api/server/v2/test/handlers_test.go113
-rw-r--r--daemon/algod/api/server/v2/test/helpers.go14
-rw-r--r--daemon/algod/api/server/v2/utils.go2
-rw-r--r--daemon/algod/api/spec/common/model.go2
-rw-r--r--daemon/algod/api/spec/v1/model.go2
-rw-r--r--daemon/algod/deadlockLogger.go2
-rw-r--r--daemon/algod/deadlock_test.go2
-rw-r--r--daemon/algod/server.go46
-rw-r--r--daemon/algod/server_test.go2
-rw-r--r--daemon/kmd/api/api.go2
-rw-r--r--daemon/kmd/api/cors.go2
-rw-r--r--daemon/kmd/api/v1/auth.go2
-rw-r--r--daemon/kmd/api/v1/errors.go2
-rw-r--r--daemon/kmd/api/v1/handlers.go2
-rw-r--r--daemon/kmd/client/client.go2
-rw-r--r--daemon/kmd/client/requests.go2
-rw-r--r--daemon/kmd/client/wrappers.go2
-rw-r--r--daemon/kmd/config/config.go2
-rw-r--r--daemon/kmd/config/errors.go2
-rw-r--r--daemon/kmd/kmd.go2
-rw-r--r--daemon/kmd/lib/kmdapi/common.go2
-rw-r--r--daemon/kmd/lib/kmdapi/requests.go2
-rw-r--r--daemon/kmd/lib/kmdapi/responses.go2
-rw-r--r--daemon/kmd/server/errors.go2
-rw-r--r--daemon/kmd/server/server.go2
-rw-r--r--daemon/kmd/session/auth.go2
-rw-r--r--daemon/kmd/session/session.go2
-rw-r--r--daemon/kmd/wallet/driver/driver.go2
-rw-r--r--daemon/kmd/wallet/driver/ledger.go2
-rw-r--r--daemon/kmd/wallet/driver/ledger_errors.go2
-rw-r--r--daemon/kmd/wallet/driver/ledger_hid.go2
-rw-r--r--daemon/kmd/wallet/driver/sqlite.go2
-rw-r--r--daemon/kmd/wallet/driver/sqlite_crypto.go2
-rw-r--r--daemon/kmd/wallet/driver/sqlite_errors.go2
-rw-r--r--daemon/kmd/wallet/driver/util.go2
-rw-r--r--daemon/kmd/wallet/wallet.go2
-rw-r--r--data/abi/abi_encode.go43
-rw-r--r--data/abi/abi_encode_test.go259
-rw-r--r--data/abi/abi_json.go2
-rw-r--r--data/abi/abi_json_test.go2
-rw-r--r--data/abi/abi_type.go2
-rw-r--r--data/abi/abi_type_test.go2
-rw-r--r--data/account/account.go2
-rw-r--r--data/account/msgp_gen.go160
-rw-r--r--data/account/msgp_gen_test.go60
-rw-r--r--data/account/partInstall.go2
-rw-r--r--data/account/participation.go2
-rw-r--r--data/account/participationRegistry.go38
-rw-r--r--data/account/participationRegistryBench_test.go2
-rw-r--r--data/account/participationRegistry_test.go2
-rw-r--r--data/account/participation_test.go2
-rw-r--r--data/account/rootInstall.go2
-rw-r--r--data/accountManager.go2
-rw-r--r--data/basics/address.go2
-rw-r--r--data/basics/address_test.go2
-rw-r--r--data/basics/ccertpart.go2
-rw-r--r--data/basics/fields_test.go2
-rw-r--r--data/basics/overflow.go2
-rw-r--r--data/basics/sort.go2
-rw-r--r--data/basics/teal.go2
-rw-r--r--data/basics/teal_test.go2
-rw-r--r--data/basics/units.go2
-rw-r--r--data/basics/units_test.go2
-rw-r--r--data/basics/userBalance.go2
-rw-r--r--data/basics/userBalance_test.go2
-rw-r--r--data/bookkeeping/block.go2
-rw-r--r--data/bookkeeping/block_test.go2
-rw-r--r--data/bookkeeping/encoding_test.go2
-rw-r--r--data/bookkeeping/genesis.go2
-rw-r--r--data/bookkeeping/prettyprinting.go2
-rw-r--r--data/bookkeeping/txn_merkle.go2
-rw-r--r--data/bookkeeping/txn_merkle_test.go2
-rw-r--r--data/committee/committee.go2
-rw-r--r--data/committee/common_test.go2
-rw-r--r--data/committee/credential.go2
-rw-r--r--data/committee/credential_test.go2
-rw-r--r--data/committee/encoding_test.go2
-rw-r--r--data/committee/sortition/sortition.go2
-rw-r--r--data/committee/sortition/sortition_test.go2
-rw-r--r--data/common_test.go2
-rw-r--r--data/datatest/fabricateLedger.go2
-rw-r--r--data/datatest/impls.go2
-rw-r--r--data/hashable/message.go2
-rw-r--r--data/ledger.go2
-rw-r--r--data/ledger_test.go2
-rw-r--r--data/pools/statusCache.go2
-rw-r--r--data/pools/transactionPool.go2
-rw-r--r--data/pools/transactionPool_test.go2
-rw-r--r--data/transactions/application.go2
-rw-r--r--data/transactions/application_test.go2
-rw-r--r--data/transactions/asset.go2
-rw-r--r--data/transactions/common_test.go2
-rw-r--r--data/transactions/compactcert.go2
-rw-r--r--data/transactions/error.go2
-rw-r--r--data/transactions/keyreg.go2
-rw-r--r--data/transactions/logic/assembler.go2
-rw-r--r--data/transactions/logic/assembler_test.go2
-rw-r--r--data/transactions/logic/backwardCompat_test.go2
-rw-r--r--data/transactions/logic/debugger.go2
-rw-r--r--data/transactions/logic/debugger_test.go2
-rw-r--r--data/transactions/logic/doc.go2
-rw-r--r--data/transactions/logic/doc_test.go2
-rw-r--r--data/transactions/logic/eval.go2
-rw-r--r--data/transactions/logic/evalAppTxn_test.go2
-rw-r--r--data/transactions/logic/evalCrypto_test.go2
-rw-r--r--data/transactions/logic/evalStateful_test.go2
-rw-r--r--data/transactions/logic/eval_test.go2
-rw-r--r--data/transactions/logic/fields.go2
-rw-r--r--data/transactions/logic/fields_test.go2
-rw-r--r--data/transactions/logic/opcodes.go2
-rw-r--r--data/transactions/logic/opcodes_test.go2
-rw-r--r--data/transactions/logic/program.go2
-rw-r--r--data/transactions/logicsig.go2
-rw-r--r--data/transactions/logictest/ledger.go2
-rw-r--r--data/transactions/payment.go2
-rw-r--r--data/transactions/payment_test.go2
-rw-r--r--data/transactions/payset.go2
-rw-r--r--data/transactions/payset_test.go2
-rw-r--r--data/transactions/perf_test.go2
-rw-r--r--data/transactions/signedtxn.go2
-rw-r--r--data/transactions/signedtxn_test.go2
-rw-r--r--data/transactions/sort.go2
-rw-r--r--data/transactions/teal.go2
-rw-r--r--data/transactions/teal_test.go2
-rw-r--r--data/transactions/testhelpers.go2
-rw-r--r--data/transactions/transaction.go2
-rw-r--r--data/transactions/transaction_test.go2
-rw-r--r--data/transactions/verify/txn.go2
-rw-r--r--data/transactions/verify/txn_test.go2
-rw-r--r--data/transactions/verify/verifiedTxnCache.go2
-rw-r--r--data/transactions/verify/verifiedTxnCache_test.go2
-rw-r--r--data/txHandler.go2
-rw-r--r--data/txHandler_test.go2
-rw-r--r--data/txntest/txn.go2
-rw-r--r--gen/generate.go2
-rw-r--r--gen/generate_test.go2
-rw-r--r--gen/walletData.go2
-rw-r--r--installer/config.json.example5
-rw-r--r--ledger/accountdb.go2
-rw-r--r--ledger/accountdb_test.go2
-rw-r--r--ledger/acctupdates.go2
-rw-r--r--ledger/acctupdates_test.go202
-rw-r--r--ledger/applications_test.go2
-rw-r--r--ledger/apply/application.go2
-rw-r--r--ledger/apply/application_test.go2
-rw-r--r--ledger/apply/apply.go2
-rw-r--r--ledger/apply/asset.go2
-rw-r--r--ledger/apply/asset_test.go2
-rw-r--r--ledger/apply/keyreg.go2
-rw-r--r--ledger/apply/keyreg_test.go2
-rw-r--r--ledger/apply/mockBalances_test.go2
-rw-r--r--ledger/apply/payment.go2
-rw-r--r--ledger/apply/payment_test.go2
-rw-r--r--ledger/apptxn_test.go2
-rw-r--r--ledger/archival_test.go2
-rw-r--r--ledger/blockdb.go2
-rw-r--r--ledger/blockdb_test.go2
-rw-r--r--ledger/blockqueue.go2
-rw-r--r--ledger/blockqueue_test.go2
-rw-r--r--ledger/bulletin.go2
-rw-r--r--ledger/bulletin_test.go2
-rw-r--r--ledger/catchpointtracker.go2
-rw-r--r--ledger/catchpointtracker_test.go10
-rw-r--r--ledger/catchpointwriter.go2
-rw-r--r--ledger/catchpointwriter_test.go2
-rw-r--r--ledger/catchupaccessor.go2
-rw-r--r--ledger/catchupaccessor_test.go2
-rw-r--r--ledger/evalbench_test.go2
-rw-r--r--ledger/evalindexer.go2
-rw-r--r--ledger/evalindexer_test.go2
-rw-r--r--ledger/internal/appcow.go2
-rw-r--r--ledger/internal/appcow_test.go2
-rw-r--r--ledger/internal/applications.go2
-rw-r--r--ledger/internal/applications_test.go2
-rw-r--r--ledger/internal/assetcow.go2
-rw-r--r--ledger/internal/compactcert.go2
-rw-r--r--ledger/internal/compactcert_test.go2
-rw-r--r--ledger/internal/cow.go2
-rw-r--r--ledger/internal/cow_test.go2
-rw-r--r--ledger/internal/eval.go2
-rw-r--r--ledger/internal/eval_blackbox_test.go2
-rw-r--r--ledger/internal/eval_test.go2
-rw-r--r--ledger/internal/evalindexer.go2
-rw-r--r--ledger/ledger.go2
-rw-r--r--ledger/ledger_perf_test.go2
-rw-r--r--ledger/ledger_test.go2
-rw-r--r--ledger/ledgercore/catchpointlabel.go2
-rw-r--r--ledger/ledgercore/catchpointlabel_test.go2
-rw-r--r--ledger/ledgercore/error.go2
-rw-r--r--ledger/ledgercore/misc.go2
-rw-r--r--ledger/ledgercore/onlineacct.go2
-rw-r--r--ledger/ledgercore/statedelta.go2
-rw-r--r--ledger/ledgercore/statedelta_test.go2
-rw-r--r--ledger/ledgercore/totals.go2
-rw-r--r--ledger/ledgercore/totals_test.go2
-rw-r--r--ledger/ledgercore/validatedBlock.go2
-rw-r--r--ledger/ledgercore/votersForRound.go2
-rw-r--r--ledger/lruaccts.go2
-rw-r--r--ledger/lruaccts_test.go2
-rw-r--r--ledger/metrics.go2
-rw-r--r--ledger/notifier.go2
-rw-r--r--ledger/onlinetopheap.go2
-rw-r--r--ledger/onlinetopheap_test.go2
-rw-r--r--ledger/perf_test.go2
-rw-r--r--ledger/persistedaccts_list.go2
-rw-r--r--ledger/persistedaccts_list_test.go2
-rw-r--r--ledger/roundlru.go2
-rw-r--r--ledger/roundlru_test.go2
-rw-r--r--ledger/testing/accountsTotals.go2
-rw-r--r--ledger/testing/initState.go2
-rw-r--r--ledger/testing/randomAccounts.go2
-rw-r--r--ledger/testing/testGenesis.go2
-rw-r--r--ledger/tracker.go2
-rw-r--r--ledger/trackerdb.go2
-rw-r--r--ledger/txtail.go2
-rw-r--r--ledger/txtail_test.go2
-rw-r--r--ledger/voters.go2
-rw-r--r--libgoal/accounts.go2
-rw-r--r--libgoal/error.go2
-rw-r--r--libgoal/libgoal.go2
-rw-r--r--libgoal/libgoal_test.go2
-rw-r--r--libgoal/lockedFile.go2
-rw-r--r--libgoal/lockedFileLinux.go2
-rw-r--r--libgoal/lockedFileUnix.go2
-rw-r--r--libgoal/lockedFileWindows.go2
-rw-r--r--libgoal/participation.go2
-rw-r--r--libgoal/system.go2
-rw-r--r--libgoal/teal.go2
-rw-r--r--libgoal/transactions.go2
-rw-r--r--libgoal/unencryptedWallet.go2
-rw-r--r--libgoal/walletHandles.go2
-rw-r--r--libgoal/wallets.go2
-rw-r--r--logging/collector.go2
-rw-r--r--logging/cyclicWriter.go2
-rw-r--r--logging/cyclicWriter_test.go2
-rw-r--r--logging/logBuffer.go2
-rw-r--r--logging/logBuffer_test.go2
-rw-r--r--logging/log_test.go2
-rw-r--r--logging/logspec/agreement.go2
-rw-r--r--logging/logspec/ledger.go2
-rw-r--r--logging/logspec/root.go2
-rw-r--r--logging/telemetry.go2
-rw-r--r--logging/telemetryCommon.go2
-rw-r--r--logging/telemetryConfig.go2
-rw-r--r--logging/telemetryConfig_test.go2
-rw-r--r--logging/telemetryFilteredHook.go2
-rw-r--r--logging/telemetryOperation.go2
-rw-r--r--logging/telemetry_test.go2
-rw-r--r--logging/telemetryhook.go2
-rw-r--r--logging/telemetryhook_test.go9
-rw-r--r--logging/telemetryspec/category.go2
-rw-r--r--logging/telemetryspec/event.go2
-rw-r--r--logging/telemetryspec/eventTiming.go2
-rw-r--r--logging/telemetryspec/metric.go2
-rw-r--r--logging/telemetryspec/metric_test.go2
-rw-r--r--logging/telemetryspec/operation.go2
-rw-r--r--logging/testingLogger.go2
-rw-r--r--logging/usage.go2
-rw-r--r--netdeploy/network.go2
-rw-r--r--netdeploy/networkTemplate.go2
-rw-r--r--netdeploy/networkTemplates_test.go2
-rw-r--r--netdeploy/network_test.go2
-rw-r--r--netdeploy/remote/bootstrappedNetwork.go2
-rw-r--r--netdeploy/remote/bootstrappedNetwork_test.go2
-rw-r--r--netdeploy/remote/buildConfig.go2
-rw-r--r--netdeploy/remote/deployedNetwork.go2
-rw-r--r--netdeploy/remote/deployedNetwork_test.go2
-rw-r--r--netdeploy/remote/hostConfig.go2
-rw-r--r--netdeploy/remote/hostTemplate.go2
-rw-r--r--netdeploy/remote/nodeConfig.go2
-rw-r--r--netdeploy/remote/nodeWalletData.go2
-rw-r--r--netdeploy/remote/nodecfg/nodeConfigurator.go2
-rw-r--r--netdeploy/remote/nodecfg/nodeDir.go2
-rw-r--r--netdeploy/remote/topology.go2
-rw-r--r--network/connPerfMon.go2
-rw-r--r--network/connPerfMon_test.go2
-rw-r--r--network/dialer.go2
-rw-r--r--network/limited_reader_slurper.go2
-rw-r--r--network/limited_reader_slurper_test.go2
-rw-r--r--network/limitlistener/helper_stub_test.go12
-rw-r--r--network/limitlistener/helper_unix_test.go18
-rw-r--r--network/limitlistener/helper_windows_test.go9
-rw-r--r--network/limitlistener/rejectingLimitListener.go85
-rw-r--r--network/limitlistener/rejectingLimitListener_test.go144
-rw-r--r--network/messageFilter.go2
-rw-r--r--network/messageFilter_test.go2
-rw-r--r--network/messagetracer/graphtrace.go2
-rw-r--r--network/messagetracer/interface.go2
-rw-r--r--network/msgOfInterest.go2
-rw-r--r--network/msgOfInterest_test.go2
-rw-r--r--network/multiplexer.go2
-rw-r--r--network/multiplexer_test.go2
-rw-r--r--network/netprio.go2
-rw-r--r--network/netprio_test.go2
-rw-r--r--network/peersheap.go2
-rw-r--r--network/phonebook.go2
-rw-r--r--network/phonebook_test.go2
-rw-r--r--network/rateLimitingTransport.go2
-rw-r--r--network/requestLogger.go2
-rw-r--r--network/requestLogger_test.go2
-rw-r--r--network/requestTracker.go2
-rw-r--r--network/requestTracker_test.go2
-rw-r--r--network/topics.go2
-rw-r--r--network/topics_test.go2
-rw-r--r--network/wsNetwork.go24
-rw-r--r--network/wsNetwork_common.go68
-rw-r--r--network/wsNetwork_test.go3
-rw-r--r--network/wsNetwork_windows.go23
-rw-r--r--network/wsPeer.go2
-rw-r--r--network/wsPeer_test.go2
-rw-r--r--node/assemble_test.go2
-rw-r--r--node/error.go2
-rw-r--r--node/impls.go2
-rw-r--r--node/indexer/db.go2
-rw-r--r--node/indexer/indexer.go2
-rw-r--r--node/indexer/indexer_test.go2
-rw-r--r--node/netprio.go2
-rw-r--r--node/node.go28
-rw-r--r--node/node_test.go4
-rw-r--r--node/poolStats.go2
-rw-r--r--node/topAccountListener.go2
-rw-r--r--node/topAccountListener_test.go2
-rw-r--r--nodecontrol/LaggedStdIo.go2
-rw-r--r--nodecontrol/NodeController.go2
-rw-r--r--nodecontrol/algodControl.go2
-rw-r--r--nodecontrol/algodControl_test.go2
-rw-r--r--nodecontrol/kmdControl.go2
-rw-r--r--nodecontrol/kmdControl_common.go2
-rw-r--r--nodecontrol/kmdControl_windows.go2
-rw-r--r--nodecontrol/nodeControlErrors.go2
-rw-r--r--protocol/codec.go2
-rw-r--r--protocol/codec_test.go2
-rw-r--r--protocol/codec_tester.go2
-rw-r--r--protocol/compactcerts.go2
-rw-r--r--protocol/consensus.go2
-rw-r--r--protocol/encodebench_test.go2
-rw-r--r--protocol/hash.go2
-rw-r--r--protocol/networks.go2
-rw-r--r--protocol/tags.go2
-rw-r--r--protocol/test/allocbound_slice.go2
-rw-r--r--protocol/transcode/core.go2
-rw-r--r--protocol/transcode/core_test.go2
-rw-r--r--protocol/txntype.go2
-rw-r--r--rpcs/blockService.go2
-rw-r--r--rpcs/blockService_test.go2
-rw-r--r--rpcs/httpTxSync.go2
-rw-r--r--rpcs/ledgerService.go2
-rw-r--r--rpcs/registrar.go2
-rw-r--r--rpcs/txService.go2
-rw-r--r--rpcs/txService_test.go2
-rw-r--r--rpcs/txSyncer.go2
-rw-r--r--rpcs/txSyncer_test.go2
-rw-r--r--shared/algoh/config.go2
-rw-r--r--shared/pingpong/accounts.go2
-rw-r--r--shared/pingpong/config.go2
-rw-r--r--shared/pingpong/pingpong.go2
-rw-r--r--test/commandandcontrol/cc_agent/component/agent.go2
-rw-r--r--test/commandandcontrol/cc_agent/component/agent_test.go2
-rw-r--r--test/commandandcontrol/cc_agent/component/pingPongComponent.go2
-rw-r--r--test/commandandcontrol/cc_agent/main.go2
-rw-r--r--test/commandandcontrol/cc_client/main.go2
-rw-r--r--test/commandandcontrol/cc_service/main.go2
-rw-r--r--test/commandandcontrol/lib/ccCommon.go2
-rw-r--r--test/e2e-go/cli/algod/cleanup_test.go2
-rw-r--r--test/e2e-go/cli/algod/expect/algod_expect_test.go2
-rw-r--r--test/e2e-go/cli/algod/stdstreams_test.go2
-rw-r--r--test/e2e-go/cli/algoh/expect/algoh_expect_test.go2
-rw-r--r--test/e2e-go/cli/goal/account_test.go2
-rw-r--r--test/e2e-go/cli/goal/clerk_test.go2
-rw-r--r--test/e2e-go/cli/goal/common_test.go2
-rw-r--r--test/e2e-go/cli/goal/expect/catchpointCatchupWebProxy/webproxy.go2
-rw-r--r--test/e2e-go/cli/goal/expect/goal_expect_test.go2
-rw-r--r--test/e2e-go/cli/goal/node_cleanup_test.go2
-rw-r--r--test/e2e-go/cli/perf/libgoal_test.go2
-rw-r--r--test/e2e-go/cli/perf/payment_test.go2
-rw-r--r--test/e2e-go/cli/tealdbg/cdtmock/main.go2
-rw-r--r--test/e2e-go/cli/tealdbg/expect/tealdbg_expect_test.go2
-rw-r--r--test/e2e-go/features/catchup/basicCatchup_test.go91
-rw-r--r--test/e2e-go/features/catchup/catchpointCatchup_test.go2
-rw-r--r--test/e2e-go/features/compactcert/compactcert_test.go2
-rw-r--r--test/e2e-go/features/devmode/devmode_test.go2
-rw-r--r--test/e2e-go/features/multisig/multisig_test.go2
-rw-r--r--test/e2e-go/features/participation/accountParticipationTransitions_test.go2
-rw-r--r--test/e2e-go/features/participation/onlineOfflineParticipation_test.go2
-rw-r--r--test/e2e-go/features/participation/overlappingParticipationKeys_test.go2
-rw-r--r--test/e2e-go/features/participation/participationExpiration_test.go2
-rw-r--r--test/e2e-go/features/participation/participationRewards_test.go2
-rw-r--r--test/e2e-go/features/partitionRecovery/partitionRecovery_test.go2
-rw-r--r--test/e2e-go/features/teal/compile_test.go2
-rw-r--r--test/e2e-go/features/transactions/accountv2_test.go2
-rw-r--r--test/e2e-go/features/transactions/app_pages_test.go2
-rw-r--r--test/e2e-go/features/transactions/application_test.go2
-rw-r--r--test/e2e-go/features/transactions/asset_test.go2
-rw-r--r--test/e2e-go/features/transactions/close_account_test.go2
-rw-r--r--test/e2e-go/features/transactions/group_test.go2
-rw-r--r--test/e2e-go/features/transactions/lease_test.go2
-rw-r--r--test/e2e-go/features/transactions/onlineStatusChange_test.go2
-rw-r--r--test/e2e-go/features/transactions/proof_test.go2
-rw-r--r--test/e2e-go/features/transactions/sendReceive_test.go2
-rw-r--r--test/e2e-go/globals/constants.go2
-rw-r--r--test/e2e-go/kmd/e2e_kmd_server_client_test.go2
-rw-r--r--test/e2e-go/kmd/e2e_kmd_sqlite_test.go2
-rw-r--r--test/e2e-go/kmd/e2e_kmd_wallet_keyops_test.go2
-rw-r--r--test/e2e-go/kmd/e2e_kmd_wallet_multisig_test.go2
-rw-r--r--test/e2e-go/kmd/e2e_kmd_wallet_test.go2
-rw-r--r--test/e2e-go/perf/basic_test.go2
-rw-r--r--test/e2e-go/restAPI/restClient_test.go2
-rw-r--r--test/e2e-go/stress/transactions/createManyAndGoOnline_test.go2
-rw-r--r--test/e2e-go/upgrades/application_support_test.go2
-rw-r--r--test/e2e-go/upgrades/rekey_support_test.go2
-rw-r--r--test/e2e-go/upgrades/send_receive_upgrade_test.go2
-rw-r--r--test/framework/fixtures/baseFixture.go2
-rw-r--r--test/framework/fixtures/expectFixture.go2
-rw-r--r--test/framework/fixtures/fixture.go2
-rw-r--r--test/framework/fixtures/goalFixture.go2
-rw-r--r--test/framework/fixtures/kmdFixture.go2
-rw-r--r--test/framework/fixtures/libgoalFixture.go2
-rw-r--r--test/framework/fixtures/restClientFixture.go2
-rw-r--r--test/framework/fixtures/webProxyFixture.go2
-rw-r--r--test/linttest/lintissues.go2
-rw-r--r--test/netperf-go/puppeteer/main.go2
-rw-r--r--test/netperf-go/puppeteer/promMetricFetcher.go2
-rw-r--r--test/netperf-go/puppeteer/promMetricFetcher_test.go2
-rw-r--r--test/netperf-go/puppeteer/puppeteer.go2
-rw-r--r--test/netperf-go/puppeteer/puppeteer_test.go2
-rw-r--r--test/netperf-go/puppeteer/roundpoller.go2
-rw-r--r--test/partitiontest/filtering.go2
-rwxr-xr-xtest/scripts/e2e_subs/e2e-app-abi-method.sh31
-rw-r--r--test/scripts/e2e_subs/tealprogs/app-abi-method-example.teal148
-rw-r--r--test/testdata/configs/config-v20.json100
-rw-r--r--test/testdata/consensus/catchpointtestingprotocol.json1
-rw-r--r--tools/debug/carpenter/main.go2
-rw-r--r--tools/debug/coroner/main.go2
-rw-r--r--tools/debug/doberman/logo.go2
-rw-r--r--tools/debug/doberman/main.go2
-rw-r--r--tools/debug/genconsensusconfig/main.go2
-rw-r--r--tools/debug/logfilter/main.go2
-rw-r--r--tools/debug/logfilter/main_test.go2
-rw-r--r--tools/misc/convertAddress.go2
-rw-r--r--tools/network/bootstrap.go2
-rw-r--r--tools/network/cloudflare/cloudflare.go2
-rw-r--r--tools/network/cloudflare/createRecord.go2
-rw-r--r--tools/network/cloudflare/deleteRecord.go2
-rw-r--r--tools/network/cloudflare/helpers.go2
-rw-r--r--tools/network/cloudflare/listRecords.go2
-rw-r--r--tools/network/cloudflare/updateRecord.go2
-rw-r--r--tools/network/cloudflare/zones.go2
-rw-r--r--tools/network/dnssec/anchor.go2
-rw-r--r--tools/network/dnssec/anchor_test.go2
-rw-r--r--tools/network/dnssec/client.go2
-rw-r--r--tools/network/dnssec/client_test.go2
-rw-r--r--tools/network/dnssec/config.go2
-rw-r--r--tools/network/dnssec/config_test.go2
-rw-r--r--tools/network/dnssec/config_unix.go2
-rw-r--r--tools/network/dnssec/config_unix_test.go2
-rw-r--r--tools/network/dnssec/config_windows.go2
-rw-r--r--tools/network/dnssec/dialer.go2
-rw-r--r--tools/network/dnssec/dnssec_test.go2
-rw-r--r--tools/network/dnssec/relay-check/main.go2
-rw-r--r--tools/network/dnssec/resolver.go2
-rw-r--r--tools/network/dnssec/sort.go2
-rw-r--r--tools/network/dnssec/sort_test.go2
-rw-r--r--tools/network/dnssec/testHarness.go2
-rw-r--r--tools/network/dnssec/trustchain.go2
-rw-r--r--tools/network/dnssec/trustedchain_test.go2
-rw-r--r--tools/network/dnssec/trustedzone.go2
-rw-r--r--tools/network/dnssec/trustedzone_test.go2
-rw-r--r--tools/network/dnssec/util.go2
-rw-r--r--tools/network/dnssec/util_test.go2
-rw-r--r--tools/network/externalIP.go2
-rw-r--r--tools/network/resolveController.go2
-rw-r--r--tools/network/resolveController_test.go2
-rw-r--r--tools/network/resolver.go2
-rw-r--r--tools/network/resolver_test.go2
-rw-r--r--tools/network/telemetryURIUpdateService.go2
-rw-r--r--tools/network/telemetryURIUpdateService_test.go2
-rw-r--r--tools/teal/algotmpl/extract.go2
-rw-r--r--tools/teal/algotmpl/main.go2
-rw-r--r--tools/teal/dkey/dsign/main.go2
-rw-r--r--tools/teal/tealcut/main.go2
-rw-r--r--util/codecs/json.go2
-rw-r--r--util/codecs/json_test.go2
-rw-r--r--util/condvar/timedwait.go2
-rw-r--r--util/condvar/timedwait_test.go2
-rw-r--r--util/db/dbpair.go2
-rw-r--r--util/db/dbutil.go58
-rw-r--r--util/db/dbutil_test.go2
-rw-r--r--util/db/fullfsync_darwin.go2
-rw-r--r--util/db/initialize.go2
-rw-r--r--util/db/initialize_test.go2
-rw-r--r--util/db/perf_test.go2
-rw-r--r--util/db/queryable.go2
-rw-r--r--util/db/versioning.go2
-rw-r--r--util/db/versioning_test.go2
-rw-r--r--util/execpool/backlog.go2
-rw-r--r--util/execpool/pool.go2
-rw-r--r--util/io.go2
-rw-r--r--util/metrics/counter.go2
-rw-r--r--util/metrics/counterCommon.go2
-rw-r--r--util/metrics/counter_test.go2
-rw-r--r--util/metrics/gauge.go2
-rw-r--r--util/metrics/gauge_test.go2
-rw-r--r--util/metrics/metrics.go2
-rw-r--r--util/metrics/metrics_test.go2
-rw-r--r--util/metrics/registry.go2
-rw-r--r--util/metrics/registryCommon.go2
-rw-r--r--util/metrics/registry_test.go2
-rw-r--r--util/metrics/reporter.go2
-rwxr-xr-xutil/metrics/reporter_test.go2
-rw-r--r--util/metrics/segment.go2
-rw-r--r--util/metrics/segment_test.go2
-rw-r--r--util/metrics/service.go2
-rw-r--r--util/metrics/serviceCommon.go2
-rw-r--r--util/metrics/stringGauge.go2
-rw-r--r--util/metrics/stringGaugeCommon.go2
-rw-r--r--util/metrics/stringGauge_test.go2
-rw-r--r--util/metrics/tagcounter.go2
-rw-r--r--util/metrics/tagcounter_test.go2
-rw-r--r--util/process.go2
-rw-r--r--util/process_common.go2
-rw-r--r--util/process_windows.go2
-rw-r--r--util/s3/fileIterator.go2
-rw-r--r--util/s3/s3Helper.go2
-rw-r--r--util/s3/s3Helper_test.go2
-rw-r--r--util/tar/tar.go2
-rw-r--r--util/tar/untar.go2
-rw-r--r--util/timers/frozen.go2
-rw-r--r--util/timers/interface.go2
-rw-r--r--util/timers/monotonic.go2
-rw-r--r--util/timers/monotonic_test.go2
-rw-r--r--util/tokens/tokens.go2
-rw-r--r--util/util.go13
-rw-r--r--util/util_windows.go6
-rw-r--r--util/watchdogStreamReader.go2
876 files changed, 3164 insertions, 1609 deletions
diff --git a/README.md b/README.md
index 664bd207d..a935722f7 100644
--- a/README.md
+++ b/README.md
@@ -192,6 +192,6 @@ A number of packages provide utilities for the various components:
Please see the [COPYING_FAQ](COPYING_FAQ) for details about how to apply our license.
-Copyright (C) 2019-2021, Algorand Inc.
+Copyright (C) 2019-2022, Algorand Inc.
[developer site url]: https://developer.algorand.org/
diff --git a/agreement/abstractions.go b/agreement/abstractions.go
index 390b32dfd..5201ac62f 100644
--- a/agreement/abstractions.go
+++ b/agreement/abstractions.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/actions.go b/agreement/actions.go
index 48785efaf..a272545c9 100644
--- a/agreement/actions.go
+++ b/agreement/actions.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/actor.go b/agreement/actor.go
index db0b07ed9..96106eb13 100644
--- a/agreement/actor.go
+++ b/agreement/actor.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/agreeInstall.go b/agreement/agreeInstall.go
index 7bb5d80c5..1028eedb9 100644
--- a/agreement/agreeInstall.go
+++ b/agreement/agreeInstall.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/agreementtest/keyManager.go b/agreement/agreementtest/keyManager.go
index 340c8f40e..8948238a0 100644
--- a/agreement/agreementtest/keyManager.go
+++ b/agreement/agreementtest/keyManager.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/agreementtest/simulate.go b/agreement/agreementtest/simulate.go
index 68bf77337..086d1f5dc 100644
--- a/agreement/agreementtest/simulate.go
+++ b/agreement/agreementtest/simulate.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/agreementtest/simulate_test.go b/agreement/agreementtest/simulate_test.go
index c2dcbe233..173f91fad 100644
--- a/agreement/agreementtest/simulate_test.go
+++ b/agreement/agreementtest/simulate_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/asyncVoteVerifier.go b/agreement/asyncVoteVerifier.go
index 072fb2f15..cb26b440e 100644
--- a/agreement/asyncVoteVerifier.go
+++ b/agreement/asyncVoteVerifier.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/asyncVoteVerifier_test.go b/agreement/asyncVoteVerifier_test.go
index 6cfadedd8..40ad59d5e 100644
--- a/agreement/asyncVoteVerifier_test.go
+++ b/agreement/asyncVoteVerifier_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/autopsy.go b/agreement/autopsy.go
index be935aa79..2b344f0a6 100644
--- a/agreement/autopsy.go
+++ b/agreement/autopsy.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/bundle.go b/agreement/bundle.go
index 04780f12b..211f67b5b 100644
--- a/agreement/bundle.go
+++ b/agreement/bundle.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/bundle_test.go b/agreement/bundle_test.go
index 0ab62dede..615b2c508 100644
--- a/agreement/bundle_test.go
+++ b/agreement/bundle_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/cadaver.go b/agreement/cadaver.go
index 5692b62dd..7b0cb8e76 100644
--- a/agreement/cadaver.go
+++ b/agreement/cadaver.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/certificate.go b/agreement/certificate.go
index 3f6ea0d51..34c4192d8 100644
--- a/agreement/certificate.go
+++ b/agreement/certificate.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/certificate_test.go b/agreement/certificate_test.go
index e8b10e810..4881ac244 100644
--- a/agreement/certificate_test.go
+++ b/agreement/certificate_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/common_test.go b/agreement/common_test.go
index 9ecf5b4b9..fa43d1091 100644
--- a/agreement/common_test.go
+++ b/agreement/common_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/coservice.go b/agreement/coservice.go
index 38939e56d..0126cb85d 100644
--- a/agreement/coservice.go
+++ b/agreement/coservice.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/cryptoRequestContext.go b/agreement/cryptoRequestContext.go
index b6441efcc..88530e357 100644
--- a/agreement/cryptoRequestContext.go
+++ b/agreement/cryptoRequestContext.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/cryptoRequestContext_test.go b/agreement/cryptoRequestContext_test.go
index bdd98b8fd..d41533f2a 100644
--- a/agreement/cryptoRequestContext_test.go
+++ b/agreement/cryptoRequestContext_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/cryptoVerifier.go b/agreement/cryptoVerifier.go
index 4f84ca3ba..ff8a6d6aa 100644
--- a/agreement/cryptoVerifier.go
+++ b/agreement/cryptoVerifier.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/cryptoVerifier_test.go b/agreement/cryptoVerifier_test.go
index 78e6f6488..939f8aa71 100644
--- a/agreement/cryptoVerifier_test.go
+++ b/agreement/cryptoVerifier_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/demux.go b/agreement/demux.go
index a65e5552c..fe48f604b 100644
--- a/agreement/demux.go
+++ b/agreement/demux.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -21,7 +21,6 @@ import (
"fmt"
"time"
- "github.com/algorand/go-algorand/config"
"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-algorand/logging/logspec"
"github.com/algorand/go-algorand/protocol"
@@ -236,22 +235,7 @@ func (d *demux) next(s *Service, deadline time.Duration, fastDeadline time.Durat
ledgerNextRoundCh := s.Ledger.Wait(nextRound)
deadlineCh := s.Clock.TimeoutAt(deadline)
- var fastDeadlineCh <-chan time.Time
-
- fastPartitionRecoveryEnabled := false
- if proto, err := d.ledger.ConsensusVersion(ParamsRound(currentRound)); err != nil {
- logging.Base().Warnf("demux: could not get consensus parameters for round %d: %v", ParamsRound(currentRound), err)
- // this might happen during catchup, since the Ledger.Wait fires as soon as a new block is received by the ledger, which could be
- // far before it's being committed. In these cases, it should be safe to default to the current consensus version. On subsequent
- // iterations, it will get "corrected" since the ledger would finish flushing the blocks to disk.
- fastPartitionRecoveryEnabled = config.Consensus[protocol.ConsensusCurrentVersion].FastPartitionRecovery
- } else {
- fastPartitionRecoveryEnabled = config.Consensus[proto].FastPartitionRecovery
- }
-
- if fastPartitionRecoveryEnabled {
- fastDeadlineCh = s.Clock.TimeoutAt(fastDeadline)
- }
+ fastDeadlineCh := s.Clock.TimeoutAt(fastDeadline)
d.UpdateEventsQueue(eventQueueDemux, 0)
d.monitor.dec(demuxCoserviceType)
diff --git a/agreement/demux_test.go b/agreement/demux_test.go
index e351b9a79..0c15d58de 100644
--- a/agreement/demux_test.go
+++ b/agreement/demux_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/doc.go b/agreement/doc.go
index 7dcf6d077..ffbc79fa0 100644
--- a/agreement/doc.go
+++ b/agreement/doc.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/encoding_test.go b/agreement/encoding_test.go
index b59c633c8..9e899ca5c 100644
--- a/agreement/encoding_test.go
+++ b/agreement/encoding_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/errors.go b/agreement/errors.go
index ba5214b14..606e433b6 100644
--- a/agreement/errors.go
+++ b/agreement/errors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/events.go b/agreement/events.go
index e879f8584..7b631624a 100644
--- a/agreement/events.go
+++ b/agreement/events.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/bandwidthFilter_test.go b/agreement/fuzzer/bandwidthFilter_test.go
index 4b2af8397..e06ff7260 100644
--- a/agreement/fuzzer/bandwidthFilter_test.go
+++ b/agreement/fuzzer/bandwidthFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/catchupFilter_test.go b/agreement/fuzzer/catchupFilter_test.go
index b12c2e597..64493d840 100644
--- a/agreement/fuzzer/catchupFilter_test.go
+++ b/agreement/fuzzer/catchupFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/clockedFilter_test.go b/agreement/fuzzer/clockedFilter_test.go
index b26013de9..ceab6560a 100644
--- a/agreement/fuzzer/clockedFilter_test.go
+++ b/agreement/fuzzer/clockedFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/dropMessageFilter_test.go b/agreement/fuzzer/dropMessageFilter_test.go
index 1e728a506..519782c77 100644
--- a/agreement/fuzzer/dropMessageFilter_test.go
+++ b/agreement/fuzzer/dropMessageFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/duplicateMessageFilter_test.go b/agreement/fuzzer/duplicateMessageFilter_test.go
index 571806e2c..6d0e25f90 100644
--- a/agreement/fuzzer/duplicateMessageFilter_test.go
+++ b/agreement/fuzzer/duplicateMessageFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/filter_test.go b/agreement/fuzzer/filter_test.go
index 42d8e2e94..ede2d907e 100644
--- a/agreement/fuzzer/filter_test.go
+++ b/agreement/fuzzer/filter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/fuzzer.go b/agreement/fuzzer/fuzzer.go
index 1d96ab977..3c404015b 100644
--- a/agreement/fuzzer/fuzzer.go
+++ b/agreement/fuzzer/fuzzer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/fuzzer_test.go b/agreement/fuzzer/fuzzer_test.go
index c6cc91be7..42567ef95 100644
--- a/agreement/fuzzer/fuzzer_test.go
+++ b/agreement/fuzzer/fuzzer_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/ledger_test.go b/agreement/fuzzer/ledger_test.go
index 9866f53c4..2ae73dd69 100644
--- a/agreement/fuzzer/ledger_test.go
+++ b/agreement/fuzzer/ledger_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/messageDecoderFilter_test.go b/agreement/fuzzer/messageDecoderFilter_test.go
index fa9c34ce8..cb80ed990 100644
--- a/agreement/fuzzer/messageDecoderFilter_test.go
+++ b/agreement/fuzzer/messageDecoderFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/messageDelayFilter_test.go b/agreement/fuzzer/messageDelayFilter_test.go
index 2fc67b2f8..04cf55081 100644
--- a/agreement/fuzzer/messageDelayFilter_test.go
+++ b/agreement/fuzzer/messageDelayFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/messageDuplicationFilter_test.go b/agreement/fuzzer/messageDuplicationFilter_test.go
index 0d554e3b1..747301a11 100644
--- a/agreement/fuzzer/messageDuplicationFilter_test.go
+++ b/agreement/fuzzer/messageDuplicationFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/messagePriorityQueue_test.go b/agreement/fuzzer/messagePriorityQueue_test.go
index b903138ef..bbb9f1364 100644
--- a/agreement/fuzzer/messagePriorityQueue_test.go
+++ b/agreement/fuzzer/messagePriorityQueue_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/messageReflectionFilter_test.go b/agreement/fuzzer/messageReflectionFilter_test.go
index 7a61d0298..c1b58ef27 100644
--- a/agreement/fuzzer/messageReflectionFilter_test.go
+++ b/agreement/fuzzer/messageReflectionFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/messageRegossipFilter_test.go b/agreement/fuzzer/messageRegossipFilter_test.go
index eed7c0db1..628db283a 100644
--- a/agreement/fuzzer/messageRegossipFilter_test.go
+++ b/agreement/fuzzer/messageRegossipFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/messageReorderingFilter_test.go b/agreement/fuzzer/messageReorderingFilter_test.go
index 2e48bca4c..79680ab88 100644
--- a/agreement/fuzzer/messageReorderingFilter_test.go
+++ b/agreement/fuzzer/messageReorderingFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/networkFacade_test.go b/agreement/fuzzer/networkFacade_test.go
index 01d9f0437..6422a8c57 100644
--- a/agreement/fuzzer/networkFacade_test.go
+++ b/agreement/fuzzer/networkFacade_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/nodeCrashFilter_test.go b/agreement/fuzzer/nodeCrashFilter_test.go
index edef73e70..a15930b94 100644
--- a/agreement/fuzzer/nodeCrashFilter_test.go
+++ b/agreement/fuzzer/nodeCrashFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/nullFilter_test.go b/agreement/fuzzer/nullFilter_test.go
index e2112ebd1..0cc7300c3 100644
--- a/agreement/fuzzer/nullFilter_test.go
+++ b/agreement/fuzzer/nullFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/router_test.go b/agreement/fuzzer/router_test.go
index 62ac2c00c..f63bb389e 100644
--- a/agreement/fuzzer/router_test.go
+++ b/agreement/fuzzer/router_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/schedulerFilter_test.go b/agreement/fuzzer/schedulerFilter_test.go
index 514cd57ca..dd48aa533 100644
--- a/agreement/fuzzer/schedulerFilter_test.go
+++ b/agreement/fuzzer/schedulerFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/tests_test.go b/agreement/fuzzer/tests_test.go
index 22e1cc049..75a0cc67c 100644
--- a/agreement/fuzzer/tests_test.go
+++ b/agreement/fuzzer/tests_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/topologyFilter_test.go b/agreement/fuzzer/topologyFilter_test.go
index 2d2992fb9..841e9eb04 100644
--- a/agreement/fuzzer/topologyFilter_test.go
+++ b/agreement/fuzzer/topologyFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/trafficStatisticsFilter_test.go b/agreement/fuzzer/trafficStatisticsFilter_test.go
index e167604c1..802583c4d 100644
--- a/agreement/fuzzer/trafficStatisticsFilter_test.go
+++ b/agreement/fuzzer/trafficStatisticsFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/validator_test.go b/agreement/fuzzer/validator_test.go
index 726e09dba..95a198e5c 100644
--- a/agreement/fuzzer/validator_test.go
+++ b/agreement/fuzzer/validator_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/fuzzer/voteFilter_test.go b/agreement/fuzzer/voteFilter_test.go
index 9901b889f..e99a19b31 100644
--- a/agreement/fuzzer/voteFilter_test.go
+++ b/agreement/fuzzer/voteFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/gossip/network.go b/agreement/gossip/network.go
index d5e5dca03..21d564c29 100644
--- a/agreement/gossip/network.go
+++ b/agreement/gossip/network.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/gossip/networkFull_test.go b/agreement/gossip/networkFull_test.go
index ce49b579e..80b6475b8 100644
--- a/agreement/gossip/networkFull_test.go
+++ b/agreement/gossip/networkFull_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -38,7 +38,7 @@ func TestMain(m *testing.M) {
logging.Base().SetLevel(logging.Debug)
// increase limit on max allowed number of sockets
- err := util.RaiseRlimit(500)
+ err := util.SetFdSoftLimit(500)
if err != nil {
os.Exit(1)
}
@@ -50,7 +50,6 @@ func spinNetwork(t *testing.T, nodesCount int) ([]*networkImpl, []*messageCounte
cfg := config.GetDefaultLocal()
cfg.GossipFanout = nodesCount - 1
cfg.NetAddress = "127.0.0.1:0"
- cfg.IncomingConnectionsLimit = -1
cfg.IncomingMessageFilterBucketCount = 5
cfg.IncomingMessageFilterBucketSize = 32
cfg.OutgoingMessageFilterBucketCount = 3
diff --git a/agreement/gossip/network_test.go b/agreement/gossip/network_test.go
index 3bbf744ca..22176157e 100644
--- a/agreement/gossip/network_test.go
+++ b/agreement/gossip/network_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/keyManager_test.go b/agreement/keyManager_test.go
index f992e01f0..a613e533e 100644
--- a/agreement/keyManager_test.go
+++ b/agreement/keyManager_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/listener.go b/agreement/listener.go
index d3fd4870c..224e0c53e 100644
--- a/agreement/listener.go
+++ b/agreement/listener.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/message.go b/agreement/message.go
index 5deeeb9a2..33a6d23ce 100644
--- a/agreement/message.go
+++ b/agreement/message.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/message_test.go b/agreement/message_test.go
index ac97f3573..88c4b504b 100644
--- a/agreement/message_test.go
+++ b/agreement/message_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/params.go b/agreement/params.go
index 43bcc673a..168c25260 100644
--- a/agreement/params.go
+++ b/agreement/params.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/persistence.go b/agreement/persistence.go
index 6175e32bb..b11fd4f0a 100644
--- a/agreement/persistence.go
+++ b/agreement/persistence.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/persistence_test.go b/agreement/persistence_test.go
index 5c1bfda60..79aabd675 100644
--- a/agreement/persistence_test.go
+++ b/agreement/persistence_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/player.go b/agreement/player.go
index cb108ddd2..2add5711e 100644
--- a/agreement/player.go
+++ b/agreement/player.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/playerContract.go b/agreement/playerContract.go
index 0a43da720..fa95c2278 100644
--- a/agreement/playerContract.go
+++ b/agreement/playerContract.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/player_permutation_test.go b/agreement/player_permutation_test.go
index 960669483..251a27622 100644
--- a/agreement/player_permutation_test.go
+++ b/agreement/player_permutation_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/player_test.go b/agreement/player_test.go
index 0719864c7..ecd871bc1 100644
--- a/agreement/player_test.go
+++ b/agreement/player_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/proposal.go b/agreement/proposal.go
index f5256decb..d69a2d182 100644
--- a/agreement/proposal.go
+++ b/agreement/proposal.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/proposalManager.go b/agreement/proposalManager.go
index b701d2971..9a6e14166 100644
--- a/agreement/proposalManager.go
+++ b/agreement/proposalManager.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/proposalManagerContract.go b/agreement/proposalManagerContract.go
index 863df3059..8f20bd457 100644
--- a/agreement/proposalManagerContract.go
+++ b/agreement/proposalManagerContract.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/proposalManager_test.go b/agreement/proposalManager_test.go
index 24bdb9d0d..a759739d0 100644
--- a/agreement/proposalManager_test.go
+++ b/agreement/proposalManager_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/proposalStore.go b/agreement/proposalStore.go
index 954d52dd8..7cc9a7643 100644
--- a/agreement/proposalStore.go
+++ b/agreement/proposalStore.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/proposalStoreContract.go b/agreement/proposalStoreContract.go
index 0294469fd..6d888bc6d 100644
--- a/agreement/proposalStoreContract.go
+++ b/agreement/proposalStoreContract.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/proposalStore_test.go b/agreement/proposalStore_test.go
index 2333b0344..237579c84 100644
--- a/agreement/proposalStore_test.go
+++ b/agreement/proposalStore_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/proposalTable.go b/agreement/proposalTable.go
index 5f8672265..79448f403 100644
--- a/agreement/proposalTable.go
+++ b/agreement/proposalTable.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/proposalTracker.go b/agreement/proposalTracker.go
index 59607afbb..5b17bb10b 100644
--- a/agreement/proposalTracker.go
+++ b/agreement/proposalTracker.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/proposalTrackerContract.go b/agreement/proposalTrackerContract.go
index 856220e50..c33feb841 100644
--- a/agreement/proposalTrackerContract.go
+++ b/agreement/proposalTrackerContract.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/proposalTracker_test.go b/agreement/proposalTracker_test.go
index 7777ed14b..71096b4ad 100644
--- a/agreement/proposalTracker_test.go
+++ b/agreement/proposalTracker_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/proposal_test.go b/agreement/proposal_test.go
index 24ddfbfd1..2adfb6c6c 100644
--- a/agreement/proposal_test.go
+++ b/agreement/proposal_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/pseudonode.go b/agreement/pseudonode.go
index 2589028cb..12765970c 100644
--- a/agreement/pseudonode.go
+++ b/agreement/pseudonode.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/pseudonode_test.go b/agreement/pseudonode_test.go
index e65855556..a3f2aaf14 100644
--- a/agreement/pseudonode_test.go
+++ b/agreement/pseudonode_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/router.go b/agreement/router.go
index c0258554a..fd0638a01 100644
--- a/agreement/router.go
+++ b/agreement/router.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/selector.go b/agreement/selector.go
index 74bfdebdd..d19cfef23 100644
--- a/agreement/selector.go
+++ b/agreement/selector.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/service.go b/agreement/service.go
index c25d71657..5e1fac3da 100644
--- a/agreement/service.go
+++ b/agreement/service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/service_test.go b/agreement/service_test.go
index 68db73a60..5825e1705 100644
--- a/agreement/service_test.go
+++ b/agreement/service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/state_machine_test.go b/agreement/state_machine_test.go
index e91cf82b0..8518ff70d 100644
--- a/agreement/state_machine_test.go
+++ b/agreement/state_machine_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/trace.go b/agreement/trace.go
index f8fbe9eb5..70dae3798 100644
--- a/agreement/trace.go
+++ b/agreement/trace.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/traceTime.go b/agreement/traceTime.go
index 70ca247ee..08d5bdb25 100644
--- a/agreement/traceTime.go
+++ b/agreement/traceTime.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/types.go b/agreement/types.go
index 2cbf2c7e4..51793aa07 100644
--- a/agreement/types.go
+++ b/agreement/types.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/vote.go b/agreement/vote.go
index c5efa40fd..b1bded68b 100644
--- a/agreement/vote.go
+++ b/agreement/vote.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -152,23 +152,14 @@ func makeVote(rv rawVote, voting crypto.OneTimeSigner, selection *crypto.VRFSecr
return unauthenticatedVote{}, fmt.Errorf("makeVote: could not get consensus params for round %d: %v", ParamsRound(rv.Round), err)
}
- if proto.FastPartitionRecovery {
- switch rv.Step {
- case propose, soft, cert, late, redo:
- if rv.Proposal == bottom {
- logging.Base().Panicf("makeVote: votes from step %d cannot validate bottom", rv.Step)
- }
- case down:
- if rv.Proposal != bottom {
- logging.Base().Panicf("makeVote: votes from step %d must validate bottom", rv.Step)
- }
+ switch rv.Step {
+ case propose, soft, cert, late, redo:
+ if rv.Proposal == bottom {
+ logging.Base().Panicf("makeVote: votes from step %d cannot validate bottom", rv.Step)
}
- } else {
- switch rv.Step {
- case propose, soft, cert:
- if rv.Proposal == bottom {
- logging.Base().Panicf("makeVote: votes from step %d cannot validate bottom", rv.Step)
- }
+ case down:
+ if rv.Proposal != bottom {
+ logging.Base().Panicf("makeVote: votes from step %d must validate bottom", rv.Step)
}
}
diff --git a/agreement/voteAggregator.go b/agreement/voteAggregator.go
index 51a640476..95b378c0d 100644
--- a/agreement/voteAggregator.go
+++ b/agreement/voteAggregator.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -19,7 +19,6 @@ package agreement
import (
"fmt"
- "github.com/algorand/go-algorand/config"
"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-algorand/protocol"
)
@@ -227,7 +226,7 @@ func voteStepFresh(descr string, proto protocol.ConsensusVersion, mine, vote ste
// always propagate first recovery vote to ensure synchronous block of periods after partition
return nil
}
- if config.Consensus[proto].FastPartitionRecovery && vote >= late {
+ if vote >= late {
// always propagate fast partition recovery votes
return nil
}
diff --git a/agreement/voteAggregatorContract.go b/agreement/voteAggregatorContract.go
index 2c276a2fa..843746fab 100644
--- a/agreement/voteAggregatorContract.go
+++ b/agreement/voteAggregatorContract.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/voteAggregator_test.go b/agreement/voteAggregator_test.go
index 99ee6a340..f23bd4d56 100644
--- a/agreement/voteAggregator_test.go
+++ b/agreement/voteAggregator_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/voteAuxiliary.go b/agreement/voteAuxiliary.go
index e61d1a559..f419feebc 100644
--- a/agreement/voteAuxiliary.go
+++ b/agreement/voteAuxiliary.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/voteAuxiliaryContract.go b/agreement/voteAuxiliaryContract.go
index b57baee82..e8b501808 100644
--- a/agreement/voteAuxiliaryContract.go
+++ b/agreement/voteAuxiliaryContract.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/voteAuxiliary_test.go b/agreement/voteAuxiliary_test.go
index 4528c8643..667c3a147 100644
--- a/agreement/voteAuxiliary_test.go
+++ b/agreement/voteAuxiliary_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/voteTracker.go b/agreement/voteTracker.go
index 1363a2896..df95f4223 100644
--- a/agreement/voteTracker.go
+++ b/agreement/voteTracker.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/voteTrackerContract.go b/agreement/voteTrackerContract.go
index a3199ebb4..ca90a74a8 100644
--- a/agreement/voteTrackerContract.go
+++ b/agreement/voteTrackerContract.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/voteTracker_test.go b/agreement/voteTracker_test.go
index 2cec6b83b..7295659d8 100644
--- a/agreement/voteTracker_test.go
+++ b/agreement/voteTracker_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/agreement/vote_test.go b/agreement/vote_test.go
index 7c5ed7855..d3f6f39bf 100644
--- a/agreement/vote_test.go
+++ b/agreement/vote_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/catchup/catchpointService.go b/catchup/catchpointService.go
index bac14d4e8..1f7657294 100644
--- a/catchup/catchpointService.go
+++ b/catchup/catchpointService.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/catchup/fetcher_test.go b/catchup/fetcher_test.go
index 65ace1345..55ed33bbc 100644
--- a/catchup/fetcher_test.go
+++ b/catchup/fetcher_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/catchup/ledgerFetcher.go b/catchup/ledgerFetcher.go
index 0735465f9..c64155952 100644
--- a/catchup/ledgerFetcher.go
+++ b/catchup/ledgerFetcher.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/catchup/ledgerFetcher_test.go b/catchup/ledgerFetcher_test.go
index 73404f873..637064c97 100644
--- a/catchup/ledgerFetcher_test.go
+++ b/catchup/ledgerFetcher_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/catchup/peerSelector.go b/catchup/peerSelector.go
index 3b374691c..822d0b709 100644
--- a/catchup/peerSelector.go
+++ b/catchup/peerSelector.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/catchup/peerSelector_test.go b/catchup/peerSelector_test.go
index a11e7db1e..c10298a51 100644
--- a/catchup/peerSelector_test.go
+++ b/catchup/peerSelector_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/catchup/pref_test.go b/catchup/pref_test.go
index 8cf08c6bd..4a56156e1 100644
--- a/catchup/pref_test.go
+++ b/catchup/pref_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/catchup/service.go b/catchup/service.go
index ff3df3609..4005316d5 100644
--- a/catchup/service.go
+++ b/catchup/service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/catchup/service_test.go b/catchup/service_test.go
index 4cb89338d..6ab2f2217 100644
--- a/catchup/service_test.go
+++ b/catchup/service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/catchup/universalFetcher.go b/catchup/universalFetcher.go
index acd51c002..59159751b 100644
--- a/catchup/universalFetcher.go
+++ b/catchup/universalFetcher.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/catchup/universalFetcher_test.go b/catchup/universalFetcher_test.go
index 79cd484ac..49b921dd4 100644
--- a/catchup/universalFetcher_test.go
+++ b/catchup/universalFetcher_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algocfg/datadir.go b/cmd/algocfg/datadir.go
index 51dce4e7c..99ca1a21b 100644
--- a/cmd/algocfg/datadir.go
+++ b/cmd/algocfg/datadir.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algocfg/getCommand.go b/cmd/algocfg/getCommand.go
index a0051a37e..86af9cc10 100644
--- a/cmd/algocfg/getCommand.go
+++ b/cmd/algocfg/getCommand.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algocfg/main.go b/cmd/algocfg/main.go
index d727a599e..0e38511f8 100644
--- a/cmd/algocfg/main.go
+++ b/cmd/algocfg/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algocfg/messages.go b/cmd/algocfg/messages.go
index 86247dc90..e0e27aa3a 100644
--- a/cmd/algocfg/messages.go
+++ b/cmd/algocfg/messages.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algocfg/report.go b/cmd/algocfg/report.go
index 61b01a695..219f84070 100644
--- a/cmd/algocfg/report.go
+++ b/cmd/algocfg/report.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algocfg/resetCommand.go b/cmd/algocfg/resetCommand.go
index 43ade91e3..187afe93c 100644
--- a/cmd/algocfg/resetCommand.go
+++ b/cmd/algocfg/resetCommand.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algocfg/setCommand.go b/cmd/algocfg/setCommand.go
index 7bb21283f..b5a4e6c1b 100644
--- a/cmd/algocfg/setCommand.go
+++ b/cmd/algocfg/setCommand.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algod/main.go b/cmd/algod/main.go
index 8d83a7b82..b29d55c2f 100644
--- a/cmd/algod/main.go
+++ b/cmd/algod/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algod/main_test.go b/cmd/algod/main_test.go
index 47cc890ab..3b0097962 100644
--- a/cmd/algod/main_test.go
+++ b/cmd/algod/main_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algofix/deadlock.go b/cmd/algofix/deadlock.go
index 4df1bdc30..b7342235e 100644
--- a/cmd/algofix/deadlock.go
+++ b/cmd/algofix/deadlock.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algofix/deadlock_test.go b/cmd/algofix/deadlock_test.go
index 2c2111585..720bafa10 100644
--- a/cmd/algofix/deadlock_test.go
+++ b/cmd/algofix/deadlock_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algoh/blockWatcher.go b/cmd/algoh/blockWatcher.go
index 5d062f053..cc55b2d49 100644
--- a/cmd/algoh/blockWatcher.go
+++ b/cmd/algoh/blockWatcher.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algoh/blockWatcher_test.go b/cmd/algoh/blockWatcher_test.go
index 8ed724c20..f3efd1aaf 100644
--- a/cmd/algoh/blockWatcher_test.go
+++ b/cmd/algoh/blockWatcher_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algoh/blockstats.go b/cmd/algoh/blockstats.go
index 6953efce6..74a629d32 100644
--- a/cmd/algoh/blockstats.go
+++ b/cmd/algoh/blockstats.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algoh/blockstats_test.go b/cmd/algoh/blockstats_test.go
index d1b95003b..d0cafaf3f 100644
--- a/cmd/algoh/blockstats_test.go
+++ b/cmd/algoh/blockstats_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algoh/client.go b/cmd/algoh/client.go
index 1d51f5b3c..89a7c27a3 100644
--- a/cmd/algoh/client.go
+++ b/cmd/algoh/client.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algoh/deadman.go b/cmd/algoh/deadman.go
index fad7e97e1..1c302e880 100644
--- a/cmd/algoh/deadman.go
+++ b/cmd/algoh/deadman.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algoh/eventsender.go b/cmd/algoh/eventsender.go
index a32819045..64ed53eae 100644
--- a/cmd/algoh/eventsender.go
+++ b/cmd/algoh/eventsender.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algoh/main.go b/cmd/algoh/main.go
index 5f4869e22..a458929aa 100644
--- a/cmd/algoh/main.go
+++ b/cmd/algoh/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algoh/mockClient.go b/cmd/algoh/mockClient.go
index ad87b8a1b..d9d81387e 100644
--- a/cmd/algoh/mockClient.go
+++ b/cmd/algoh/mockClient.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algokey/common.go b/cmd/algokey/common.go
index a163f8c6f..37f4e1ca4 100644
--- a/cmd/algokey/common.go
+++ b/cmd/algokey/common.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algokey/export.go b/cmd/algokey/export.go
index 8e1387945..2b0027580 100644
--- a/cmd/algokey/export.go
+++ b/cmd/algokey/export.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algokey/generate.go b/cmd/algokey/generate.go
index e834a773a..a52011699 100644
--- a/cmd/algokey/generate.go
+++ b/cmd/algokey/generate.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algokey/import.go b/cmd/algokey/import.go
index 379e1b414..6f17cd06a 100644
--- a/cmd/algokey/import.go
+++ b/cmd/algokey/import.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algokey/main.go b/cmd/algokey/main.go
index 6fc8a3ab6..8182c35f8 100644
--- a/cmd/algokey/main.go
+++ b/cmd/algokey/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algokey/multisig.go b/cmd/algokey/multisig.go
index 3f58c38be..7c8ae8104 100644
--- a/cmd/algokey/multisig.go
+++ b/cmd/algokey/multisig.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algokey/part.go b/cmd/algokey/part.go
index 48ba060a3..fbef77607 100644
--- a/cmd/algokey/part.go
+++ b/cmd/algokey/part.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algokey/sign.go b/cmd/algokey/sign.go
index b0e05349b..9afa5a3d3 100644
--- a/cmd/algokey/sign.go
+++ b/cmd/algokey/sign.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algons/commands.go b/cmd/algons/commands.go
index 1139ea48c..522d0b808 100644
--- a/cmd/algons/commands.go
+++ b/cmd/algons/commands.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algons/dnsCmd.go b/cmd/algons/dnsCmd.go
index 7b3438b76..b41b45f13 100644
--- a/cmd/algons/dnsCmd.go
+++ b/cmd/algons/dnsCmd.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algorelay/commands.go b/cmd/algorelay/commands.go
index 08b2a3b5d..ebc047854 100644
--- a/cmd/algorelay/commands.go
+++ b/cmd/algorelay/commands.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algorelay/eb/eb.go b/cmd/algorelay/eb/eb.go
index 61c071908..7bd635ad7 100644
--- a/cmd/algorelay/eb/eb.go
+++ b/cmd/algorelay/eb/eb.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/algorelay/relayCmd.go b/cmd/algorelay/relayCmd.go
index a1575aa1f..647c438a6 100644
--- a/cmd/algorelay/relayCmd.go
+++ b/cmd/algorelay/relayCmd.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/buildtools/commands.go b/cmd/buildtools/commands.go
index b0c2f8b22..4f71804d3 100644
--- a/cmd/buildtools/commands.go
+++ b/cmd/buildtools/commands.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/buildtools/genesis.go b/cmd/buildtools/genesis.go
index e388f85b8..079c76d61 100644
--- a/cmd/buildtools/genesis.go
+++ b/cmd/buildtools/genesis.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/catchpointdump/commands.go b/cmd/catchpointdump/commands.go
index 0ee9b433d..e4fded7be 100644
--- a/cmd/catchpointdump/commands.go
+++ b/cmd/catchpointdump/commands.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/catchpointdump/database.go b/cmd/catchpointdump/database.go
index 334063fe2..4d8282d40 100644
--- a/cmd/catchpointdump/database.go
+++ b/cmd/catchpointdump/database.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/catchpointdump/file.go b/cmd/catchpointdump/file.go
index a09485e83..78c7a4c4d 100644
--- a/cmd/catchpointdump/file.go
+++ b/cmd/catchpointdump/file.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/catchpointdump/net.go b/cmd/catchpointdump/net.go
index 79fd986fa..da4292bb8 100644
--- a/cmd/catchpointdump/net.go
+++ b/cmd/catchpointdump/net.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/catchupsrv/download.go b/cmd/catchupsrv/download.go
index 0d2ae7497..813da9d03 100644
--- a/cmd/catchupsrv/download.go
+++ b/cmd/catchupsrv/download.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/catchupsrv/download_test.go b/cmd/catchupsrv/download_test.go
index fa65f05fb..b616f81f5 100644
--- a/cmd/catchupsrv/download_test.go
+++ b/cmd/catchupsrv/download_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/catchupsrv/main.go b/cmd/catchupsrv/main.go
index e41f27f55..86fd9645a 100644
--- a/cmd/catchupsrv/main.go
+++ b/cmd/catchupsrv/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/catchupsrv/tarblocks.go b/cmd/catchupsrv/tarblocks.go
index f933ec2e1..25f686f0c 100644
--- a/cmd/catchupsrv/tarblocks.go
+++ b/cmd/catchupsrv/tarblocks.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/dbgen/main.go b/cmd/dbgen/main.go
index 53ff3fa09..078f30a3b 100644
--- a/cmd/dbgen/main.go
+++ b/cmd/dbgen/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/diagcfg/main.go b/cmd/diagcfg/main.go
index 71d794a01..e2f1003d4 100644
--- a/cmd/diagcfg/main.go
+++ b/cmd/diagcfg/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/diagcfg/messages.go b/cmd/diagcfg/messages.go
index ef091d87e..70898a043 100644
--- a/cmd/diagcfg/messages.go
+++ b/cmd/diagcfg/messages.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/diagcfg/metric.go b/cmd/diagcfg/metric.go
index 2e9dee82b..4fefd69b7 100644
--- a/cmd/diagcfg/metric.go
+++ b/cmd/diagcfg/metric.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/diagcfg/telemetry.go b/cmd/diagcfg/telemetry.go
index c7df1bc83..e49e0c215 100644
--- a/cmd/diagcfg/telemetry.go
+++ b/cmd/diagcfg/telemetry.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/dispenser/server.go b/cmd/dispenser/server.go
index 35b3b2954..39ecb4184 100644
--- a/cmd/dispenser/server.go
+++ b/cmd/dispenser/server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/genesis/newgenesis.go b/cmd/genesis/newgenesis.go
index 5a7ad8326..b514c4968 100644
--- a/cmd/genesis/newgenesis.go
+++ b/cmd/genesis/newgenesis.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/account.go b/cmd/goal/account.go
index b585a8801..413e842ed 100644
--- a/cmd/goal/account.go
+++ b/cmd/goal/account.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/accountsList.go b/cmd/goal/accountsList.go
index 0fa2f4bff..56de35deb 100644
--- a/cmd/goal/accountsList.go
+++ b/cmd/goal/accountsList.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/application.go b/cmd/goal/application.go
index c3439a245..491947490 100644
--- a/cmd/goal/application.go
+++ b/cmd/goal/application.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -22,6 +22,7 @@ import (
"encoding/base32"
"encoding/base64"
"encoding/binary"
+ "encoding/hex"
"fmt"
"os"
"strconv"
@@ -45,8 +46,9 @@ var (
approvalProgFile string
clearProgFile string
- method string
- methodArgs []string
+ method string
+ methodArgs []string
+ methodCreatesApp bool
approvalProgRawFile string
clearProgRawFile string
@@ -121,6 +123,12 @@ func init() {
methodAppCmd.Flags().StringVar(&method, "method", "", "Method to be called")
methodAppCmd.Flags().StringArrayVar(&methodArgs, "arg", nil, "Args to pass in for calling a method")
methodAppCmd.Flags().StringVar(&onCompletion, "on-completion", "NoOp", "OnCompletion action for application transaction")
+ methodAppCmd.Flags().BoolVar(&methodCreatesApp, "create", false, "Create an application in this method call")
+ methodAppCmd.Flags().Uint64Var(&globalSchemaUints, "global-ints", 0, "Maximum number of integer values that may be stored in the global key/value store. Immutable, only valid when passed with --create.")
+ methodAppCmd.Flags().Uint64Var(&globalSchemaByteSlices, "global-byteslices", 0, "Maximum number of byte slices that may be stored in the global key/value store. Immutable, only valid when passed with --create.")
+ methodAppCmd.Flags().Uint64Var(&localSchemaUints, "local-ints", 0, "Maximum number of integer values that may be stored in local (per-account) key/value stores for this app. Immutable, only valid when passed with --create.")
+ methodAppCmd.Flags().Uint64Var(&localSchemaByteSlices, "local-byteslices", 0, "Maximum number of byte slices that may be stored in local (per-account) key/value stores for this app. Immutable, only valid when passed with --create.")
+ methodAppCmd.Flags().Uint32Var(&extraPages, "extra-pages", 0, "Additional program space for supporting larger TEAL assembly program. A maximum of 3 extra pages is allowed. A page is 1024 bytes. Only valid when passed with --create.")
// Can't use PersistentFlags on the root because for some reason marking
// a root command as required with MarkPersistentFlagRequired isn't
@@ -178,7 +186,6 @@ func init() {
infoAppCmd.MarkFlagRequired("app-id")
methodAppCmd.MarkFlagRequired("method") // nolint:errcheck // follow previous required flag format
- methodAppCmd.MarkFlagRequired("app-id") // nolint:errcheck
methodAppCmd.MarkFlagRequired("from") // nolint:errcheck
methodAppCmd.Flags().MarkHidden("app-arg") // nolint:errcheck
}
@@ -1162,8 +1169,8 @@ func populateMethodCallReferenceArgs(sender string, currentApp uint64, types []s
var methodAppCmd = &cobra.Command{
Use: "method",
- Short: "Invoke a method",
- Long: `Invoke a method in an App (stateful contract) with an application call transaction`,
+ Short: "Invoke an ABI method",
+ Long: `Invoke an ARC-4 ABI method on an App (stateful contract) with an application call transaction`,
Args: validateNoPosArgsFn,
Run: func(cmd *cobra.Command, args []string) {
dataDir, client := getDataDirAndClient()
@@ -1171,17 +1178,47 @@ var methodAppCmd = &cobra.Command{
// Parse transaction parameters
appArgsParsed, appAccounts, foreignApps, foreignAssets := getAppInputs()
if len(appArgsParsed) > 0 {
- reportErrorf("in goal app method: --arg and --app-arg are mutually exclusive, do not use --app-arg")
+ reportErrorf("--arg and --app-arg are mutually exclusive, do not use --app-arg")
+ }
+
+ // Construct schemas from args
+ localSchema := basics.StateSchema{
+ NumUint: localSchemaUints,
+ NumByteSlice: localSchemaByteSlices,
+ }
+
+ globalSchema := basics.StateSchema{
+ NumUint: globalSchemaUints,
+ NumByteSlice: globalSchemaByteSlices,
}
onCompletionEnum := mustParseOnCompletion(onCompletion)
- if appIdx == 0 {
- reportErrorf("app id == 0, goal app create not supported in goal app method")
+ if methodCreatesApp {
+ if appIdx != 0 {
+ reportErrorf("--app-id and --create are mutually exclusive, only provide one")
+ }
+
+ switch onCompletionEnum {
+ case transactions.CloseOutOC, transactions.ClearStateOC:
+ reportWarnf("'--on-completion %s' may be ill-formed for use with --create", onCompletion)
+ }
+ } else {
+ if appIdx == 0 {
+ reportErrorf("one of --app-id or --create must be provided")
+ }
+
+ if localSchema != (basics.StateSchema{}) || globalSchema != (basics.StateSchema{}) {
+ reportErrorf("--global-ints, --global-byteslices, --local-ints, and --local-byteslices must only be provided with --create")
+ }
+
+ if extraPages != 0 {
+ reportErrorf("--extra-pages must only be provided with --create")
+ }
}
var approvalProg, clearProg []byte
- if onCompletionEnum == transactions.UpdateApplicationOC {
+ if methodCreatesApp || onCompletionEnum == transactions.UpdateApplicationOC {
approvalProg, clearProg = mustParseProgArgs()
}
@@ -1257,7 +1294,7 @@ var methodAppCmd = &cobra.Command{
appCallTxn, err := client.MakeUnsignedApplicationCallTx(
appIdx, applicationArgs, appAccounts, foreignApps, foreignAssets,
- onCompletionEnum, approvalProg, clearProg, basics.StateSchema{}, basics.StateSchema{}, 0)
+ onCompletionEnum, approvalProg, clearProg, globalSchema, localSchema, extraPages)
if err != nil {
reportErrorf("Cannot create application txn: %v", err)
@@ -1345,12 +1382,19 @@ var methodAppCmd = &cobra.Command{
}
// Report tx details to user
+ if methodCreatesApp {
+ reportInfof("Attempting to create app (approval size %d, hash %v; clear size %d, hash %v)", len(approvalProg), crypto.HashObj(logic.Program(approvalProg)), len(clearProg), crypto.HashObj(logic.Program(clearProg)))
+ } else if onCompletionEnum == transactions.UpdateApplicationOC {
+ reportInfof("Attempting to update app (approval size %d, hash %v; clear size %d, hash %v)", len(approvalProg), crypto.HashObj(logic.Program(approvalProg)), len(clearProg), crypto.HashObj(logic.Program(clearProg)))
+ }
+
reportInfof("Issued %d transaction(s):", len(signedTxnGroup))
+
// remember the final txid in this variable
var txid string
for _, stxn := range signedTxnGroup {
txid = stxn.Txn.ID().String()
- reportInfof("\tIssued transaction from account %s, txid %s (fee %d)", stxn.Txn.Sender, txid, stxn.Txn.Fee.Raw)
+ reportInfof("Issued transaction from account %s, txid %s (fee %d)", stxn.Txn.Sender, txid, stxn.Txn.Fee.Raw)
}
if !noWaitAfterSend {
@@ -1364,42 +1408,39 @@ var methodAppCmd = &cobra.Command{
reportErrorf(err.Error())
}
+ if methodCreatesApp && resp.ApplicationIndex != nil && *resp.ApplicationIndex != 0 {
+ reportInfof("Created app with app index %d", *resp.ApplicationIndex)
+ }
+
if retType == nil {
- fmt.Printf("method %s succeeded\n", method)
+ reportInfof("method %s succeeded", method)
return
}
- // specify the return hash prefix
- hashRet := sha512.Sum512_256([]byte("return"))
- hashRetPrefix := hashRet[:4]
+ // the 4-byte prefix for logged return values, from https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0004.md#standard-format
+ var abiReturnHash = []byte{0x15, 0x1f, 0x7c, 0x75}
- var abiEncodedRet []byte
- foundRet := false
- if resp.Logs != nil {
- for i := len(*resp.Logs) - 1; i >= 0; i-- {
- retLog := (*resp.Logs)[i]
- if bytes.HasPrefix(retLog, hashRetPrefix) {
- abiEncodedRet = retLog[4:]
- foundRet = true
- break
- }
- }
+ if resp.Logs == nil || len(*resp.Logs) == 0 {
+ reportErrorf("method %s succeed but did not log a return value", method)
}
- if !foundRet {
- reportErrorf("cannot find return log for abi type %s", retTypeStr)
+ lastLog := (*resp.Logs)[len(*resp.Logs)-1]
+ if !bytes.HasPrefix(lastLog, abiReturnHash) {
+ reportErrorf("method %s succeed but did not log a return value", method)
}
- decoded, err := retType.Decode(abiEncodedRet)
+ rawReturnValue := lastLog[len(abiReturnHash):]
+ decoded, err := retType.Decode(rawReturnValue)
if err != nil {
- reportErrorf("cannot decode return value %v: %v", abiEncodedRet, err)
+ reportErrorf("method %s succeed but its return value could not be decoded.\nThe raw return value in hex is:%s\nThe error is: %s", method, hex.EncodeToString(rawReturnValue), err)
}
decodedJSON, err := retType.MarshalToJSON(decoded)
if err != nil {
- reportErrorf("cannot marshal returned bytes %v to JSON: %v", decoded, err)
+ reportErrorf("method %s succeed but its return value could not be converted to JSON.\nThe raw return value in hex is:%s\nThe error is: %s", method, hex.EncodeToString(rawReturnValue), err)
}
- fmt.Printf("method %s succeeded with output: %s\n", method, string(decodedJSON))
+
+ reportInfof("method %s succeeded with output: %s", method, string(decodedJSON))
}
},
}
diff --git a/cmd/goal/asset.go b/cmd/goal/asset.go
index ef0d8db44..ad2891e82 100644
--- a/cmd/goal/asset.go
+++ b/cmd/goal/asset.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/clerk.go b/cmd/goal/clerk.go
index c5d69854a..87d6ef27f 100644
--- a/cmd/goal/clerk.go
+++ b/cmd/goal/clerk.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/commands.go b/cmd/goal/commands.go
index 9d3a19c15..f2eee7760 100644
--- a/cmd/goal/commands.go
+++ b/cmd/goal/commands.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/commands_test.go b/cmd/goal/commands_test.go
index 26a621ea2..1d7864256 100644
--- a/cmd/goal/commands_test.go
+++ b/cmd/goal/commands_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/common.go b/cmd/goal/common.go
index 23496a5cc..a392410e7 100644
--- a/cmd/goal/common.go
+++ b/cmd/goal/common.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/completion.go b/cmd/goal/completion.go
index 02dab49c4..235b1a238 100644
--- a/cmd/goal/completion.go
+++ b/cmd/goal/completion.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/formatting.go b/cmd/goal/formatting.go
index 93659fb8d..06bfcad85 100644
--- a/cmd/goal/formatting.go
+++ b/cmd/goal/formatting.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/formatting_test.go b/cmd/goal/formatting_test.go
index d5f216fd0..bc3bce670 100644
--- a/cmd/goal/formatting_test.go
+++ b/cmd/goal/formatting_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/inspect.go b/cmd/goal/inspect.go
index 3ac87223f..bdb11f434 100644
--- a/cmd/goal/inspect.go
+++ b/cmd/goal/inspect.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/inspect_test.go b/cmd/goal/inspect_test.go
index 564f7611b..2e97444b3 100644
--- a/cmd/goal/inspect_test.go
+++ b/cmd/goal/inspect_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/interact.go b/cmd/goal/interact.go
index b46f6b8b7..16eb8f454 100644
--- a/cmd/goal/interact.go
+++ b/cmd/goal/interact.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/kmd.go b/cmd/goal/kmd.go
index c6a292836..fa4ef9182 100644
--- a/cmd/goal/kmd.go
+++ b/cmd/goal/kmd.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/ledger.go b/cmd/goal/ledger.go
index 379260079..fda139bd7 100644
--- a/cmd/goal/ledger.go
+++ b/cmd/goal/ledger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/logging.go b/cmd/goal/logging.go
index 132975ba4..333c3ee8f 100644
--- a/cmd/goal/logging.go
+++ b/cmd/goal/logging.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/messages.go b/cmd/goal/messages.go
index 2b75258e4..e4b5348ab 100644
--- a/cmd/goal/messages.go
+++ b/cmd/goal/messages.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/multisig.go b/cmd/goal/multisig.go
index 387883582..6e55fcc9e 100644
--- a/cmd/goal/multisig.go
+++ b/cmd/goal/multisig.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/network.go b/cmd/goal/network.go
index 9dc5291f5..b7620b997 100644
--- a/cmd/goal/network.go
+++ b/cmd/goal/network.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/node.go b/cmd/goal/node.go
index 5e22df5a2..a7dcad550 100644
--- a/cmd/goal/node.go
+++ b/cmd/goal/node.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/tealsign.go b/cmd/goal/tealsign.go
index eb2deaf29..3d35624a1 100644
--- a/cmd/goal/tealsign.go
+++ b/cmd/goal/tealsign.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/goal/wallet.go b/cmd/goal/wallet.go
index 3d62a0d5b..90faa86c0 100644
--- a/cmd/goal/wallet.go
+++ b/cmd/goal/wallet.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/incorporate/incorporate.go b/cmd/incorporate/incorporate.go
index 2d7ffb3fb..48a2ac830 100644
--- a/cmd/incorporate/incorporate.go
+++ b/cmd/incorporate/incorporate.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/kmd/codes/codes.go b/cmd/kmd/codes/codes.go
index 788cc2bb0..12b0fb38f 100644
--- a/cmd/kmd/codes/codes.go
+++ b/cmd/kmd/codes/codes.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/kmd/main.go b/cmd/kmd/main.go
index 34315094f..6d15aef48 100644
--- a/cmd/kmd/main.go
+++ b/cmd/kmd/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/kmd/mlock_darwin.go b/cmd/kmd/mlock_darwin.go
index 1207fec1b..14791e7fe 100644
--- a/cmd/kmd/mlock_darwin.go
+++ b/cmd/kmd/mlock_darwin.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/kmd/mlock_linux.go b/cmd/kmd/mlock_linux.go
index c6b898841..ff295866a 100644
--- a/cmd/kmd/mlock_linux.go
+++ b/cmd/kmd/mlock_linux.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/kmd/mlock_windows.go b/cmd/kmd/mlock_windows.go
index a14e7a883..64e82811f 100644
--- a/cmd/kmd/mlock_windows.go
+++ b/cmd/kmd/mlock_windows.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/loadgenerator/config.go b/cmd/loadgenerator/config.go
index aaf43dd50..ec9576634 100644
--- a/cmd/loadgenerator/config.go
+++ b/cmd/loadgenerator/config.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/loadgenerator/main.go b/cmd/loadgenerator/main.go
index f6dee143e..8c2417a2c 100644
--- a/cmd/loadgenerator/main.go
+++ b/cmd/loadgenerator/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/msgpacktool/main.go b/cmd/msgpacktool/main.go
index da0281990..fac70fcec 100644
--- a/cmd/msgpacktool/main.go
+++ b/cmd/msgpacktool/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/netdummy/main.go b/cmd/netdummy/main.go
index 6e2cee155..92d96adcd 100644
--- a/cmd/netdummy/main.go
+++ b/cmd/netdummy/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/netgoal/commands.go b/cmd/netgoal/commands.go
index 5ae90dedf..30522e87d 100644
--- a/cmd/netgoal/commands.go
+++ b/cmd/netgoal/commands.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/netgoal/generate.go b/cmd/netgoal/generate.go
index 7cd417621..8837973db 100644
--- a/cmd/netgoal/generate.go
+++ b/cmd/netgoal/generate.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/netgoal/messages.go b/cmd/netgoal/messages.go
index ddebfdedf..1db5a0828 100644
--- a/cmd/netgoal/messages.go
+++ b/cmd/netgoal/messages.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/netgoal/network.go b/cmd/netgoal/network.go
index 9e2f12a0f..e7111cc4e 100644
--- a/cmd/netgoal/network.go
+++ b/cmd/netgoal/network.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/netgoal/recipe.go b/cmd/netgoal/recipe.go
index ffd31254f..ba8af9b76 100644
--- a/cmd/netgoal/recipe.go
+++ b/cmd/netgoal/recipe.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/nodecfg/apply.go b/cmd/nodecfg/apply.go
index ee60f0bc1..70008ff9b 100644
--- a/cmd/nodecfg/apply.go
+++ b/cmd/nodecfg/apply.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/nodecfg/commands.go b/cmd/nodecfg/commands.go
index 395c2736a..af3dc08a8 100644
--- a/cmd/nodecfg/commands.go
+++ b/cmd/nodecfg/commands.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/nodecfg/download.go b/cmd/nodecfg/download.go
index cf4286ad5..762c0ae86 100644
--- a/cmd/nodecfg/download.go
+++ b/cmd/nodecfg/download.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/nodecfg/get.go b/cmd/nodecfg/get.go
index 88f63238c..707509f66 100644
--- a/cmd/nodecfg/get.go
+++ b/cmd/nodecfg/get.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/opdoc/opdoc.go b/cmd/opdoc/opdoc.go
index 8f59960f5..be9b69956 100644
--- a/cmd/opdoc/opdoc.go
+++ b/cmd/opdoc/opdoc.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/opdoc/tmLanguage.go b/cmd/opdoc/tmLanguage.go
index 199514b40..204068a62 100644
--- a/cmd/opdoc/tmLanguage.go
+++ b/cmd/opdoc/tmLanguage.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/partitiontest_linter/linter.go b/cmd/partitiontest_linter/linter.go
index e2086c652..8d5ab728d 100644
--- a/cmd/partitiontest_linter/linter.go
+++ b/cmd/partitiontest_linter/linter.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/partitiontest_linter/linter_test.go b/cmd/partitiontest_linter/linter_test.go
index 4d53e3ed3..d62fcef73 100644
--- a/cmd/partitiontest_linter/linter_test.go
+++ b/cmd/partitiontest_linter/linter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/partitiontest_linter/plugin/plugin.go b/cmd/partitiontest_linter/plugin/plugin.go
index eefcfffca..587529fea 100644
--- a/cmd/partitiontest_linter/plugin/plugin.go
+++ b/cmd/partitiontest_linter/plugin/plugin.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/partitiontest_linter/testdata/linter_testdata_test.go b/cmd/partitiontest_linter/testdata/linter_testdata_test.go
index f11d76261..3658e6211 100644
--- a/cmd/partitiontest_linter/testdata/linter_testdata_test.go
+++ b/cmd/partitiontest_linter/testdata/linter_testdata_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/pingpong/commands.go b/cmd/pingpong/commands.go
index 14e3259ac..71733f22f 100644
--- a/cmd/pingpong/commands.go
+++ b/cmd/pingpong/commands.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/pingpong/runCmd.go b/cmd/pingpong/runCmd.go
index 7d0136d10..cb6284036 100644
--- a/cmd/pingpong/runCmd.go
+++ b/cmd/pingpong/runCmd.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/pingpong/teal_programs.go b/cmd/pingpong/teal_programs.go
index d9964bd45..e56584211 100644
--- a/cmd/pingpong/teal_programs.go
+++ b/cmd/pingpong/teal_programs.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/bundle_home_html.sh b/cmd/tealdbg/bundle_home_html.sh
index 176c114c6..095095420 100755
--- a/cmd/tealdbg/bundle_home_html.sh
+++ b/cmd/tealdbg/bundle_home_html.sh
@@ -3,7 +3,7 @@
THISDIR=$(dirname $0)
cat <<EOM | gofmt > $THISDIR/homepage.go
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/cdt/proto.go b/cmd/tealdbg/cdt/proto.go
index 0e6468371..ad527fc09 100644
--- a/cmd/tealdbg/cdt/proto.go
+++ b/cmd/tealdbg/cdt/proto.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/cdtSession.go b/cmd/tealdbg/cdtSession.go
index 73cf03776..b80149b9c 100644
--- a/cmd/tealdbg/cdtSession.go
+++ b/cmd/tealdbg/cdtSession.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/cdtSession_test.go b/cmd/tealdbg/cdtSession_test.go
index 8ee0107be..7117f97a8 100644
--- a/cmd/tealdbg/cdtSession_test.go
+++ b/cmd/tealdbg/cdtSession_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/cdtState.go b/cmd/tealdbg/cdtState.go
index 77f4eb896..972f87938 100644
--- a/cmd/tealdbg/cdtState.go
+++ b/cmd/tealdbg/cdtState.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/cdtdbg.go b/cmd/tealdbg/cdtdbg.go
index 094b593c1..fd88bf92e 100644
--- a/cmd/tealdbg/cdtdbg.go
+++ b/cmd/tealdbg/cdtdbg.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/cdtdbg_test.go b/cmd/tealdbg/cdtdbg_test.go
index fb6b4c0a6..3e6acf8b1 100644
--- a/cmd/tealdbg/cdtdbg_test.go
+++ b/cmd/tealdbg/cdtdbg_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/debugger.go b/cmd/tealdbg/debugger.go
index 0ed24bf85..c5d35047c 100644
--- a/cmd/tealdbg/debugger.go
+++ b/cmd/tealdbg/debugger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/debugger_test.go b/cmd/tealdbg/debugger_test.go
index d1d815b1a..f59236e99 100644
--- a/cmd/tealdbg/debugger_test.go
+++ b/cmd/tealdbg/debugger_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/dryrunRequest.go b/cmd/tealdbg/dryrunRequest.go
index 2963372fb..b1ec50cda 100644
--- a/cmd/tealdbg/dryrunRequest.go
+++ b/cmd/tealdbg/dryrunRequest.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/homepage.go b/cmd/tealdbg/homepage.go
index 95d3cf0a5..4af43c4c8 100644
--- a/cmd/tealdbg/homepage.go
+++ b/cmd/tealdbg/homepage.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/local.go b/cmd/tealdbg/local.go
index aa5fb3aaf..2f0a1b4f5 100644
--- a/cmd/tealdbg/local.go
+++ b/cmd/tealdbg/local.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/localLedger.go b/cmd/tealdbg/localLedger.go
index 364186f55..2d82c464d 100644
--- a/cmd/tealdbg/localLedger.go
+++ b/cmd/tealdbg/localLedger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/localLedger_test.go b/cmd/tealdbg/localLedger_test.go
index be2ef8189..496f1407d 100644
--- a/cmd/tealdbg/localLedger_test.go
+++ b/cmd/tealdbg/localLedger_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/local_test.go b/cmd/tealdbg/local_test.go
index 0546835c5..14b16f43a 100644
--- a/cmd/tealdbg/local_test.go
+++ b/cmd/tealdbg/local_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/main.go b/cmd/tealdbg/main.go
index ea09dd1ed..288db8709 100644
--- a/cmd/tealdbg/main.go
+++ b/cmd/tealdbg/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/remote.go b/cmd/tealdbg/remote.go
index 1dc637199..05b468979 100644
--- a/cmd/tealdbg/remote.go
+++ b/cmd/tealdbg/remote.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/remote_test.go b/cmd/tealdbg/remote_test.go
index 553bc4c56..5ac654cd7 100644
--- a/cmd/tealdbg/remote_test.go
+++ b/cmd/tealdbg/remote_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/server.go b/cmd/tealdbg/server.go
index d4c3213e0..b6ccb0524 100644
--- a/cmd/tealdbg/server.go
+++ b/cmd/tealdbg/server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/server_test.go b/cmd/tealdbg/server_test.go
index 232c6a6f4..fa06da65a 100644
--- a/cmd/tealdbg/server_test.go
+++ b/cmd/tealdbg/server_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/util.go b/cmd/tealdbg/util.go
index e1edb774e..6a7f880ef 100644
--- a/cmd/tealdbg/util.go
+++ b/cmd/tealdbg/util.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/util_test.go b/cmd/tealdbg/util_test.go
index 8613a398b..85de0747d 100644
--- a/cmd/tealdbg/util_test.go
+++ b/cmd/tealdbg/util_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/webdbg.go b/cmd/tealdbg/webdbg.go
index 27f7dae4a..3f99eea70 100644
--- a/cmd/tealdbg/webdbg.go
+++ b/cmd/tealdbg/webdbg.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/tealdbg/webdbg_test.go b/cmd/tealdbg/webdbg_test.go
index 5f340ff6a..be6801d63 100644
--- a/cmd/tealdbg/webdbg_test.go
+++ b/cmd/tealdbg/webdbg_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/updater/commands.go b/cmd/updater/commands.go
index b0a980f9f..03d2f2a48 100644
--- a/cmd/updater/commands.go
+++ b/cmd/updater/commands.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/updater/sendCmd.go b/cmd/updater/sendCmd.go
index 34adb1fcf..d3a4a0cd9 100644
--- a/cmd/updater/sendCmd.go
+++ b/cmd/updater/sendCmd.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/updater/toolsCmd.go b/cmd/updater/toolsCmd.go
index 69be9057f..d23644252 100644
--- a/cmd/updater/toolsCmd.go
+++ b/cmd/updater/toolsCmd.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/updater/util.go b/cmd/updater/util.go
index fb0086b2d..0bb03baa0 100644
--- a/cmd/updater/util.go
+++ b/cmd/updater/util.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/updater/versionCmd.go b/cmd/updater/versionCmd.go
index 5b8345bf8..aeb24a7a9 100644
--- a/cmd/updater/versionCmd.go
+++ b/cmd/updater/versionCmd.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/cmd/updater/version_test.go b/cmd/updater/version_test.go
index 286946165..34f23499e 100644
--- a/cmd/updater/version_test.go
+++ b/cmd/updater/version_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/compactcert/abstractions.go b/compactcert/abstractions.go
index ac02ec2c8..0abc0962d 100644
--- a/compactcert/abstractions.go
+++ b/compactcert/abstractions.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/compactcert/builder.go b/compactcert/builder.go
index f6adbfafb..c590abbfe 100644
--- a/compactcert/builder.go
+++ b/compactcert/builder.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/compactcert/db.go b/compactcert/db.go
index ee933c69d..84bce6394 100644
--- a/compactcert/db.go
+++ b/compactcert/db.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/compactcert/db_test.go b/compactcert/db_test.go
index e34eb8fbb..dee7271d7 100644
--- a/compactcert/db_test.go
+++ b/compactcert/db_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/compactcert/signer.go b/compactcert/signer.go
index 767211130..983f06683 100644
--- a/compactcert/signer.go
+++ b/compactcert/signer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/compactcert/worker.go b/compactcert/worker.go
index d84f7848f..90504484b 100644
--- a/compactcert/worker.go
+++ b/compactcert/worker.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/compactcert/worker_test.go b/compactcert/worker_test.go
index adc784f0e..8ce6681fb 100644
--- a/compactcert/worker_test.go
+++ b/compactcert/worker_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/components/mocks/mockCatchpointCatchupAccessor.go b/components/mocks/mockCatchpointCatchupAccessor.go
index 7f8747328..bd55d29e9 100644
--- a/components/mocks/mockCatchpointCatchupAccessor.go
+++ b/components/mocks/mockCatchpointCatchupAccessor.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/components/mocks/mockNetwork.go b/components/mocks/mockNetwork.go
index ba8fce35f..77e5f5878 100644
--- a/components/mocks/mockNetwork.go
+++ b/components/mocks/mockNetwork.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/config/buildvars.go b/config/buildvars.go
index 4c1395c1b..a9a67d584 100644
--- a/config/buildvars.go
+++ b/config/buildvars.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/config/config.go b/config/config.go
index 315d53289..4c1680130 100644
--- a/config/config.go
+++ b/config/config.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/config/config_test.go b/config/config_test.go
index 0c8033279..c11edd379 100644
--- a/config/config_test.go
+++ b/config/config_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/config/consensus.go b/config/consensus.go
index f0ffa1a51..1f553d20e 100644
--- a/config/consensus.go
+++ b/config/consensus.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -152,8 +152,7 @@ type ConsensusParams struct {
// critical path
AgreementFilterTimeoutPeriod0 time.Duration
- FastRecoveryLambda time.Duration // time between fast recovery attempts
- FastPartitionRecovery bool // set when fast partition recovery is enabled
+ FastRecoveryLambda time.Duration // time between fast recovery attempts
// how to commit to the payset: flat or merkle tree
PaysetCommit PaysetCommitType
@@ -708,7 +707,6 @@ func initConsensusProtocols() {
// v10 introduces fast partition recovery (and also raises NumProposers).
v10 := v9
- v10.FastPartitionRecovery = true
v10.NumProposers = 20
v10.LateCommitteeSize = 500
v10.LateCommitteeThreshold = 320
diff --git a/config/consensus_test.go b/config/consensus_test.go
index 6cdc2ebd1..cf0fd7354 100644
--- a/config/consensus_test.go
+++ b/config/consensus_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/config/defaultsGenerator/defaultsGenerator.go b/config/defaultsGenerator/defaultsGenerator.go
index 70a8e7b13..47b5ac51e 100644
--- a/config/defaultsGenerator/defaultsGenerator.go
+++ b/config/defaultsGenerator/defaultsGenerator.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/config/keyfile.go b/config/keyfile.go
index 16bd36671..28aea1f22 100644
--- a/config/keyfile.go
+++ b/config/keyfile.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/config/localTemplate.go b/config/localTemplate.go
index 20a141e8c..53c2c3f77 100644
--- a/config/localTemplate.go
+++ b/config/localTemplate.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -41,7 +41,7 @@ type Local struct {
// Version tracks the current version of the defaults so we can migrate old -> new
// This is specifically important whenever we decide to change the default value
// for an existing parameter. This field tag must be updated any time we add a new version.
- Version uint32 `version[0]:"0" version[1]:"1" version[2]:"2" version[3]:"3" version[4]:"4" version[5]:"5" version[6]:"6" version[7]:"7" version[8]:"8" version[9]:"9" version[10]:"10" version[11]:"11" version[12]:"12" version[13]:"13" version[14]:"14" version[15]:"15" version[16]:"16" version[17]:"17" version[18]:"18" version[19]:"19"`
+ Version uint32 `version[0]:"0" version[1]:"1" version[2]:"2" version[3]:"3" version[4]:"4" version[5]:"5" version[6]:"6" version[7]:"7" version[8]:"8" version[9]:"9" version[10]:"10" version[11]:"11" version[12]:"12" version[13]:"13" version[14]:"14" version[15]:"15" version[16]:"16" version[17]:"17" version[18]:"18" version[19]:"19" version[20]:"20"`
// environmental (may be overridden)
// When enabled, stores blocks indefinitally, otherwise, only the most recents blocks
@@ -74,7 +74,7 @@ type Local struct {
CadaverSizeTarget uint64 `version[0]:"1073741824"`
// IncomingConnectionsLimit specifies the max number of long-lived incoming
- // connections. 0 means no connections allowed. -1 is unbounded.
+ // connections. 0 means no connections allowed. Must be non-negative.
// Estimating 5MB per incoming connection, 5MB*800 = 4GB
IncomingConnectionsLimit int `version[0]:"-1" version[1]:"10000" version[17]:"800"`
@@ -99,9 +99,9 @@ type Local struct {
PriorityPeers map[string]bool `version[4]:""`
// To make sure the algod process does not run out of FDs, algod ensures
- // that RLIMIT_NOFILE exceeds the max number of incoming connections (i.e.,
- // IncomingConnectionsLimit) by at least ReservedFDs. ReservedFDs are meant
- // to leave room for short-lived FDs like DNS queries, SQLite files, etc.
+ // that RLIMIT_NOFILE >= IncomingConnectionsLimit + RestConnectionsHardLimit +
+ // ReservedFDs. ReservedFDs are meant to leave room for short-lived FDs like
+ // DNS queries, SQLite files, etc. This parameter shouldn't be changed.
ReservedFDs uint64 `version[2]:"256"`
// local server
@@ -192,6 +192,9 @@ type Local struct {
// negative (-1) to disable, positive (1) to enable, 0 for default.
DeadlockDetection int `version[1]:"0"`
+ // The threshold used for deadlock detection, in seconds.
+ DeadlockDetectionThreshold int `version[20]:"30"`
+
// Prefer to run algod Hosted (under algoh)
// Observed by `goal` for now.
RunHosted bool `version[3]:"false"`
@@ -420,6 +423,13 @@ type Local struct {
// ProposalAssemblyTime is the max amount of time to spend on generating a proposal block.
ProposalAssemblyTime time.Duration `version[19]:"250000000"`
+
+ // When the number of http connections to the REST layer exceeds the soft limit,
+ // we start returning http code 429 Too Many Requests.
+ RestConnectionsSoftLimit uint64 `version[20]:"1024"`
+ // The http server does not accept new connections as long we have this many
+ // (hard limit) connections already.
+ RestConnectionsHardLimit uint64 `version[20]:"2048"`
}
// DNSBootstrapArray returns an array of one or more DNS Bootstrap identifiers
diff --git a/config/local_defaults.go b/config/local_defaults.go
index ae1aa7043..27bab0158 100644
--- a/config/local_defaults.go
+++ b/config/local_defaults.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -20,7 +20,7 @@
package config
var defaultLocal = Local{
- Version: 19,
+ Version: 20,
AccountUpdatesStatsInterval: 5000000000,
AccountsRebuildSynchronousMode: 1,
AnnounceParticipationKey: true,
@@ -44,6 +44,7 @@ var defaultLocal = Local{
DNSBootstrapID: "<network>.algorand.network",
DNSSecurityFlags: 1,
DeadlockDetection: 0,
+ DeadlockDetectionThreshold: 30,
DisableLocalhostConnectionRateLimit: true,
DisableNetworking: false,
DisableOutgoingConnectionThrottling: false,
@@ -98,6 +99,8 @@ var defaultLocal = Local{
PublicAddress: "",
ReconnectTime: 60000000000,
ReservedFDs: 256,
+ RestConnectionsHardLimit: 2048,
+ RestConnectionsSoftLimit: 1024,
RestReadTimeoutSeconds: 15,
RestWriteTimeoutSeconds: 120,
RunHosted: false,
diff --git a/config/migrate.go b/config/migrate.go
index bc0392989..9fd9c8607 100644
--- a/config/migrate.go
+++ b/config/migrate.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/config/version.go b/config/version.go
index 21370a4d7..d1591a372 100644
--- a/config/version.go
+++ b/config/version.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/batchverifier.go b/crypto/batchverifier.go
index c7f84fa45..7e21b2d5d 100644
--- a/crypto/batchverifier.go
+++ b/crypto/batchverifier.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/batchverifier_test.go b/crypto/batchverifier_test.go
index 18e2e22e4..c632ca4e7 100644
--- a/crypto/batchverifier_test.go
+++ b/crypto/batchverifier_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/compactcert/bigfloat.go b/crypto/compactcert/bigfloat.go
index 0b9ee4996..eb4004736 100644
--- a/crypto/compactcert/bigfloat.go
+++ b/crypto/compactcert/bigfloat.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/compactcert/bigfloat_test.go b/crypto/compactcert/bigfloat_test.go
index 354821add..12efcf38b 100644
--- a/crypto/compactcert/bigfloat_test.go
+++ b/crypto/compactcert/bigfloat_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/compactcert/builder.go b/crypto/compactcert/builder.go
index 5966ca9a7..933c85357 100644
--- a/crypto/compactcert/builder.go
+++ b/crypto/compactcert/builder.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/compactcert/builder_test.go b/crypto/compactcert/builder_test.go
index 13738b5c3..29e1db7d5 100644
--- a/crypto/compactcert/builder_test.go
+++ b/crypto/compactcert/builder_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/compactcert/common.go b/crypto/compactcert/common.go
index d2370d779..3db5d8d18 100644
--- a/crypto/compactcert/common.go
+++ b/crypto/compactcert/common.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/compactcert/common_test.go b/crypto/compactcert/common_test.go
index ce26e4c15..e3d89f0b4 100644
--- a/crypto/compactcert/common_test.go
+++ b/crypto/compactcert/common_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/compactcert/structs.go b/crypto/compactcert/structs.go
index 1e02e4eaf..764b2bc51 100644
--- a/crypto/compactcert/structs.go
+++ b/crypto/compactcert/structs.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/compactcert/verifier.go b/crypto/compactcert/verifier.go
index 38747d611..6ef594602 100644
--- a/crypto/compactcert/verifier.go
+++ b/crypto/compactcert/verifier.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go
index 472fb15dd..86c65f909 100644
--- a/crypto/crypto_test.go
+++ b/crypto/crypto_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/cryptoerror.go b/crypto/cryptoerror.go
index fb8e45698..26636dd88 100644
--- a/crypto/cryptoerror.go
+++ b/crypto/cryptoerror.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/curve25519.go b/crypto/curve25519.go
index e0bf278de..998edb0cb 100644
--- a/crypto/curve25519.go
+++ b/crypto/curve25519.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/curve25519_test.go b/crypto/curve25519_test.go
index 785004861..d7a74570f 100644
--- a/crypto/curve25519_test.go
+++ b/crypto/curve25519_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/encoding_test.go b/crypto/encoding_test.go
index e5df42c9e..515f6a3ef 100644
--- a/crypto/encoding_test.go
+++ b/crypto/encoding_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/memcpy_chk_windows.c b/crypto/memcpy_chk_windows.c
index 68302263e..f14eee0fe 100644
--- a/crypto/memcpy_chk_windows.c
+++ b/crypto/memcpy_chk_windows.c
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merklearray/array.go b/crypto/merklearray/array.go
index b8e281a8e..ec57473bc 100644
--- a/crypto/merklearray/array.go
+++ b/crypto/merklearray/array.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merklearray/layer.go b/crypto/merklearray/layer.go
index 614516e85..0db3bd97a 100644
--- a/crypto/merklearray/layer.go
+++ b/crypto/merklearray/layer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merklearray/layer_test.go b/crypto/merklearray/layer_test.go
index 96418757f..189b16f85 100644
--- a/crypto/merklearray/layer_test.go
+++ b/crypto/merklearray/layer_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merklearray/merkle.go b/crypto/merklearray/merkle.go
index 06be1bdac..34c6b243a 100644
--- a/crypto/merklearray/merkle.go
+++ b/crypto/merklearray/merkle.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merklearray/merkle_test.go b/crypto/merklearray/merkle_test.go
index 765ce6190..8a40f4b76 100644
--- a/crypto/merklearray/merkle_test.go
+++ b/crypto/merklearray/merkle_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merklearray/partial.go b/crypto/merklearray/partial.go
index d40d6f1d2..c23a11769 100644
--- a/crypto/merklearray/partial.go
+++ b/crypto/merklearray/partial.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merklearray/worker.go b/crypto/merklearray/worker.go
index 67f6aa0c5..35e533a01 100644
--- a/crypto/merklearray/worker.go
+++ b/crypto/merklearray/worker.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merkletrie/bitset.go b/crypto/merkletrie/bitset.go
index 87e90f669..f7f2d78d0 100644
--- a/crypto/merkletrie/bitset.go
+++ b/crypto/merkletrie/bitset.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merkletrie/bitset_test.go b/crypto/merkletrie/bitset_test.go
index c722ff453..758c3299e 100644
--- a/crypto/merkletrie/bitset_test.go
+++ b/crypto/merkletrie/bitset_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merkletrie/cache.go b/crypto/merkletrie/cache.go
index 8c41a05b4..4375825a2 100644
--- a/crypto/merkletrie/cache.go
+++ b/crypto/merkletrie/cache.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merkletrie/cache_test.go b/crypto/merkletrie/cache_test.go
index 07819644e..15b14e676 100644
--- a/crypto/merkletrie/cache_test.go
+++ b/crypto/merkletrie/cache_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merkletrie/committer.go b/crypto/merkletrie/committer.go
index f2a253c42..ac6fcd72c 100644
--- a/crypto/merkletrie/committer.go
+++ b/crypto/merkletrie/committer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merkletrie/committer_test.go b/crypto/merkletrie/committer_test.go
index 04a43a1b2..815274302 100644
--- a/crypto/merkletrie/committer_test.go
+++ b/crypto/merkletrie/committer_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merkletrie/node.go b/crypto/merkletrie/node.go
index 8d6d05d5b..e4d3a18f3 100644
--- a/crypto/merkletrie/node.go
+++ b/crypto/merkletrie/node.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merkletrie/node_test.go b/crypto/merkletrie/node_test.go
index db4f02bdf..76121b5ae 100644
--- a/crypto/merkletrie/node_test.go
+++ b/crypto/merkletrie/node_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merkletrie/trie.go b/crypto/merkletrie/trie.go
index 9cb855ccc..22c03e1ce 100644
--- a/crypto/merkletrie/trie.go
+++ b/crypto/merkletrie/trie.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/merkletrie/trie_test.go b/crypto/merkletrie/trie_test.go
index 82f86b2d1..fd9b38d98 100644
--- a/crypto/merkletrie/trie_test.go
+++ b/crypto/merkletrie/trie_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/multisig.go b/crypto/multisig.go
index 6c9a1ca66..d988ca4d5 100644
--- a/crypto/multisig.go
+++ b/crypto/multisig.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/multisig_test.go b/crypto/multisig_test.go
index 8636331bf..2314fd623 100644
--- a/crypto/multisig_test.go
+++ b/crypto/multisig_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/onetimesig.go b/crypto/onetimesig.go
index 435e85660..6196a99ee 100644
--- a/crypto/onetimesig.go
+++ b/crypto/onetimesig.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/onetimesig_test.go b/crypto/onetimesig_test.go
index 9f1b85f06..c97733fca 100644
--- a/crypto/onetimesig_test.go
+++ b/crypto/onetimesig_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/passphrase/errors.go b/crypto/passphrase/errors.go
index ececfa67b..7785ca256 100644
--- a/crypto/passphrase/errors.go
+++ b/crypto/passphrase/errors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/passphrase/passphrase.go b/crypto/passphrase/passphrase.go
index d57eeff8f..f90593ce5 100644
--- a/crypto/passphrase/passphrase.go
+++ b/crypto/passphrase/passphrase.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/passphrase/passphrase_test.go b/crypto/passphrase/passphrase_test.go
index fc4b399d1..3874f57e0 100644
--- a/crypto/passphrase/passphrase_test.go
+++ b/crypto/passphrase/passphrase_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/passphrase/wordlist.go b/crypto/passphrase/wordlist.go
index 77a20b2fc..4da859135 100644
--- a/crypto/passphrase/wordlist.go
+++ b/crypto/passphrase/wordlist.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/rand.go b/crypto/rand.go
index 905917f1d..729e01c17 100644
--- a/crypto/rand.go
+++ b/crypto/rand.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/rand_test.go b/crypto/rand_test.go
index b36cb6a5b..5f69fd55c 100644
--- a/crypto/rand_test.go
+++ b/crypto/rand_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/util.go b/crypto/util.go
index 568570928..6b1bb4a55 100644
--- a/crypto/util.go
+++ b/crypto/util.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/util_test.go b/crypto/util_test.go
index 0488dcadb..281d78a1d 100644
--- a/crypto/util_test.go
+++ b/crypto/util_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/vrf.go b/crypto/vrf.go
index 88e314485..739f93f81 100644
--- a/crypto/vrf.go
+++ b/crypto/vrf.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/crypto/vrf_test.go b/crypto/vrf_test.go
index 42e8dc7cc..72c7f68b3 100644
--- a/crypto/vrf_test.go
+++ b/crypto/vrf_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/algod.oas2.json b/daemon/algod/api/algod.oas2.json
index c6e2816d8..3e258d36f 100644
--- a/daemon/algod/api/algod.oas2.json
+++ b/daemon/algod/api/algod.oas2.json
@@ -494,7 +494,7 @@
}
},
"404": {
- "description": "Application Not Found",
+ "description": "Participation Key Not Found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
@@ -553,6 +553,12 @@
"$ref": "#/definitions/ErrorResponse"
}
},
+ "404": {
+ "description": "Participation Key Not Found",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
"500": {
"description": "Internal Error",
"schema": {
@@ -576,14 +582,14 @@
"tags": [
"private"
],
- "description": "Delete a given participation key by id",
+ "description": "Delete a given participation key by ID",
"produces": [
"application/json"
],
"schemes": [
"http"
],
- "summary": "Delete a given participation key by id",
+ "summary": "Delete a given participation key by ID",
"operationId": "DeleteParticipationKeyByID",
"responses": {
"200": {
@@ -601,6 +607,12 @@
"$ref": "#/definitions/ErrorResponse"
}
},
+ "404": {
+ "description": "Participation Key Not Found",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
"500": {
"description": "Internal Error",
"schema": {
@@ -616,14 +628,14 @@
"tags": [
"private"
],
- "description": "Given a participation id, return information about that participation key",
+ "description": "Given a participation ID, return information about that participation key",
"produces": [
"application/json"
],
"schemes": [
"http"
],
- "summary": "Get participation key info by id",
+ "summary": "Get participation key info given a participation ID",
"operationId": "GetParticipationKeyByID",
"responses": {
"200": {
@@ -643,7 +655,69 @@
}
},
"404": {
- "description": "Application Not Found",
+ "description": "Participation Key Not Found",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "500": {
+ "description": "Internal Error",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "default": {
+ "description": "Unknown Error"
+ }
+ }
+ },
+ "post": {
+ "tags": [
+ "private"
+ ],
+ "description": "Given a participation ID, append state proof keys to a particular set of participation keys",
+ "consumes": [
+ "application/msgpack"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "description": "The state proof keys to add to an existing participation ID",
+ "name": "keymap",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "binary"
+ }
+ }
+ ],
+ "schemes": [
+ "http"
+ ],
+ "summary": "Append state proof keys to a participation key",
+ "operationId": "AppendKeys",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "$ref": "#/responses/ParticipationKeyResponse"
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "401": {
+ "description": "Invalid API Token",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "404": {
+ "description": "Participation Key Not Found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
@@ -934,7 +1008,7 @@
},
"/v2/transactions/pending/{txid}": {
"get": {
- "description": "Given a transaction id of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:\n- transaction committed (committed round \u003e 0)\n- transaction still in the pool (committed round = 0, pool error = \"\")\n- transaction removed from pool due to error (committed round = 0, pool error != \"\")\nOr the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.\n",
+ "description": "Given a transaction ID of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:\n- transaction committed (committed round \u003e 0)\n- transaction still in the pool (committed round = 0, pool error = \"\")\n- transaction removed from pool due to error (committed round = 0, pool error != \"\")\nOr the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.\n",
"produces": [
"application/json",
"application/msgpack"
@@ -948,7 +1022,7 @@
{
"pattern": "[A-Z0-9]+",
"type": "string",
- "description": "A transaction id",
+ "description": "A transaction ID",
"name": "txid",
"in": "path",
"required": true
@@ -959,7 +1033,7 @@
],
"responses": {
"200": {
- "description": "Given a transaction id of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:\n- transaction committed (committed round \u003e 0)\n- transaction still in the pool (committed round = 0, pool error = \"\")\n- transaction removed from pool due to error (committed round = 0, pool error != \"\")\n\nOr the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.",
+ "description": "Given a transaction ID of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:\n- transaction committed (committed round \u003e 0)\n- transaction still in the pool (committed round = 0, pool error = \"\")\n- transaction removed from pool due to error (committed round = 0, pool error != \"\")\n\nOr the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.",
"schema": {
"$ref": "#/definitions/PendingTransactionResponse"
}
@@ -998,7 +1072,7 @@
},
"/v2/applications/{application-id}": {
"get": {
- "description": "Given a application id, it returns application information including creator, approval and clear programs, global and local schemas, and global state.",
+ "description": "Given a application ID, it returns application information including creator, approval and clear programs, global and local schemas, and global state.",
"produces": [
"application/json"
],
@@ -1061,7 +1135,7 @@
},
"/v2/assets/{asset-id}": {
"get": {
- "description": "Given a asset id, it returns asset information including creator, name, total supply and special addresses.",
+ "description": "Given a asset ID, it returns asset information including creator, name, total supply and special addresses.",
"produces": [
"application/json"
],
@@ -2576,7 +2650,7 @@
}
},
"ParticipationKeyResponse": {
- "description": "A detailed description of a participation id",
+ "description": "A detailed description of a participation ID",
"schema": {
"$ref": "#/definitions/ParticipationKey"
}
@@ -2593,7 +2667,7 @@
],
"properties": {
"partId": {
- "description": "encoding of the participation id.",
+ "description": "encoding of the participation ID.",
"type": "string"
}
}
diff --git a/daemon/algod/api/algod.oas3.yml b/daemon/algod/api/algod.oas3.yml
index 86ac76a5d..538136733 100644
--- a/daemon/algod/api/algod.oas3.yml
+++ b/daemon/algod/api/algod.oas3.yml
@@ -465,7 +465,7 @@
}
}
},
- "description": "A detailed description of a participation id"
+ "description": "A detailed description of a participation ID"
},
"ParticipationKeysResponse": {
"content": {
@@ -516,7 +516,7 @@
"schema": {
"properties": {
"partId": {
- "description": "encoding of the participation id.",
+ "description": "encoding of the participation ID.",
"type": "string"
}
},
@@ -1898,7 +1898,7 @@
},
"/v2/applications/{application-id}": {
"get": {
- "description": "Given a application id, it returns application information including creator, approval and clear programs, global and local schemas, and global state.",
+ "description": "Given a application ID, it returns application information including creator, approval and clear programs, global and local schemas, and global state.",
"operationId": "GetApplicationByID",
"parameters": [
{
@@ -1972,7 +1972,7 @@
},
"/v2/assets/{asset-id}": {
"get": {
- "description": "Given a asset id, it returns asset information including creator, name, total supply and special addresses.",
+ "description": "Given a asset ID, it returns asset information including creator, name, total supply and special addresses.",
"operationId": "GetAssetByID",
"parameters": [
{
@@ -2582,7 +2582,7 @@
}
}
},
- "description": "Application Not Found"
+ "description": "Participation Key Not Found"
},
"500": {
"content": {
@@ -2625,7 +2625,7 @@
"schema": {
"properties": {
"partId": {
- "description": "encoding of the participation id.",
+ "description": "encoding of the participation ID.",
"type": "string"
}
},
@@ -2658,6 +2658,16 @@
},
"description": "Invalid API Token"
},
+ "404": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ },
+ "description": "Participation Key Not Found"
+ },
"500": {
"content": {
"application/json": {
@@ -2692,7 +2702,7 @@
},
"/v2/participation/{participation-id}": {
"delete": {
- "description": "Delete a given participation key by id",
+ "description": "Delete a given participation key by ID",
"operationId": "DeleteParticipationKeyByID",
"parameters": [
{
@@ -2729,6 +2739,16 @@
},
"description": "Invalid API Token"
},
+ "404": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ },
+ "description": "Participation Key Not Found"
+ },
"500": {
"content": {
"application/json": {
@@ -2744,13 +2764,13 @@
"description": "Unknown Error"
}
},
- "summary": "Delete a given participation key by id",
+ "summary": "Delete a given participation key by ID",
"tags": [
"private"
]
},
"get": {
- "description": "Given a participation id, return information about that participation key",
+ "description": "Given a participation ID, return information about that participation key",
"operationId": "GetParticipationKeyByID",
"parameters": [
{
@@ -2771,7 +2791,7 @@
}
}
},
- "description": "A detailed description of a participation id"
+ "description": "A detailed description of a participation ID"
},
"400": {
"content": {
@@ -2801,7 +2821,7 @@
}
}
},
- "description": "Application Not Found"
+ "description": "Participation Key Not Found"
},
"500": {
"content": {
@@ -2818,10 +2838,97 @@
"description": "Unknown Error"
}
},
- "summary": "Get participation key info by id",
+ "summary": "Get participation key info given a participation ID",
"tags": [
"private"
]
+ },
+ "post": {
+ "description": "Given a participation ID, append state proof keys to a particular set of participation keys",
+ "operationId": "AppendKeys",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "participation-id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/msgpack": {
+ "schema": {
+ "format": "binary",
+ "type": "string"
+ }
+ }
+ },
+ "description": "The state proof keys to add to an existing participation ID",
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ParticipationKey"
+ }
+ }
+ },
+ "description": "A detailed description of a participation ID"
+ },
+ "400": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ },
+ "description": "Bad Request"
+ },
+ "401": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ },
+ "description": "Invalid API Token"
+ },
+ "404": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ },
+ "description": "Participation Key Not Found"
+ },
+ "500": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ },
+ "description": "Internal Error"
+ },
+ "default": {
+ "content": {},
+ "description": "Unknown Error"
+ }
+ },
+ "summary": "Append state proof keys to a participation key",
+ "tags": [
+ "private"
+ ],
+ "x-codegen-request-body-name": "keymap"
}
},
"/v2/shutdown": {
@@ -3604,11 +3711,11 @@
},
"/v2/transactions/pending/{txid}": {
"get": {
- "description": "Given a transaction id of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:\n- transaction committed (committed round > 0)\n- transaction still in the pool (committed round = 0, pool error = \"\")\n- transaction removed from pool due to error (committed round = 0, pool error != \"\")\nOr the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.\n",
+ "description": "Given a transaction ID of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:\n- transaction committed (committed round > 0)\n- transaction still in the pool (committed round = 0, pool error = \"\")\n- transaction removed from pool due to error (committed round = 0, pool error != \"\")\nOr the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.\n",
"operationId": "PendingTransactionInformation",
"parameters": [
{
- "description": "A transaction id",
+ "description": "A transaction ID",
"in": "path",
"name": "txid",
"required": true,
@@ -3644,7 +3751,7 @@
}
}
},
- "description": "Given a transaction id of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:\n- transaction committed (committed round > 0)\n- transaction still in the pool (committed round = 0, pool error = \"\")\n- transaction removed from pool due to error (committed round = 0, pool error != \"\")\n\nOr the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error."
+ "description": "Given a transaction ID of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:\n- transaction committed (committed round > 0)\n- transaction still in the pool (committed round = 0, pool error = \"\")\n- transaction removed from pool due to error (committed round = 0, pool error != \"\")\n\nOr the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error."
},
"400": {
"content": {
diff --git a/daemon/algod/api/client/encoding.go b/daemon/algod/api/client/encoding.go
index 36d034d22..036948c1d 100644
--- a/daemon/algod/api/client/encoding.go
+++ b/daemon/algod/api/client/encoding.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/client/restClient.go b/daemon/algod/api/client/restClient.go
index f57c0d0be..acfa0da14 100644
--- a/daemon/algod/api/client/restClient.go
+++ b/daemon/algod/api/client/restClient.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/common/handlers.go b/daemon/algod/api/server/common/handlers.go
index d3cd32faa..c0d2f43a9 100644
--- a/daemon/algod/api/server/common/handlers.go
+++ b/daemon/algod/api/server/common/handlers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/common/metrics.go b/daemon/algod/api/server/common/metrics.go
index df28d091b..4920acfb6 100644
--- a/daemon/algod/api/server/common/metrics.go
+++ b/daemon/algod/api/server/common/metrics.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/common/responses.go b/daemon/algod/api/server/common/responses.go
index 1667edf46..452ed5808 100644
--- a/daemon/algod/api/server/common/responses.go
+++ b/daemon/algod/api/server/common/responses.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/common/routes.go b/daemon/algod/api/server/common/routes.go
index 995f16e1d..153a685bf 100644
--- a/daemon/algod/api/server/common/routes.go
+++ b/daemon/algod/api/server/common/routes.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/lib/common.go b/daemon/algod/api/server/lib/common.go
index 1b71337d8..8e002d26a 100644
--- a/daemon/algod/api/server/lib/common.go
+++ b/daemon/algod/api/server/lib/common.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/lib/middlewares/auth.go b/daemon/algod/api/server/lib/middlewares/auth.go
index c3c15c2b1..168afdc84 100644
--- a/daemon/algod/api/server/lib/middlewares/auth.go
+++ b/daemon/algod/api/server/lib/middlewares/auth.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/lib/middlewares/auth_test.go b/daemon/algod/api/server/lib/middlewares/auth_test.go
index b0dd0fe26..7e00b66c3 100644
--- a/daemon/algod/api/server/lib/middlewares/auth_test.go
+++ b/daemon/algod/api/server/lib/middlewares/auth_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/lib/middlewares/connectionLimiter.go b/daemon/algod/api/server/lib/middlewares/connectionLimiter.go
new file mode 100644
index 000000000..bf27ef2b6
--- /dev/null
+++ b/daemon/algod/api/server/lib/middlewares/connectionLimiter.go
@@ -0,0 +1,48 @@
+// Copyright (C) 2019-2022 Algorand, Inc.
+// This file is part of go-algorand
+//
+// go-algorand is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as
+// published by the Free Software Foundation, either version 3 of the
+// License, or (at your option) any later version.
+//
+// go-algorand is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with go-algorand. If not, see <https://www.gnu.org/licenses/>.
+
+package middlewares
+
+import (
+ "net/http"
+
+ "github.com/labstack/echo/v4"
+)
+
+// MakeConnectionLimiter makes an echo middleware that limits the number of
+// simultaneous connections. All connections above the limit will be returned
+// the 429 Too Many Requests http error.
+func MakeConnectionLimiter(limit uint64) echo.MiddlewareFunc {
+ sem := make(chan struct{}, limit)
+
+ return func(next echo.HandlerFunc) echo.HandlerFunc {
+ return func(ctx echo.Context) error {
+ select {
+ case sem <- struct{}{}:
+ defer func() {
+ // If we fail to read from `sem`, just continue.
+ select {
+ case <-sem:
+ default:
+ }
+ }()
+ return next(ctx)
+ default:
+ return ctx.NoContent(http.StatusTooManyRequests)
+ }
+ }
+ }
+}
diff --git a/daemon/algod/api/server/lib/middlewares/connectionLimiter_test.go b/daemon/algod/api/server/lib/middlewares/connectionLimiter_test.go
new file mode 100644
index 000000000..6de0a3c20
--- /dev/null
+++ b/daemon/algod/api/server/lib/middlewares/connectionLimiter_test.go
@@ -0,0 +1,100 @@
+// Copyright (C) 2019-2022 Algorand, Inc.
+// This file is part of go-algorand
+//
+// go-algorand is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as
+// published by the Free Software Foundation, either version 3 of the
+// License, or (at your option) any later version.
+//
+// go-algorand is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with go-algorand. If not, see <https://www.gnu.org/licenses/>.
+
+package middlewares_test
+
+import (
+ "errors"
+ "net/http"
+ "net/http/httptest"
+ "testing"
+
+ "github.com/labstack/echo/v4"
+ "github.com/stretchr/testify/assert"
+
+ "github.com/algorand/go-algorand/daemon/algod/api/server/lib/middlewares"
+ "github.com/algorand/go-algorand/test/partitiontest"
+)
+
+func TestConnectionLimiterBasic(t *testing.T) {
+ partitiontest.PartitionTest(t)
+
+ e := echo.New()
+
+ handlerCh := make(chan struct{})
+ limit := 5
+ handler := func(c echo.Context) error {
+ <-handlerCh
+ return c.String(http.StatusOK, "test")
+ }
+ middleware := middlewares.MakeConnectionLimiter(uint64(limit))
+
+ numConnections := 13
+ for i := 0; i < 3; i++ {
+ var recorders []*httptest.ResponseRecorder
+ doneCh := make(chan int)
+ errCh := make(chan error)
+
+ for index := 0; index < numConnections; index++ {
+ req := httptest.NewRequest(http.MethodGet, "/", nil)
+ rec := httptest.NewRecorder()
+ ctx := e.NewContext(req, rec)
+
+ recorders = append(recorders, rec)
+
+ go func(index int) {
+ err := middleware(handler)(ctx)
+ doneCh <- index
+ errCh <- err
+ }(index)
+ }
+
+ // Check http 429 code.
+ for j := 0; j < numConnections-limit; j++ {
+ index := <-doneCh
+ assert.Equal(t, http.StatusTooManyRequests, recorders[index].Code)
+ }
+
+ // Let handlers finish.
+ for j := 0; j < limit; j++ {
+ handlerCh <- struct{}{}
+ }
+
+ // All other connections must return 200.
+ for j := 0; j < limit; j++ {
+ index := <-doneCh
+ assert.Equal(t, http.StatusOK, recorders[index].Code)
+ }
+
+ // Check that no errors were returned by the middleware.
+ for i := 0; i < numConnections; i++ {
+ assert.NoError(t, <-errCh)
+ }
+ }
+}
+
+func TestConnectionLimiterForwardsError(t *testing.T) {
+ partitiontest.PartitionTest(t)
+
+ handlerError := errors.New("handler error")
+ handler := func(c echo.Context) error {
+ return handlerError
+ }
+ middleware := middlewares.MakeConnectionLimiter(1)
+
+ err := middleware(handler)(nil)
+ assert.ErrorIs(t, err, handlerError)
+}
diff --git a/daemon/algod/api/server/lib/middlewares/cors.go b/daemon/algod/api/server/lib/middlewares/cors.go
index dcf38bad3..71cacb280 100644
--- a/daemon/algod/api/server/lib/middlewares/cors.go
+++ b/daemon/algod/api/server/lib/middlewares/cors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/lib/middlewares/logger.go b/daemon/algod/api/server/lib/middlewares/logger.go
index 7ccfaed19..94559abd0 100644
--- a/daemon/algod/api/server/lib/middlewares/logger.go
+++ b/daemon/algod/api/server/lib/middlewares/logger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/router.go b/daemon/algod/api/server/router.go
index 04cfa4ac2..57e56f817 100644
--- a/daemon/algod/api/server/router.go
+++ b/daemon/algod/api/server/router.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -81,6 +81,8 @@ import (
const (
apiV1Tag = "/v1"
+ // TokenHeader is the header where we put the token.
+ TokenHeader = "X-Algo-API-Token"
)
// wrapCtx passes a common context to each request without a global variable.
@@ -99,11 +101,8 @@ func registerHandlers(router *echo.Echo, prefix string, routes lib.Routes, ctx l
}
}
-// TokenHeader is the header where we put the token.
-const TokenHeader = "X-Algo-API-Token"
-
// NewRouter builds and returns a new router with our REST handlers registered.
-func NewRouter(logger logging.Logger, node *node.AlgorandFullNode, shutdown <-chan struct{}, apiToken string, adminAPIToken string, listener net.Listener) *echo.Echo {
+func NewRouter(logger logging.Logger, node *node.AlgorandFullNode, shutdown <-chan struct{}, apiToken string, adminAPIToken string, listener net.Listener, numConnectionsLimit uint64) *echo.Echo {
if err := tokens.ValidateAPIToken(apiToken); err != nil {
logger.Errorf("Invalid apiToken was passed to NewRouter ('%s'): %v", apiToken, err)
}
@@ -118,9 +117,12 @@ func NewRouter(logger logging.Logger, node *node.AlgorandFullNode, shutdown <-ch
e.Listener = listener
e.HideBanner = true
- e.Pre(middleware.RemoveTrailingSlash())
- e.Use(middlewares.MakeLogger(logger))
- e.Use(middlewares.MakeCORS(TokenHeader))
+ e.Pre(
+ middlewares.MakeConnectionLimiter(numConnectionsLimit),
+ middleware.RemoveTrailingSlash())
+ e.Use(
+ middlewares.MakeLogger(logger),
+ middlewares.MakeCORS(TokenHeader))
// Request Context
ctx := lib.ReqContext{Node: node, Log: logger, Shutdown: shutdown}
diff --git a/daemon/algod/api/server/router_test.go b/daemon/algod/api/server/router_test.go
index 7474165a9..edc5933d7 100644
--- a/daemon/algod/api/server/router_test.go
+++ b/daemon/algod/api/server/router_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/v1/handlers/errors.go b/daemon/algod/api/server/v1/handlers/errors.go
index 5ae037969..ae70a52e9 100644
--- a/daemon/algod/api/server/v1/handlers/errors.go
+++ b/daemon/algod/api/server/v1/handlers/errors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/v1/handlers/handlers.go b/daemon/algod/api/server/v1/handlers/handlers.go
index 9d2d34934..2ad7adc27 100644
--- a/daemon/algod/api/server/v1/handlers/handlers.go
+++ b/daemon/algod/api/server/v1/handlers/handlers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/v1/handlers/handlers_test.go b/daemon/algod/api/server/v1/handlers/handlers_test.go
index 8649efc4f..6e54c9118 100644
--- a/daemon/algod/api/server/v1/handlers/handlers_test.go
+++ b/daemon/algod/api/server/v1/handlers/handlers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/v1/handlers/responses.go b/daemon/algod/api/server/v1/handlers/responses.go
index 33a8b75f4..16f8a51b0 100644
--- a/daemon/algod/api/server/v1/handlers/responses.go
+++ b/daemon/algod/api/server/v1/handlers/responses.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/v1/routes/routes.go b/daemon/algod/api/server/v1/routes/routes.go
index 6f79d1801..94496e294 100644
--- a/daemon/algod/api/server/v1/routes/routes.go
+++ b/daemon/algod/api/server/v1/routes/routes.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/v2/account.go b/daemon/algod/api/server/v2/account.go
index a723db72f..f1b4deaa3 100644
--- a/daemon/algod/api/server/v2/account.go
+++ b/daemon/algod/api/server/v2/account.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/v2/account_test.go b/daemon/algod/api/server/v2/account_test.go
index 61498fbe4..9483bcc41 100644
--- a/daemon/algod/api/server/v2/account_test.go
+++ b/daemon/algod/api/server/v2/account_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/v2/dryrun.go b/daemon/algod/api/server/v2/dryrun.go
index 04279ce67..19a0f92d6 100644
--- a/daemon/algod/api/server/v2/dryrun.go
+++ b/daemon/algod/api/server/v2/dryrun.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/v2/dryrun_test.go b/daemon/algod/api/server/v2/dryrun_test.go
index abb28143d..a65f306e3 100644
--- a/daemon/algod/api/server/v2/dryrun_test.go
+++ b/daemon/algod/api/server/v2/dryrun_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/v2/errors.go b/daemon/algod/api/server/v2/errors.go
index 3123e5d7c..e711968fa 100644
--- a/daemon/algod/api/server/v2/errors.go
+++ b/daemon/algod/api/server/v2/errors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/server/v2/generated/private/routes.go b/daemon/algod/api/server/v2/generated/private/routes.go
index 56baf1f2b..abfd37f7d 100644
--- a/daemon/algod/api/server/v2/generated/private/routes.go
+++ b/daemon/algod/api/server/v2/generated/private/routes.go
@@ -29,12 +29,15 @@ type ServerInterface interface {
// Add a participation key to the node
// (POST /v2/participation)
AddParticipationKey(ctx echo.Context) error
- // Delete a given participation key by id
+ // Delete a given participation key by ID
// (DELETE /v2/participation/{participation-id})
DeleteParticipationKeyByID(ctx echo.Context, participationId string) error
- // Get participation key info by id
+ // Get participation key info given a participation ID
// (GET /v2/participation/{participation-id})
GetParticipationKeyByID(ctx echo.Context, participationId string) error
+ // Append state proof keys to a participation key
+ // (POST /v2/participation/{participation-id})
+ AppendKeys(ctx echo.Context, participationId string) error
// (POST /v2/shutdown)
ShutdownNode(ctx echo.Context, params ShutdownNodeParams) error
@@ -211,6 +214,36 @@ func (w *ServerInterfaceWrapper) GetParticipationKeyByID(ctx echo.Context) error
return err
}
+// AppendKeys converts echo context to params.
+func (w *ServerInterfaceWrapper) AppendKeys(ctx echo.Context) error {
+
+ validQueryParams := map[string]bool{
+ "pretty": true,
+ }
+
+ // Check for unknown query parameters.
+ for name, _ := range ctx.QueryParams() {
+ if _, ok := validQueryParams[name]; !ok {
+ return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Unknown parameter detected: %s", name))
+ }
+ }
+
+ var err error
+ // ------------- Path parameter "participation-id" -------------
+ var participationId string
+
+ err = runtime.BindStyledParameter("simple", false, "participation-id", ctx.Param("participation-id"), &participationId)
+ if err != nil {
+ return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter participation-id: %s", err))
+ }
+
+ ctx.Set("api_key.Scopes", []string{""})
+
+ // Invoke the callback with all the unmarshalled arguments
+ err = w.Handler.AppendKeys(ctx, participationId)
+ return err
+}
+
// ShutdownNode converts echo context to params.
func (w *ServerInterfaceWrapper) ShutdownNode(ctx echo.Context) error {
@@ -270,6 +303,7 @@ func RegisterHandlers(router interface {
router.POST("/v2/participation", wrapper.AddParticipationKey, m...)
router.DELETE("/v2/participation/:participation-id", wrapper.DeleteParticipationKeyByID, m...)
router.GET("/v2/participation/:participation-id", wrapper.GetParticipationKeyByID, m...)
+ router.POST("/v2/participation/:participation-id", wrapper.AppendKeys, m...)
router.POST("/v2/shutdown", wrapper.ShutdownNode, m...)
}
@@ -277,143 +311,144 @@ func RegisterHandlers(router interface {
// Base64 encoded, gzipped, json marshaled Swagger object
var swaggerSpec = []string{
- "H4sIAAAAAAAC/+x9f3PbNtLwV8HobiZNXlFyEqfXeKZzrxunrd+maSZ2e+9zcZ4WIlcSahJgAdCSmsff",
- "/RksABIkQUn+cellrn8lFoHFYrG72F0sFh9GqShKwYFrNTr6MCqppAVokPgXTVNRcZ2wzPyVgUolKzUT",
- "fHTkvxGlJeOL0XjEzK8l1cvReMRpAU0b0388kvBbxSRkoyMtKxiPVLqEghrAelOa1jWkdbIQiQNxbEGc",
- "noyut3ygWSZBqT6WP/B8QxhP8yoDoiXliqbmkyIrppdEL5kirjNhnAgORMyJXrYakzmDPFMTP8nfKpCb",
- "YJZu8OEpXTcoJlLk0MfzhShmjIPHCmqk6gUhWpAM5thoSTUxIxhcfUMtiAIq0yWZC7kDVYtEiC/wqhgd",
- "vRsp4BlIXK0U2BX+dy4BfodEU7kAPXo/jk1urkEmmhWRqZ066ktQVa4VwbY4xwW7Ak5Mrwn5vlKazIBQ",
- "Tt5+/YI8ffr0uZlIQbWGzDHZ4Kya0cM52e6jo1FGNfjPfV6j+UJIyrOkbv/26xc4/pmb4L6tqFIQF5Zj",
- "84WcngxNwHeMsBDjGha4Di3uNz0iQtH8PIO5kLDnmtjG97oo4fh/6KqkVKfLUjCuI+tC8Cuxn6M6LOi+",
- "TYfVCLTal4ZS0gB9d5A8f//h8fjxwfVf3h0n/3R/Pnt6vef0X9Rwd1Ag2jCtpASebpKFBIrSsqS8T4+3",
- "jh/UUlR5Rpb0ChefFqjqXV9i+lrVeUXzyvAJS6U4zhdCEerYKIM5rXJN/MCk4rlRUwaa43bCFCmluGIZ",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mm8X/rkmgL+",
+ "6c/4szr91NTpqVV3+6tTZ8rZ7PKpfe6gsfB6tSwXEE1zx4Rzuu0Nqq6G/Q5070mt0S1VzF/2utZ/tpwc",
+ "HhzeHwbtEoM/wIa8EZp8i8dRn6jM7ic+2yyhjmeUZT0mt+oflP5GZJstFCrUonQZoRG7ZMa4Qbm/u/Qf",
+ "Aug9eXUBG2KPaH0o3j352LaHrm6pAz7Z17k+65DPOkTa4Z/e3/CnIC9ZCuQMilJIKlm+IT/z+j7Pzd26",
+ "LIumv7VFv6fTjDeSigwWwBOnsJKZyDa+bk0L4AXYkHHPUJl+bBeftOGvwbCUfVO/fnejj7R9J79rwUSe",
+ "4v8BNt9ssGnHY4z4hF0Ut3qGXV004Izd6PH/z4rns+K5ufGyt/DE7JeoN+EDOd09eewvtsauflPdH3of",
+ "n+MvFdd/28eOP6uEzyrh5irhO4gII0qtUxIRprtJpLevIDAjKgvTjm1xIeN3uOZVTiVRsG+Y4hghuuDE",
+ "fWiJ+3bSorSyPhrlBNZM4bMHkQW7W7/ts4r7rOI+oVOr3YqmbYhc29O5gE1By9q/UctKZ2JlC8JEtSLW",
+ "haW5K6yGpc7qDAktiAfQXDwiP7mbdvnGTOGSZcaM06wAY1LVus509umkTT6rgdC8F7ZgHAdAVYGj2AqC",
+ "NEjpV5AKbl/X6Zy1OczeWJ8wpmT/qAA1mqONw3E0bh22uGWM1Ou7tf3VPxu52hJLr5/Iaf09XVGmk7mQ",
+ "7kYPUqifhaGB5lNX+qDzq72gHPwYPvgf/XVaF+WNfuzmlsS+utQP36hJ6gqTpHCl6vSo9x8MwbHOmVvE",
+ "JufnaDrFZPelUHo6uhp/7OQDhR8/1DT+WO+vjtZXH67+fwAAAP//eGfeXGOmAAA=",
}
// GetSwagger returns the Swagger specification corresponding to the generated code
diff --git a/daemon/algod/api/server/v2/generated/private/types.go b/daemon/algod/api/server/v2/generated/private/types.go
index 9e6d5685b..301578ade 100644
--- a/daemon/algod/api/server/v2/generated/private/types.go
+++ b/daemon/algod/api/server/v2/generated/private/types.go
@@ -640,7 +640,7 @@ type PendingTransactionsResponse struct {
// PostParticipationResponse defines model for PostParticipationResponse.
type PostParticipationResponse struct {
- // encoding of the participation id.
+ // encoding of the participation ID.
PartId string `json:"partId"`
}
diff --git a/daemon/algod/api/server/v2/generated/routes.go b/daemon/algod/api/server/v2/generated/routes.go
index 4d3d7bd11..83946f45b 100644
--- a/daemon/algod/api/server/v2/generated/routes.go
+++ b/daemon/algod/api/server/v2/generated/routes.go
@@ -617,179 +617,179 @@ func RegisterHandlers(router interface {
var swaggerSpec = []string{
"H4sIAAAAAAAC/+y9e3fbOJIo/lXw0+45eawoOa+eic/psz93nO72nSSdE7tn526c2w2RJQljEuAAoC11",
- "rr/7PSgAJEiCkvzIq9d/JRbxKBQKhUI9P45SUZSCA9dqtP9xVFJJC9Ag8S+apqLiOmGZ+SsDlUpWaib4",
- "aN9/I0pLxhej8YiZX0uql6PxiNMCmjam/3gk4V8Vk5CN9rWsYDxS6RIKagbW69K0rkdaJQuRuCEO7BBH",
- "h6PLDR9olklQqg/lLzxfE8bTvMqAaEm5oqn5pMgF00uil0wR15kwTgQHIuZEL1uNyZxBnqmJX+S/KpDr",
- "YJVu8uElXTYgJlLk0IfzhShmjIOHCmqg6g0hWpAM5thoSTUxMxhYfUMtiAIq0yWZC7kFVAtECC/wqhjt",
- "vx8p4BlI3K0U2Dn+dy4B/oBEU7kAPfowji1urkEmmhWRpR057EtQVa4Vwba4xgU7B05Mrwl5XSlNZkAo",
- "J+9+fEGePHny3CykoFpD5ohscFXN7OGabPfR/iijGvznPq3RfCEk5VlSt3/34wuc/9gtcNdWVCmIH5YD",
- "84UcHQ4twHeMkBDjGha4Dy3qNz0ih6L5eQZzIWHHPbGNb3VTwvm/6K6kVKfLUjCuI/tC8Cuxn6M8LOi+",
- "iYfVALTalwZT0gz6fi95/uHjo/Gjvct/e3+Q/Lf789mTyx2X/6IedwsGog3TSkrg6TpZSKB4WpaU9/Hx",
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TNnVbawEeNmtlA+y7JZmeEHKCVTGpOQPgHCTNSUqVVYxc",
+ "mduCLZaaqCpNAbL9U560MElF4Qa+3/zXXnNPq729J0D2HnT7WLtFIHn7fVFVxU+2Ivv35HR0OupBklCI",
+ "c3C5wcIqgbbXVrD/Xw33l17BUbTCoHHF1zUkqprPWcosyXNhLgML0Ynv4wK/gDTI2dQThGmbhhXpiXGR",
+ "LjqnXcywrXT3z/crlMI56OYzuEtz8snr32yqsHpTGbgRdk8g3omMzyEyvrjQ+BNlZLtLvvaVTSh0pLay",
+ "q95Ak6pryMVK0zsdqanRGNY8xBOurnb4/oOR4wrkuT/8mhJ++9Mp5j9fCqWnI3M0tcv7hR/N+UAXFoI7",
+ "XErJzjF34ofL/xcAAP//K/9iFjLyAAA=",
}
// GetSwagger returns the Swagger specification corresponding to the generated code
diff --git a/daemon/algod/api/server/v2/generated/types.go b/daemon/algod/api/server/v2/generated/types.go
index 41d33126d..6e1343a7c 100644
--- a/daemon/algod/api/server/v2/generated/types.go
+++ b/daemon/algod/api/server/v2/generated/types.go
@@ -640,7 +640,7 @@ type PendingTransactionsResponse struct {
// PostParticipationResponse defines model for PostParticipationResponse.
type PostParticipationResponse struct {
- // encoding of the participation id.
+ // encoding of the participation ID.
PartId string `json:"partId"`
}
diff --git a/daemon/algod/api/server/v2/handlers.go b/daemon/algod/api/server/v2/handlers.go
index 6541311a3..da20f66fa 100644
--- a/daemon/algod/api/server/v2/handlers.go
+++ b/daemon/algod/api/server/v2/handlers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -73,6 +73,7 @@ type NodeInterface interface {
ListParticipationKeys() ([]account.ParticipationRecord, error)
GetParticipationKey(account.ParticipationID) (account.ParticipationRecord, error)
RemoveParticipationKey(account.ParticipationID) error
+ AppendParticipationKeys(id account.ParticipationID, keys account.StateProofKeys) error
}
func roundToPtrOrNil(value basics.Round) *uint64 {
@@ -140,7 +141,6 @@ func (v2 *Handlers) GetParticipationKeys(ctx echo.Context) error {
// AddParticipationKey Add a participation key to the node
// (POST /v2/participation)
func (v2 *Handlers) AddParticipationKey(ctx echo.Context) error {
-
buf := new(bytes.Buffer)
_, err := buf.ReadFrom(ctx.Request().Body)
if err != nil {
@@ -212,6 +212,33 @@ func (v2 *Handlers) GetParticipationKeyByID(ctx echo.Context, participationID st
return ctx.JSON(http.StatusOK, response)
}
+// AppendKeys Append state proof keys to a participation key
+// (POST /v2/participation/{participation-id})
+func (v2 *Handlers) AppendKeys(ctx echo.Context, participationID string) error {
+ decodedParticipationID, err := account.ParseParticipationID(participationID)
+ if err != nil {
+ return badRequest(ctx, err, err.Error(), v2.Log)
+ }
+
+ var keys account.StateProofKeys
+ dec := protocol.NewDecoder(ctx.Request().Body)
+ err = dec.Decode(&keys)
+ if err != nil {
+ err = fmt.Errorf("unable to parse keys from body: %w", err)
+ return badRequest(ctx, err, err.Error(), v2.Log)
+ }
+ if len(keys) == 0 {
+ err = errors.New("empty request, please attach keys to request body")
+ return badRequest(ctx, err, err.Error(), v2.Log)
+ }
+
+ err = v2.Node.AppendParticipationKeys(decodedParticipationID, keys)
+ if err != nil {
+ return internalError(ctx, err, err.Error(), v2.Log)
+ }
+ return nil
+}
+
// ShutdownNode shuts down the node.
// (POST /v2/shutdown)
func (v2 *Handlers) ShutdownNode(ctx echo.Context, params private.ShutdownNodeParams) error {
diff --git a/daemon/algod/api/server/v2/test/handlers_test.go b/daemon/algod/api/server/v2/test/handlers_test.go
index e80ca258d..0b416eaa5 100644
--- a/daemon/algod/api/server/v2/test/handlers_test.go
+++ b/daemon/algod/api/server/v2/test/handlers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -522,7 +522,7 @@ func tealCompileTest(t *testing.T, bytesToUse []byte, expectedCode int, enableDe
mockNode := makeMockNode(mockLedger, t.Name(), nil)
mockNode.config.EnableDeveloperAPI = enableDeveloperAPI
handler := v2.Handlers{
- Node: &mockNode,
+ Node: mockNode,
Log: logging.Base(),
Shutdown: dummyShutdownChan,
}
@@ -562,7 +562,7 @@ func tealDryrunTest(
mockNode := makeMockNode(mockLedger, t.Name(), nil)
mockNode.config.EnableDeveloperAPI = enableDeveloperAPI
handler := v2.Handlers{
- Node: &mockNode,
+ Node: mockNode,
Log: logging.Base(),
Shutdown: dummyShutdownChan,
}
@@ -672,3 +672,110 @@ func TestTealDryrun(t *testing.T) {
tealDryrunTest(t, &gdr, "msgp", 200, "REJECT", true)
tealDryrunTest(t, &gdr, "json", 404, "", false)
}
+
+func TestAppendParticipationKeys(t *testing.T) {
+ partitiontest.PartitionTest(t)
+
+ mockLedger, _, _, _, releasefunc := testingenv(t, 1, 1, true)
+ defer releasefunc()
+ mockNode := makeMockNode(mockLedger, t.Name(), nil)
+ handler := v2.Handlers{
+ Node: mockNode,
+ Log: logging.Base(),
+ Shutdown: make(chan struct{}),
+ }
+
+ id := account.ParticipationID{}
+ id[0] = 10
+
+ t.Run("Happy path", func(t *testing.T) {
+ // Create test object to append.
+ keys := make(account.StateProofKeys)
+ keys[100] = []byte{100}
+ keys[101] = []byte{101}
+ keyBytes := protocol.Encode(keys)
+
+ // Put keys in the body.
+ e := echo.New()
+ req := httptest.NewRequest(http.MethodPost, "/", bytes.NewReader(keyBytes))
+ rec := httptest.NewRecorder()
+ c := e.NewContext(req, rec)
+
+ // Call handler with request.
+ err := handler.AppendKeys(c, id.String())
+
+ // Verify that request was properly received and deserialized.
+ require.NoError(t, err)
+ require.Equal(t, http.StatusOK, rec.Code)
+ require.Equal(t, id, mockNode.id)
+ require.Len(t, mockNode.keys, 2)
+ require.Equal(t, mockNode.keys[100], keys[100])
+ require.Equal(t, mockNode.keys[101], keys[101])
+ })
+
+ t.Run("Invalid body", func(t *testing.T) {
+ // Create request with bogus bytes in the body
+ e := echo.New()
+ req := httptest.NewRequest(http.MethodPost, "/", bytes.NewReader([]byte{0x99, 0x88, 0x77}))
+ rec := httptest.NewRecorder()
+ c := e.NewContext(req, rec)
+
+ // Call handler with request.
+ err := handler.AppendKeys(c, id.String())
+
+ // Verify that request was properly received and deserialized.
+ require.NoError(t, err)
+ require.Equal(t, http.StatusBadRequest, rec.Code)
+ require.Contains(t, rec.Body.String(), "unable to parse keys from body: msgpack decode error")
+ })
+
+ t.Run("Empty body", func(t *testing.T) {
+ // Create test object with no keys to append.
+ keys := make(account.StateProofKeys)
+ keyBytes := protocol.Encode(keys)
+
+ // Put keys in the body.
+ e := echo.New()
+ req := httptest.NewRequest(http.MethodPost, "/", bytes.NewReader(keyBytes))
+ rec := httptest.NewRecorder()
+ c := e.NewContext(req, rec)
+
+ // Call handler with request.
+ err := handler.AppendKeys(c, id.String())
+
+ // Verify that request was properly received and deserialized.
+ require.NoError(t, err)
+ require.Equal(t, http.StatusBadRequest, rec.Code)
+ require.Contains(t, rec.Body.String(), "empty request, please attach keys to request body")
+ })
+
+ t.Run("Internal error", func(t *testing.T) {
+ // Create mock node with an error.
+ expectedErr := errors.New("expected error")
+ mockNode := makeMockNode(mockLedger, t.Name(), expectedErr)
+ handler := v2.Handlers{
+ Node: mockNode,
+ Log: logging.Base(),
+ Shutdown: make(chan struct{}),
+ }
+
+ keys := make(account.StateProofKeys)
+ keys[100] = []byte{100}
+ keys[101] = []byte{101}
+ keyBytes := protocol.Encode(keys)
+
+ // Put keys in the body.
+ e := echo.New()
+ req := httptest.NewRequest(http.MethodPost, "/", bytes.NewReader(keyBytes))
+ rec := httptest.NewRecorder()
+ c := e.NewContext(req, rec)
+
+ // Call handler with request.
+ err := handler.AppendKeys(c, id.String())
+
+ // Verify that request was properly received and deserialized.
+ require.NoError(t, err)
+ require.Equal(t, http.StatusInternalServerError, rec.Code)
+ require.Contains(t, rec.Body.String(), expectedErr.Error())
+ })
+}
diff --git a/daemon/algod/api/server/v2/test/helpers.go b/daemon/algod/api/server/v2/test/helpers.go
index dda735783..bd5768fe1 100644
--- a/daemon/algod/api/server/v2/test/helpers.go
+++ b/daemon/algod/api/server/v2/test/helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -85,6 +85,8 @@ type mockNode struct {
genesisID string
config config.Local
err error
+ id account.ParticipationID
+ keys account.StateProofKeys
}
func (m mockNode) InstallParticipationKey(partKeyBinary []byte) (account.ParticipationID, error) {
@@ -103,8 +105,14 @@ func (m mockNode) RemoveParticipationKey(id account.ParticipationID) error {
panic("implement me")
}
-func makeMockNode(ledger *data.Ledger, genesisID string, nodeError error) mockNode {
- return mockNode{
+func (m *mockNode) AppendParticipationKeys(id account.ParticipationID, keys account.StateProofKeys) error {
+ m.id = id
+ m.keys = keys
+ return m.err
+}
+
+func makeMockNode(ledger *data.Ledger, genesisID string, nodeError error) *mockNode {
+ return &mockNode{
ledger: ledger,
genesisID: genesisID,
config: config.GetDefaultLocal(),
diff --git a/daemon/algod/api/server/v2/utils.go b/daemon/algod/api/server/v2/utils.go
index 6498c575c..9a9498ba3 100644
--- a/daemon/algod/api/server/v2/utils.go
+++ b/daemon/algod/api/server/v2/utils.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/spec/common/model.go b/daemon/algod/api/spec/common/model.go
index ec9bc6697..66741a65b 100644
--- a/daemon/algod/api/spec/common/model.go
+++ b/daemon/algod/api/spec/common/model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/api/spec/v1/model.go b/daemon/algod/api/spec/v1/model.go
index b7dabab64..96fc0ee05 100644
--- a/daemon/algod/api/spec/v1/model.go
+++ b/daemon/algod/api/spec/v1/model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/deadlockLogger.go b/daemon/algod/deadlockLogger.go
index ed5139592..8ae3cfe02 100644
--- a/daemon/algod/deadlockLogger.go
+++ b/daemon/algod/deadlockLogger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/deadlock_test.go b/daemon/algod/deadlock_test.go
index 1df1594e0..b3a7b24de 100644
--- a/daemon/algod/deadlock_test.go
+++ b/daemon/algod/deadlock_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/algod/server.go b/daemon/algod/server.go
index 1eedac466..a3875f05e 100644
--- a/daemon/algod/server.go
+++ b/daemon/algod/server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -18,6 +18,7 @@ package algod
import (
"context"
+ "errors"
"fmt"
"io/ioutil"
"net"
@@ -35,10 +36,13 @@ import (
"github.com/algorand/go-algorand/config"
apiServer "github.com/algorand/go-algorand/daemon/algod/api/server"
"github.com/algorand/go-algorand/daemon/algod/api/server/lib"
+ "github.com/algorand/go-algorand/data/basics"
"github.com/algorand/go-algorand/data/bookkeeping"
"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-algorand/logging/telemetryspec"
+ "github.com/algorand/go-algorand/network/limitlistener"
"github.com/algorand/go-algorand/node"
+ "github.com/algorand/go-algorand/util"
"github.com/algorand/go-algorand/util/metrics"
"github.com/algorand/go-algorand/util/tokens"
)
@@ -84,6 +88,34 @@ func (s *Server) Initialize(cfg config.Local, phonebookAddresses []string, genes
s.log.SetLevel(logging.Level(cfg.BaseLoggerDebugLevel))
setupDeadlockLogger()
+ // Check some config parameters.
+ if cfg.RestConnectionsSoftLimit > cfg.RestConnectionsHardLimit {
+ s.log.Warnf(
+ "RestConnectionsSoftLimit %d exceeds RestConnectionsHardLimit %d",
+ cfg.RestConnectionsSoftLimit, cfg.RestConnectionsHardLimit)
+ cfg.RestConnectionsSoftLimit = cfg.RestConnectionsHardLimit
+ }
+ if cfg.IncomingConnectionsLimit < 0 {
+ return fmt.Errorf(
+ "Initialize() IncomingConnectionsLimit %d must be non-negative",
+ cfg.IncomingConnectionsLimit)
+ }
+
+ // Set large enough soft file descriptors limit.
+ var ot basics.OverflowTracker
+ fdRequired := ot.Add(
+ cfg.ReservedFDs,
+ ot.Add(uint64(cfg.IncomingConnectionsLimit), cfg.RestConnectionsHardLimit))
+ if ot.Overflowed {
+ return errors.New(
+ "Initialize() overflowed when adding up ReservedFDs, IncomingConnectionsLimit " +
+ "RestConnectionsHardLimit; decrease them")
+ }
+ err = util.SetFdSoftLimit(fdRequired)
+ if err != nil {
+ return fmt.Errorf("Initialize() err: %w", err)
+ }
+
// configure the deadlock detector library
switch {
case cfg.DeadlockDetection > 0:
@@ -98,6 +130,9 @@ func (s *Server) Initialize(cfg config.Local, phonebookAddresses []string, genes
// Default setting - host app should configure this
// If host doesn't, the default is Disable = false (so, enabled)
}
+ if !deadlock.Opts.Disable {
+ deadlock.Opts.DeadlockTimeout = time.Second * time.Duration(cfg.DeadlockDetectionThreshold)
+ }
// if we have the telemetry enabled, we want to use it's sessionid as part of the
// collected metrics decorations.
@@ -189,11 +224,12 @@ func (s *Server) Start() {
}
listener, err := makeListener(addr)
-
if err != nil {
fmt.Printf("Could not start node: %v\n", err)
os.Exit(1)
}
+ listener = limitlistener.RejectingLimitListener(
+ listener, cfg.RestConnectionsHardLimit, s.log)
addr = listener.Addr().String()
server = http.Server{
@@ -202,9 +238,9 @@ func (s *Server) Start() {
WriteTimeout: time.Duration(cfg.RestWriteTimeoutSeconds) * time.Second,
}
- tcpListener := listener.(*net.TCPListener)
-
- e := apiServer.NewRouter(s.log, s.node, s.stopping, apiToken, adminAPIToken, tcpListener)
+ e := apiServer.NewRouter(
+ s.log, s.node, s.stopping, apiToken, adminAPIToken, listener,
+ cfg.RestConnectionsSoftLimit)
// Set up files for our PID and our listening address
// before beginning to listen to prevent 'goal node start'
diff --git a/daemon/algod/server_test.go b/daemon/algod/server_test.go
index d4a6a26ee..145a6e9b6 100644
--- a/daemon/algod/server_test.go
+++ b/daemon/algod/server_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/api/api.go b/daemon/kmd/api/api.go
index d72521e81..182eb19c3 100644
--- a/daemon/kmd/api/api.go
+++ b/daemon/kmd/api/api.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/api/cors.go b/daemon/kmd/api/cors.go
index 4a77e5333..89f9bcd89 100644
--- a/daemon/kmd/api/cors.go
+++ b/daemon/kmd/api/cors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/api/v1/auth.go b/daemon/kmd/api/v1/auth.go
index bc7dda1ef..35e73aadb 100644
--- a/daemon/kmd/api/v1/auth.go
+++ b/daemon/kmd/api/v1/auth.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/api/v1/errors.go b/daemon/kmd/api/v1/errors.go
index f6855ed58..9193ea291 100644
--- a/daemon/kmd/api/v1/errors.go
+++ b/daemon/kmd/api/v1/errors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/api/v1/handlers.go b/daemon/kmd/api/v1/handlers.go
index a076ca18f..199f1443d 100644
--- a/daemon/kmd/api/v1/handlers.go
+++ b/daemon/kmd/api/v1/handlers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/client/client.go b/daemon/kmd/client/client.go
index 551884c97..ee0c5f131 100644
--- a/daemon/kmd/client/client.go
+++ b/daemon/kmd/client/client.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/client/requests.go b/daemon/kmd/client/requests.go
index 01a931331..78da5b4c5 100644
--- a/daemon/kmd/client/requests.go
+++ b/daemon/kmd/client/requests.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/client/wrappers.go b/daemon/kmd/client/wrappers.go
index c63d7d9a9..f3392850c 100644
--- a/daemon/kmd/client/wrappers.go
+++ b/daemon/kmd/client/wrappers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/config/config.go b/daemon/kmd/config/config.go
index 39827f2c7..9b932d216 100644
--- a/daemon/kmd/config/config.go
+++ b/daemon/kmd/config/config.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/config/errors.go b/daemon/kmd/config/errors.go
index 967b348b9..75800791b 100644
--- a/daemon/kmd/config/errors.go
+++ b/daemon/kmd/config/errors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/kmd.go b/daemon/kmd/kmd.go
index a72478855..b46fb6beb 100644
--- a/daemon/kmd/kmd.go
+++ b/daemon/kmd/kmd.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/lib/kmdapi/common.go b/daemon/kmd/lib/kmdapi/common.go
index 533a60646..58aa755c0 100644
--- a/daemon/kmd/lib/kmdapi/common.go
+++ b/daemon/kmd/lib/kmdapi/common.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/lib/kmdapi/requests.go b/daemon/kmd/lib/kmdapi/requests.go
index c9a3f94ec..860d3c4f5 100644
--- a/daemon/kmd/lib/kmdapi/requests.go
+++ b/daemon/kmd/lib/kmdapi/requests.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/lib/kmdapi/responses.go b/daemon/kmd/lib/kmdapi/responses.go
index 464bc7dde..f404e843e 100644
--- a/daemon/kmd/lib/kmdapi/responses.go
+++ b/daemon/kmd/lib/kmdapi/responses.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/server/errors.go b/daemon/kmd/server/errors.go
index baebe831a..86396e489 100644
--- a/daemon/kmd/server/errors.go
+++ b/daemon/kmd/server/errors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/server/server.go b/daemon/kmd/server/server.go
index 4ce8e2257..973df186b 100644
--- a/daemon/kmd/server/server.go
+++ b/daemon/kmd/server/server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/session/auth.go b/daemon/kmd/session/auth.go
index 3b7cae871..3ea9d990f 100644
--- a/daemon/kmd/session/auth.go
+++ b/daemon/kmd/session/auth.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/session/session.go b/daemon/kmd/session/session.go
index 291e90486..f1a8b0a52 100644
--- a/daemon/kmd/session/session.go
+++ b/daemon/kmd/session/session.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/wallet/driver/driver.go b/daemon/kmd/wallet/driver/driver.go
index d084dd855..f549d128d 100644
--- a/daemon/kmd/wallet/driver/driver.go
+++ b/daemon/kmd/wallet/driver/driver.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/wallet/driver/ledger.go b/daemon/kmd/wallet/driver/ledger.go
index 7affe3a5c..36029d370 100644
--- a/daemon/kmd/wallet/driver/ledger.go
+++ b/daemon/kmd/wallet/driver/ledger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/wallet/driver/ledger_errors.go b/daemon/kmd/wallet/driver/ledger_errors.go
index 53dff311c..420859c83 100644
--- a/daemon/kmd/wallet/driver/ledger_errors.go
+++ b/daemon/kmd/wallet/driver/ledger_errors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/wallet/driver/ledger_hid.go b/daemon/kmd/wallet/driver/ledger_hid.go
index 8094df50b..32e3d8321 100644
--- a/daemon/kmd/wallet/driver/ledger_hid.go
+++ b/daemon/kmd/wallet/driver/ledger_hid.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/wallet/driver/sqlite.go b/daemon/kmd/wallet/driver/sqlite.go
index 960c65374..eb78f4a77 100644
--- a/daemon/kmd/wallet/driver/sqlite.go
+++ b/daemon/kmd/wallet/driver/sqlite.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/wallet/driver/sqlite_crypto.go b/daemon/kmd/wallet/driver/sqlite_crypto.go
index 4f5f5e004..5cca480c9 100644
--- a/daemon/kmd/wallet/driver/sqlite_crypto.go
+++ b/daemon/kmd/wallet/driver/sqlite_crypto.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/wallet/driver/sqlite_errors.go b/daemon/kmd/wallet/driver/sqlite_errors.go
index 570c0b573..bcfb00fda 100644
--- a/daemon/kmd/wallet/driver/sqlite_errors.go
+++ b/daemon/kmd/wallet/driver/sqlite_errors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/wallet/driver/util.go b/daemon/kmd/wallet/driver/util.go
index 1e501ce31..2701242e3 100644
--- a/daemon/kmd/wallet/driver/util.go
+++ b/daemon/kmd/wallet/driver/util.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/daemon/kmd/wallet/wallet.go b/daemon/kmd/wallet/wallet.go
index 24c60066c..d83770f5d 100644
--- a/daemon/kmd/wallet/wallet.go
+++ b/daemon/kmd/wallet/wallet.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/abi/abi_encode.go b/data/abi/abi_encode.go
index c2b7a2480..1f14af71a 100644
--- a/data/abi/abi_encode.go
+++ b/data/abi/abi_encode.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -18,6 +18,7 @@ package abi
import (
"encoding/binary"
+ "encoding/json"
"fmt"
"math/big"
"reflect"
@@ -478,6 +479,16 @@ func decodeTuple(encoded []byte, childT []Type) ([]interface{}, error) {
return values, nil
}
+// maxAppArgs is the maximum number of arguments for an application call transaction, in compliance
+// with ARC-4. Currently this is the same as the MaxAppArgs consensus parameter, but the
+// difference is that the consensus parameter is liable to change in a future consensus upgrade.
+// However, the ARC-4 ABI argument encoding **MUST** always remain the same.
+const maxAppArgs = 16
+
+// The tuple threshold is maxAppArgs, minus 1 for the method selector in the first app arg,
+// minus 1 for the final app argument becoming a tuple of the remaining method args
+const methodArgsTupleThreshold = maxAppArgs - 2
+
// ParseArgJSONtoByteSlice convert input method arguments to ABI encoded bytes
// it converts funcArgTypes into a tuple type and apply changes over input argument string (in JSON format)
// if there are greater or equal to 15 inputs, then we compact the tailing inputs into one tuple
@@ -495,16 +506,32 @@ func ParseArgJSONtoByteSlice(argTypes []string, jsonArgs []string, applicationAr
return fmt.Errorf("input argument number %d != method argument number %d", len(jsonArgs), len(abiTypes))
}
- // change the input args to be 1 - 14 + 15 (compacting everything together)
- if len(jsonArgs) > 14 {
- compactedType, err := MakeTupleType(abiTypes[14:])
+ // Up to 16 app arguments can be passed to app call. First is reserved for method selector,
+ // and the rest are for method call arguments. But if more than 15 method call arguments
+ // are present, then the method arguments after the 14th are placed in a tuple in the last
+ // app argument slot
+ if len(abiTypes) > maxAppArgs-1 {
+ typesForTuple := make([]Type, len(abiTypes)-methodArgsTupleThreshold)
+ copy(typesForTuple, abiTypes[methodArgsTupleThreshold:])
+
+ compactedType, err := MakeTupleType(typesForTuple)
+ if err != nil {
+ return err
+ }
+
+ abiTypes = append(abiTypes[:methodArgsTupleThreshold], compactedType)
+
+ tupleValues := make([]json.RawMessage, len(jsonArgs)-methodArgsTupleThreshold)
+ for i, jsonArg := range jsonArgs[methodArgsTupleThreshold:] {
+ tupleValues[i] = []byte(jsonArg)
+ }
+
+ remainingJSON, err := json.Marshal(tupleValues)
if err != nil {
return err
}
- abiTypes = append(abiTypes[:14], compactedType)
- remainingJSON := "[" + strings.Join(jsonArgs[14:], ",") + "]"
- jsonArgs = append(jsonArgs[:14], remainingJSON)
+ jsonArgs = append(jsonArgs[:methodArgsTupleThreshold], string(remainingJSON))
}
// parse JSON value to ABI encoded bytes
@@ -523,7 +550,7 @@ func ParseArgJSONtoByteSlice(argTypes []string, jsonArgs []string, applicationAr
}
// ParseMethodSignature parses a method of format `method(argType1,argType2,...)retType`
-// into `method` {`argType1`,`argType2`,..} and `retType`
+// into `method` {`argType1`,`argType2`,...} and `retType`
func ParseMethodSignature(methodSig string) (name string, argTypes []string, returnType string, err error) {
argsStart := strings.Index(methodSig, "(")
if argsStart == -1 {
diff --git a/data/abi/abi_encode_test.go b/data/abi/abi_encode_test.go
index a86fe46b9..64296680b 100644
--- a/data/abi/abi_encode_test.go
+++ b/data/abi/abi_encode_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -19,6 +19,7 @@ package abi
import (
"crypto/rand"
"encoding/binary"
+ "fmt"
"math/big"
"testing"
@@ -27,17 +28,58 @@ import (
"github.com/stretchr/testify/require"
)
+const (
+ UintStepLength = 8
+ UintBegin = 8
+ UintEnd = 512
+ UintRandomTestPoints = 1000
+ UintTestCaseCount = 200
+ UfixedPrecision = 160
+ UfixedRandomTestPoints = 20
+ TupleMaxLength = 10
+ ByteTestCaseCount = 1 << 8
+ BoolTestCaseCount = 2
+ AddressTestCaseCount = 300
+ StringTestCaseCount = 10
+ StringTestCaseSpecLenCount = 5
+ TakeNum = 10
+ TupleTestCaseCount = 100
+)
+
+/*
+ The set of parameters ensure that the error of byte length >= 2^16 is eliminated.
+
+ i. Consider uint512[] with length 10, the ABI encoding length is: 64 x 10 + 2
+ (2 is introduced from dynamic array length encoding)
+ The motivation here is that, forall ABI type that is non-array/non-tuple like,
+ uint512 gives the longest byte length in ABI encoding
+ (utf-8 string's byte length is at most 42, address byte length is at most 32)
+
+ ii. Consider a tuple of length 10, with all elements uint512[] of length 10.
+ The ABI encoding length is: 10 x 2 + 10 x 642 == 6440
+ (2 is for tuple index to keep track of dynamic type encoding)
+
+ iii. Consider a tuple of length 10, with all elements of tuples mentioned in (ii).
+ The ABI encoding length is: 10 x 2 + 10 x 6440 == 64420
+ This is the end of the generation of nested-tuple test case,
+ no more layers of random tuples will be produced.
+
+ This gives an upper bound for the produced ABI encoding byte length in this test script,
+ and noticing that length 64420 mentioned in (iii) is less than 2^16 == 65536.
+ Assuming that ABI implementation is correct, then the flaky test should not happen again.
+*/
+
func TestEncodeValid(t *testing.T) {
partitiontest.PartitionTest(t)
// encoding test for uint type, iterating through all uint sizes
// randomly pick 1000 valid uint values and check if encoded value match with expected
- for intSize := 8; intSize <= 512; intSize += 8 {
+ for intSize := UintBegin; intSize <= UintEnd; intSize += UintStepLength {
upperLimit := big.NewInt(0).Lsh(big.NewInt(1), uint(intSize))
uintType, err := makeUintType(intSize)
require.NoError(t, err, "make uint type fail")
- for i := 0; i < 1000; i++ {
+ for i := 0; i < UintRandomTestPoints; i++ {
randomInt, err := rand.Int(rand.Reader, upperLimit)
require.NoError(t, err, "cryptographic random int init fail")
@@ -64,17 +106,17 @@ func TestEncodeValid(t *testing.T) {
// encoding test for ufixed, iterating through all the valid ufixed bitSize and precision
// randomly generate 10 big int values for ufixed numerator and check if encoded value match with expected
// also check if ufixed can fit max numerator (2^bitSize - 1) under specific byte bitSize
- for size := 8; size <= 512; size += 8 {
+ for size := UintBegin; size <= UintEnd; size += UintStepLength {
upperLimit := big.NewInt(0).Lsh(big.NewInt(1), uint(size))
largest := big.NewInt(0).Add(
upperLimit,
big.NewInt(1).Neg(big.NewInt(1)),
)
- for precision := 1; precision <= 160; precision++ {
+ for precision := 1; precision <= UfixedPrecision; precision++ {
typeUfixed, err := makeUfixedType(size, precision)
require.NoError(t, err, "make ufixed type fail")
- for i := 0; i < 10; i++ {
+ for i := 0; i < UfixedRandomTestPoints; i++ {
randomInt, err := rand.Int(rand.Reader, upperLimit)
require.NoError(t, err, "cryptographic random int init fail")
@@ -96,13 +138,13 @@ func TestEncodeValid(t *testing.T) {
// encoding test for address, since address is 32 byte, it can be considered as 256 bit uint
// randomly generate 1000 uint256 and make address values, check if encoded value match with expected
- upperLimit := big.NewInt(0).Lsh(big.NewInt(1), 256)
- for i := 0; i < 1000; i++ {
+ upperLimit := big.NewInt(0).Lsh(big.NewInt(1), addressByteSize<<3)
+ for i := 0; i < UintRandomTestPoints; i++ {
randomAddrInt, err := rand.Int(rand.Reader, upperLimit)
require.NoError(t, err, "cryptographic random int init fail")
rand256Bytes := randomAddrInt.Bytes()
- addrBytesExpected := make([]byte, 32-len(rand256Bytes))
+ addrBytesExpected := make([]byte, addressByteSize-len(rand256Bytes))
addrBytesExpected = append(addrBytesExpected, rand256Bytes...)
addrBytesActual, err := addressType.Encode(addrBytesExpected)
@@ -111,7 +153,7 @@ func TestEncodeValid(t *testing.T) {
}
// encoding test for bool values
- for i := 0; i < 2; i++ {
+ for i := 0; i < BoolTestCaseCount; i++ {
boolEncode, err := boolType.Encode(i == 1)
require.NoError(t, err, "bool encode fail")
expected := []byte{0x00}
@@ -122,7 +164,7 @@ func TestEncodeValid(t *testing.T) {
}
// encoding test for byte values
- for i := 0; i < (1 << 8); i++ {
+ for i := 0; i < ByteTestCaseCount; i++ {
byteEncode, err := byteType.Encode(byte(i))
require.NoError(t, err, "byte encode fail")
expected := []byte{byte(i)}
@@ -133,8 +175,8 @@ func TestEncodeValid(t *testing.T) {
// we use `gobberish` to generate random utf-8 symbols
// randomly generate utf-8 str from length 1 to 100, each length draw 10 random strs
// check if encoded ABI str match with expected value
- for length := 1; length <= 100; length++ {
- for i := 0; i < 10; i++ {
+ for length := 1; length <= StringTestCaseCount; length++ {
+ for i := 0; i < StringTestCaseSpecLenCount; i++ {
// generate utf8 strings from `gobberish` at some length
utf8Str := gobberish.GenerateString(length)
// since string is just type alias of `byte[]`, we need to store number of bytes in encoding
@@ -828,35 +870,48 @@ type testUnit struct {
func categorySelfRoundTripTest(t *testing.T, category []testUnit) {
for _, testObj := range category {
abiType, err := TypeOf(testObj.serializedType)
- require.NoError(t, err, "failure to deserialize type")
+ require.NoError(t, err, "failure to deserialize type: "+testObj.serializedType)
encodedValue, err := abiType.Encode(testObj.value)
- require.NoError(t, err, "failure to encode value")
+ require.NoError(t, err,
+ "failure to encode value %#v over type %s", testObj.value, testObj.serializedType,
+ )
actual, err := abiType.Decode(encodedValue)
- require.NoError(t, err, "failure to decode value")
- require.Equal(t, testObj.value, actual, "decoded value not equal to expected")
+ require.NoError(t, err,
+ "failure to decode value %#v for type %s", encodedValue, testObj.serializedType,
+ )
+ require.Equal(t, testObj.value, actual,
+ "decoded value %#v not equal to expected value %#v", actual, testObj.value,
+ )
jsonEncodedValue, err := abiType.MarshalToJSON(testObj.value)
- require.NoError(t, err, "failure to encode value to JSON type")
+ require.NoError(t, err,
+ "failure to encode value %#v to JSON type", testObj.value,
+ )
jsonActual, err := abiType.UnmarshalFromJSON(jsonEncodedValue)
- require.NoError(t, err, "failure to decode JSON value back")
- require.Equal(t, testObj.value, jsonActual, "decode JSON value not equal to expected")
+ require.NoError(t, err,
+ "failure to decode JSON value %s back for type %s",
+ string(jsonEncodedValue), testObj.serializedType,
+ )
+ require.Equal(t, testObj.value, jsonActual,
+ "decode JSON value %s not equal to expected %s", jsonActual, testObj.value,
+ )
}
}
func addPrimitiveRandomValues(t *testing.T, pool *map[BaseType][]testUnit) {
- (*pool)[Uint] = make([]testUnit, 200*64)
- (*pool)[Ufixed] = make([]testUnit, 160*64)
+ (*pool)[Uint] = make([]testUnit, UintTestCaseCount*UintEnd/UintStepLength)
+ (*pool)[Ufixed] = make([]testUnit, UfixedPrecision*UintEnd/UintStepLength)
uintIndex := 0
ufixedIndex := 0
- for bitSize := 8; bitSize <= 512; bitSize += 8 {
+ for bitSize := UintBegin; bitSize <= UintEnd; bitSize += UintStepLength {
max := new(big.Int).Lsh(big.NewInt(1), uint(bitSize))
uintT, err := makeUintType(bitSize)
require.NoError(t, err, "make uint type failure")
uintTstr := uintT.String()
- for j := 0; j < 200; j++ {
+ for j := 0; j < UintTestCaseCount; j++ {
randVal, err := rand.Int(rand.Reader, max)
require.NoError(t, err, "generate random uint, should be no error")
@@ -867,7 +922,7 @@ func addPrimitiveRandomValues(t *testing.T, pool *map[BaseType][]testUnit) {
uintIndex++
}
- for precision := 1; precision <= 160; precision++ {
+ for precision := 1; precision <= UfixedPrecision; precision++ {
randVal, err := rand.Int(rand.Reader, max)
require.NoError(t, err, "generate random ufixed, should be no error")
@@ -884,33 +939,33 @@ func addPrimitiveRandomValues(t *testing.T, pool *map[BaseType][]testUnit) {
categorySelfRoundTripTest(t, (*pool)[Uint])
categorySelfRoundTripTest(t, (*pool)[Ufixed])
- (*pool)[Byte] = make([]testUnit, 1<<8)
- for i := 0; i < (1 << 8); i++ {
+ (*pool)[Byte] = make([]testUnit, ByteTestCaseCount)
+ for i := 0; i < ByteTestCaseCount; i++ {
(*pool)[Byte][i] = testUnit{serializedType: byteType.String(), value: byte(i)}
}
categorySelfRoundTripTest(t, (*pool)[Byte])
- (*pool)[Bool] = make([]testUnit, 2)
+ (*pool)[Bool] = make([]testUnit, BoolTestCaseCount)
(*pool)[Bool][0] = testUnit{serializedType: boolType.String(), value: false}
(*pool)[Bool][1] = testUnit{serializedType: boolType.String(), value: true}
categorySelfRoundTripTest(t, (*pool)[Bool])
- maxAddress := new(big.Int).Lsh(big.NewInt(1), 256)
- (*pool)[Address] = make([]testUnit, 300)
- for i := 0; i < 300; i++ {
+ maxAddress := new(big.Int).Lsh(big.NewInt(1), addressByteSize<<3)
+ (*pool)[Address] = make([]testUnit, AddressTestCaseCount)
+ for i := 0; i < AddressTestCaseCount; i++ {
randAddrVal, err := rand.Int(rand.Reader, maxAddress)
require.NoError(t, err, "generate random value for address, should be no error")
addrBytes := randAddrVal.Bytes()
- remainBytes := make([]byte, 32-len(addrBytes))
+ remainBytes := make([]byte, addressByteSize-len(addrBytes))
addrBytes = append(remainBytes, addrBytes...)
(*pool)[Address][i] = testUnit{serializedType: addressType.String(), value: addrBytes}
}
categorySelfRoundTripTest(t, (*pool)[Address])
- (*pool)[String] = make([]testUnit, 400)
+ (*pool)[String] = make([]testUnit, StringTestCaseCount*StringTestCaseSpecLenCount)
stringIndex := 0
- for length := 1; length <= 100; length++ {
- for i := 0; i < 4; i++ {
+ for length := 1; length <= StringTestCaseCount; length++ {
+ for i := 0; i < StringTestCaseSpecLenCount; i++ {
(*pool)[String][stringIndex] = testUnit{
serializedType: stringType.String(),
value: gobberish.GenerateString(length),
@@ -945,21 +1000,21 @@ func takeSomeFromCategoryAndGenerateArray(
}
func addArrayRandomValues(t *testing.T, pool *map[BaseType][]testUnit) {
- for intIndex := 0; intIndex < len((*pool)[Uint]); intIndex += 200 {
- takeSomeFromCategoryAndGenerateArray(t, Uint, intIndex, 20, pool)
+ for intIndex := 0; intIndex < len((*pool)[Uint]); intIndex += UintTestCaseCount {
+ takeSomeFromCategoryAndGenerateArray(t, Uint, intIndex, TakeNum, pool)
}
- takeSomeFromCategoryAndGenerateArray(t, Byte, 0, 20, pool)
- takeSomeFromCategoryAndGenerateArray(t, Address, 0, 20, pool)
- takeSomeFromCategoryAndGenerateArray(t, String, 0, 20, pool)
- takeSomeFromCategoryAndGenerateArray(t, Bool, 0, 20, pool)
+ takeSomeFromCategoryAndGenerateArray(t, Byte, 0, TakeNum, pool)
+ takeSomeFromCategoryAndGenerateArray(t, Address, 0, TakeNum, pool)
+ takeSomeFromCategoryAndGenerateArray(t, String, 0, TakeNum, pool)
+ takeSomeFromCategoryAndGenerateArray(t, Bool, 0, TakeNum, pool)
categorySelfRoundTripTest(t, (*pool)[ArrayStatic])
categorySelfRoundTripTest(t, (*pool)[ArrayDynamic])
}
func addTupleRandomValues(t *testing.T, slotRange BaseType, pool *map[BaseType][]testUnit) {
- for i := 0; i < 100; i++ {
- tupleLenBig, err := rand.Int(rand.Reader, big.NewInt(20))
+ for i := 0; i < TupleTestCaseCount; i++ {
+ tupleLenBig, err := rand.Int(rand.Reader, big.NewInt(TupleMaxLength))
require.NoError(t, err, "generate random tuple length should not return error")
tupleLen := tupleLenBig.Int64() + 1
testUnits := make([]testUnit, tupleLen)
@@ -1002,6 +1057,124 @@ func TestRandomABIEncodeDecodeRoundTrip(t *testing.T) {
categorySelfRoundTripTest(t, testValuePool[Tuple])
}
+func TestParseArgJSONtoByteSlice(t *testing.T) {
+ partitiontest.PartitionTest(t)
+
+ makeRepeatSlice := func(size int, value string) []string {
+ slice := make([]string, size)
+ for i := range slice {
+ slice[i] = value
+ }
+ return slice
+ }
+
+ tests := []struct {
+ argTypes []string
+ jsonArgs []string
+ expectedAppArgs [][]byte
+ }{
+ {
+ argTypes: []string{},
+ jsonArgs: []string{},
+ expectedAppArgs: [][]byte{},
+ },
+ {
+ argTypes: []string{"uint8"},
+ jsonArgs: []string{"100"},
+ expectedAppArgs: [][]byte{{100}},
+ },
+ {
+ argTypes: []string{"uint8", "uint16"},
+ jsonArgs: []string{"100", "65535"},
+ expectedAppArgs: [][]byte{{100}, {255, 255}},
+ },
+ {
+ argTypes: makeRepeatSlice(15, "string"),
+ jsonArgs: []string{
+ `"a"`,
+ `"b"`,
+ `"c"`,
+ `"d"`,
+ `"e"`,
+ `"f"`,
+ `"g"`,
+ `"h"`,
+ `"i"`,
+ `"j"`,
+ `"k"`,
+ `"l"`,
+ `"m"`,
+ `"n"`,
+ `"o"`,
+ },
+ expectedAppArgs: [][]byte{
+ {00, 01, 97},
+ {00, 01, 98},
+ {00, 01, 99},
+ {00, 01, 100},
+ {00, 01, 101},
+ {00, 01, 102},
+ {00, 01, 103},
+ {00, 01, 104},
+ {00, 01, 105},
+ {00, 01, 106},
+ {00, 01, 107},
+ {00, 01, 108},
+ {00, 01, 109},
+ {00, 01, 110},
+ {00, 01, 111},
+ },
+ },
+ {
+ argTypes: makeRepeatSlice(16, "string"),
+ jsonArgs: []string{
+ `"a"`,
+ `"b"`,
+ `"c"`,
+ `"d"`,
+ `"e"`,
+ `"f"`,
+ `"g"`,
+ `"h"`,
+ `"i"`,
+ `"j"`,
+ `"k"`,
+ `"l"`,
+ `"m"`,
+ `"n"`,
+ `"o"`,
+ `"p"`,
+ },
+ expectedAppArgs: [][]byte{
+ {00, 01, 97},
+ {00, 01, 98},
+ {00, 01, 99},
+ {00, 01, 100},
+ {00, 01, 101},
+ {00, 01, 102},
+ {00, 01, 103},
+ {00, 01, 104},
+ {00, 01, 105},
+ {00, 01, 106},
+ {00, 01, 107},
+ {00, 01, 108},
+ {00, 01, 109},
+ {00, 01, 110},
+ {00, 04, 00, 07, 00, 01, 111, 00, 01, 112},
+ },
+ },
+ }
+
+ for i, test := range tests {
+ t.Run(fmt.Sprintf("index=%d", i), func(t *testing.T) {
+ applicationArgs := [][]byte{}
+ err := ParseArgJSONtoByteSlice(test.argTypes, test.jsonArgs, &applicationArgs)
+ require.NoError(t, err)
+ require.Equal(t, test.expectedAppArgs, applicationArgs)
+ })
+ }
+}
+
func TestParseMethodSignature(t *testing.T) {
partitiontest.PartitionTest(t)
diff --git a/data/abi/abi_json.go b/data/abi/abi_json.go
index 482419e6b..a3177c4b2 100644
--- a/data/abi/abi_json.go
+++ b/data/abi/abi_json.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/abi/abi_json_test.go b/data/abi/abi_json_test.go
index d65e3c10a..b5290c9d5 100644
--- a/data/abi/abi_json_test.go
+++ b/data/abi/abi_json_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/abi/abi_type.go b/data/abi/abi_type.go
index 5a71ae3cc..0ff240950 100644
--- a/data/abi/abi_type.go
+++ b/data/abi/abi_type.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/abi/abi_type_test.go b/data/abi/abi_type_test.go
index f96dfaf06..fb7c7e902 100644
--- a/data/abi/abi_type_test.go
+++ b/data/abi/abi_type_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/account/account.go b/data/account/account.go
index f9cd26944..9d08eec25 100644
--- a/data/account/account.go
+++ b/data/account/account.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/account/msgp_gen.go b/data/account/msgp_gen.go
index 8f6a96fd7..b253f2122 100644
--- a/data/account/msgp_gen.go
+++ b/data/account/msgp_gen.go
@@ -3,6 +3,8 @@ package account
// Code generated by github.com/algorand/msgp DO NOT EDIT.
import (
+ "sort"
+
"github.com/algorand/msgp/msgp"
)
@@ -15,6 +17,22 @@ import (
// |-----> (*) Msgsize
// |-----> (*) MsgIsZero
//
+// StateProofKey
+// |-----> MarshalMsg
+// |-----> CanMarshalMsg
+// |-----> (*) UnmarshalMsg
+// |-----> (*) CanUnmarshalMsg
+// |-----> Msgsize
+// |-----> MsgIsZero
+//
+// StateProofKeys
+// |-----> MarshalMsg
+// |-----> CanMarshalMsg
+// |-----> (*) UnmarshalMsg
+// |-----> (*) CanUnmarshalMsg
+// |-----> Msgsize
+// |-----> MsgIsZero
+//
// MarshalMsg implements msgp.Marshaler
func (z *ParticipationKeyIdentity) MarshalMsg(b []byte) (o []byte) {
@@ -236,3 +254,145 @@ func (z *ParticipationKeyIdentity) Msgsize() (s int) {
func (z *ParticipationKeyIdentity) MsgIsZero() bool {
return ((*z).Parent.MsgIsZero()) && ((*z).VRFSK.MsgIsZero()) && ((*z).VoteID.MsgIsZero()) && ((*z).FirstValid.MsgIsZero()) && ((*z).LastValid.MsgIsZero()) && ((*z).KeyDilution == 0)
}
+
+// MarshalMsg implements msgp.Marshaler
+func (z StateProofKey) MarshalMsg(b []byte) (o []byte) {
+ o = msgp.Require(b, z.Msgsize())
+ o = msgp.AppendBytes(o, []byte(z))
+ return
+}
+
+func (_ StateProofKey) CanMarshalMsg(z interface{}) bool {
+ _, ok := (z).(StateProofKey)
+ if !ok {
+ _, ok = (z).(*StateProofKey)
+ }
+ return ok
+}
+
+// UnmarshalMsg implements msgp.Unmarshaler
+func (z *StateProofKey) UnmarshalMsg(bts []byte) (o []byte, err error) {
+ {
+ var zb0001 []byte
+ zb0001, bts, err = msgp.ReadBytesBytes(bts, []byte((*z)))
+ if err != nil {
+ err = msgp.WrapError(err)
+ return
+ }
+ (*z) = StateProofKey(zb0001)
+ }
+ o = bts
+ return
+}
+
+func (_ *StateProofKey) CanUnmarshalMsg(z interface{}) bool {
+ _, ok := (z).(*StateProofKey)
+ return ok
+}
+
+// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
+func (z StateProofKey) Msgsize() (s int) {
+ s = msgp.BytesPrefixSize + len([]byte(z))
+ return
+}
+
+// MsgIsZero returns whether this is a zero value
+func (z StateProofKey) MsgIsZero() bool {
+ return len(z) == 0
+}
+
+// MarshalMsg implements msgp.Marshaler
+func (z StateProofKeys) MarshalMsg(b []byte) (o []byte) {
+ o = msgp.Require(b, z.Msgsize())
+ if z == nil {
+ o = msgp.AppendNil(o)
+ } else {
+ o = msgp.AppendMapHeader(o, uint32(len(z)))
+ }
+ za0001_keys := make([]uint64, 0, len(z))
+ for za0001 := range z {
+ za0001_keys = append(za0001_keys, za0001)
+ }
+ sort.Sort(SortUint64(za0001_keys))
+ for _, za0001 := range za0001_keys {
+ za0002 := z[za0001]
+ _ = za0002
+ o = msgp.AppendUint64(o, za0001)
+ o = msgp.AppendBytes(o, []byte(za0002))
+ }
+ return
+}
+
+func (_ StateProofKeys) CanMarshalMsg(z interface{}) bool {
+ _, ok := (z).(StateProofKeys)
+ if !ok {
+ _, ok = (z).(*StateProofKeys)
+ }
+ return ok
+}
+
+// UnmarshalMsg implements msgp.Unmarshaler
+func (z *StateProofKeys) UnmarshalMsg(bts []byte) (o []byte, err error) {
+ var zb0003 int
+ var zb0004 bool
+ zb0003, zb0004, bts, err = msgp.ReadMapHeaderBytes(bts)
+ if err != nil {
+ err = msgp.WrapError(err)
+ return
+ }
+ if zb0003 > 1000 {
+ err = msgp.ErrOverflow(uint64(zb0003), uint64(1000))
+ err = msgp.WrapError(err)
+ return
+ }
+ if zb0004 {
+ (*z) = nil
+ } else if (*z) == nil {
+ (*z) = make(StateProofKeys, zb0003)
+ }
+ for zb0003 > 0 {
+ var zb0001 uint64
+ var zb0002 StateProofKey
+ zb0003--
+ zb0001, bts, err = msgp.ReadUint64Bytes(bts)
+ if err != nil {
+ err = msgp.WrapError(err)
+ return
+ }
+ {
+ var zb0005 []byte
+ zb0005, bts, err = msgp.ReadBytesBytes(bts, []byte(zb0002))
+ if err != nil {
+ err = msgp.WrapError(err, zb0001)
+ return
+ }
+ zb0002 = StateProofKey(zb0005)
+ }
+ (*z)[zb0001] = zb0002
+ }
+ o = bts
+ return
+}
+
+func (_ *StateProofKeys) CanUnmarshalMsg(z interface{}) bool {
+ _, ok := (z).(*StateProofKeys)
+ return ok
+}
+
+// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
+func (z StateProofKeys) Msgsize() (s int) {
+ s = msgp.MapHeaderSize
+ if z != nil {
+ for za0001, za0002 := range z {
+ _ = za0001
+ _ = za0002
+ s += 0 + msgp.Uint64Size + msgp.BytesPrefixSize + len([]byte(za0002))
+ }
+ }
+ return
+}
+
+// MsgIsZero returns whether this is a zero value
+func (z StateProofKeys) MsgIsZero() bool {
+ return len(z) == 0
+}
diff --git a/data/account/msgp_gen_test.go b/data/account/msgp_gen_test.go
index a8927e790..9bde0e5d8 100644
--- a/data/account/msgp_gen_test.go
+++ b/data/account/msgp_gen_test.go
@@ -71,3 +71,63 @@ func BenchmarkUnmarshalParticipationKeyIdentity(b *testing.B) {
}
}
}
+
+func TestMarshalUnmarshalStateProofKeys(t *testing.T) {
+ partitiontest.PartitionTest(t)
+ v := StateProofKeys{}
+ bts := v.MarshalMsg(nil)
+ left, err := v.UnmarshalMsg(bts)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if len(left) > 0 {
+ t.Errorf("%d bytes left over after UnmarshalMsg(): %q", len(left), left)
+ }
+
+ left, err = msgp.Skip(bts)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if len(left) > 0 {
+ t.Errorf("%d bytes left over after Skip(): %q", len(left), left)
+ }
+}
+
+func TestRandomizedEncodingStateProofKeys(t *testing.T) {
+ protocol.RunEncodingTest(t, &StateProofKeys{})
+}
+
+func BenchmarkMarshalMsgStateProofKeys(b *testing.B) {
+ v := StateProofKeys{}
+ b.ReportAllocs()
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ v.MarshalMsg(nil)
+ }
+}
+
+func BenchmarkAppendMsgStateProofKeys(b *testing.B) {
+ v := StateProofKeys{}
+ bts := make([]byte, 0, v.Msgsize())
+ bts = v.MarshalMsg(bts[0:0])
+ b.SetBytes(int64(len(bts)))
+ b.ReportAllocs()
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ bts = v.MarshalMsg(bts[0:0])
+ }
+}
+
+func BenchmarkUnmarshalStateProofKeys(b *testing.B) {
+ v := StateProofKeys{}
+ bts := v.MarshalMsg(nil)
+ b.ReportAllocs()
+ b.SetBytes(int64(len(bts)))
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ _, err := v.UnmarshalMsg(bts)
+ if err != nil {
+ b.Fatal(err)
+ }
+ }
+}
diff --git a/data/account/partInstall.go b/data/account/partInstall.go
index 1883f68aa..007d0501e 100644
--- a/data/account/partInstall.go
+++ b/data/account/partInstall.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/account/participation.go b/data/account/participation.go
index 474f6ca5e..8467fca0c 100644
--- a/data/account/participation.go
+++ b/data/account/participation.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/account/participationRegistry.go b/data/account/participationRegistry.go
index a4aa0629a..192abcbdb 100644
--- a/data/account/participationRegistry.go
+++ b/data/account/participationRegistry.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -82,16 +82,26 @@ type ParticipationRecord struct {
Voting *crypto.OneTimeSignatureSecrets
}
-// StateProofKey is a placeholder for the real state proof key type.
-// PKI TODO: Replace this with a real object.
-type StateProofKey []byte
+type (
+ // StateProofKey is a placeholder for the real state proof key type.
+ // PKI TODO: Replace this with a real object.
+ StateProofKey []byte
-// ParticipationRecordForRound adds in the per-round state proof key.
-type ParticipationRecordForRound struct {
- ParticipationRecord
+ // StateProofKeys are a map of StateProofKeys.
+ //msgp:allocbound StateProofKeys 1000
+ StateProofKeys map[uint64]StateProofKey
- StateProof StateProofKey
-}
+ // SortUint64 implements sorting by uint64 keys for
+ // canonical encoding of maps in msgpack format.
+ SortUint64 = basics.SortUint64
+
+ // ParticipationRecordForRound adds in the per-round state proof key.
+ ParticipationRecordForRound struct {
+ ParticipationRecord
+
+ StateProof StateProofKey
+ }
+)
// IsZero returns true if the object contains zero values.
func (r ParticipationRecordForRound) IsZero() bool {
@@ -178,7 +188,7 @@ type ParticipationRegistry interface {
// AppendKeys appends state proof keys to an existing Participation record. Keys can only be appended
// once, an error will occur when the data is flushed when inserting a duplicate key.
- AppendKeys(id ParticipationID, keys map[uint64]StateProofKey) error
+ AppendKeys(id ParticipationID, keys StateProofKeys) error
// Delete removes a record from storage.
Delete(id ParticipationID) error
@@ -363,7 +373,7 @@ type updatingParticipationRecord struct {
type partDBWriteRecord struct {
insertID ParticipationID
insert Participation
- keys map[uint64]StateProofKey
+ keys StateProofKeys
registerUpdated map[ParticipationID]updatingParticipationRecord
@@ -491,7 +501,7 @@ func (db *participationDB) insertInner(record Participation, id ParticipationID)
return err
}
-func (db *participationDB) appendKeysInner(id ParticipationID, keys map[uint64]StateProofKey) error {
+func (db *participationDB) appendKeysInner(id ParticipationID, keys StateProofKeys) error {
err := db.store.Wdb.Atomic(func(ctx context.Context, tx *sql.Tx) error {
// Fetch primary key
var pk int
@@ -690,7 +700,7 @@ func (db *participationDB) Insert(record Participation) (id ParticipationID, err
return
}
-func (db *participationDB) AppendKeys(id ParticipationID, keys map[uint64]StateProofKey) error {
+func (db *participationDB) AppendKeys(id ParticipationID, keys StateProofKeys) error {
db.mutex.Lock()
defer db.mutex.Unlock()
@@ -698,7 +708,7 @@ func (db *participationDB) AppendKeys(id ParticipationID, keys map[uint64]StateP
return ErrParticipationIDNotFound
}
- keyCopy := make(map[uint64]StateProofKey, len(keys))
+ keyCopy := make(StateProofKeys, len(keys))
for k, v := range keys {
keyCopy[k] = v // PKI TODO: Deep copy?
}
diff --git a/data/account/participationRegistryBench_test.go b/data/account/participationRegistryBench_test.go
index d1a97d400..6cf369118 100644
--- a/data/account/participationRegistryBench_test.go
+++ b/data/account/participationRegistryBench_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/account/participationRegistry_test.go b/data/account/participationRegistry_test.go
index e960317e7..842750fee 100644
--- a/data/account/participationRegistry_test.go
+++ b/data/account/participationRegistry_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/account/participation_test.go b/data/account/participation_test.go
index b92929b36..d18c97538 100644
--- a/data/account/participation_test.go
+++ b/data/account/participation_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/account/rootInstall.go b/data/account/rootInstall.go
index 7070712d9..4bf9a73e2 100644
--- a/data/account/rootInstall.go
+++ b/data/account/rootInstall.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/accountManager.go b/data/accountManager.go
index b615a211f..a32da0871 100644
--- a/data/accountManager.go
+++ b/data/accountManager.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/basics/address.go b/data/basics/address.go
index 835832b38..412b7bf75 100644
--- a/data/basics/address.go
+++ b/data/basics/address.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/basics/address_test.go b/data/basics/address_test.go
index f99f3392d..eac7f09e5 100644
--- a/data/basics/address_test.go
+++ b/data/basics/address_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/basics/ccertpart.go b/data/basics/ccertpart.go
index 097cb6c27..901df00b9 100644
--- a/data/basics/ccertpart.go
+++ b/data/basics/ccertpart.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/basics/fields_test.go b/data/basics/fields_test.go
index 8027fa29a..2fcabbd4d 100644
--- a/data/basics/fields_test.go
+++ b/data/basics/fields_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/basics/overflow.go b/data/basics/overflow.go
index 7a2a3df8b..b842dc414 100644
--- a/data/basics/overflow.go
+++ b/data/basics/overflow.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/basics/sort.go b/data/basics/sort.go
index e35f66445..6841a6788 100644
--- a/data/basics/sort.go
+++ b/data/basics/sort.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/basics/teal.go b/data/basics/teal.go
index 6fe1ce7c4..1aaac047f 100644
--- a/data/basics/teal.go
+++ b/data/basics/teal.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/basics/teal_test.go b/data/basics/teal_test.go
index 35aa9a193..9090379d6 100644
--- a/data/basics/teal_test.go
+++ b/data/basics/teal_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/basics/units.go b/data/basics/units.go
index 9f92429e9..c96b08233 100644
--- a/data/basics/units.go
+++ b/data/basics/units.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/basics/units_test.go b/data/basics/units_test.go
index 07455d13b..efc9bd72c 100644
--- a/data/basics/units_test.go
+++ b/data/basics/units_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/basics/userBalance.go b/data/basics/userBalance.go
index a619438d3..064f63563 100644
--- a/data/basics/userBalance.go
+++ b/data/basics/userBalance.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/basics/userBalance_test.go b/data/basics/userBalance_test.go
index 04a770d92..c5bb661e5 100644
--- a/data/basics/userBalance_test.go
+++ b/data/basics/userBalance_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/bookkeeping/block.go b/data/bookkeeping/block.go
index bb9ae321b..f75c08386 100644
--- a/data/bookkeeping/block.go
+++ b/data/bookkeeping/block.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/bookkeeping/block_test.go b/data/bookkeeping/block_test.go
index 14d75e437..078a0b253 100644
--- a/data/bookkeeping/block_test.go
+++ b/data/bookkeeping/block_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/bookkeeping/encoding_test.go b/data/bookkeeping/encoding_test.go
index 0c82710f7..e892bb502 100644
--- a/data/bookkeeping/encoding_test.go
+++ b/data/bookkeeping/encoding_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/bookkeeping/genesis.go b/data/bookkeeping/genesis.go
index 6593bcd45..3b15d91d0 100644
--- a/data/bookkeeping/genesis.go
+++ b/data/bookkeeping/genesis.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/bookkeeping/prettyprinting.go b/data/bookkeeping/prettyprinting.go
index 7fc3d3166..7c8e28a0a 100644
--- a/data/bookkeeping/prettyprinting.go
+++ b/data/bookkeeping/prettyprinting.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/bookkeeping/txn_merkle.go b/data/bookkeeping/txn_merkle.go
index 043a09cc8..bac87c6ca 100644
--- a/data/bookkeeping/txn_merkle.go
+++ b/data/bookkeeping/txn_merkle.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/bookkeeping/txn_merkle_test.go b/data/bookkeeping/txn_merkle_test.go
index 5f7d6b2db..09dca10b3 100644
--- a/data/bookkeeping/txn_merkle_test.go
+++ b/data/bookkeeping/txn_merkle_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/committee/committee.go b/data/committee/committee.go
index 71409b56a..d70eca646 100644
--- a/data/committee/committee.go
+++ b/data/committee/committee.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/committee/common_test.go b/data/committee/common_test.go
index 05fba36bd..b0b77efd1 100644
--- a/data/committee/common_test.go
+++ b/data/committee/common_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/committee/credential.go b/data/committee/credential.go
index cc02e086c..c725cc9a8 100644
--- a/data/committee/credential.go
+++ b/data/committee/credential.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/committee/credential_test.go b/data/committee/credential_test.go
index 2160d72e5..fe13be8c1 100644
--- a/data/committee/credential_test.go
+++ b/data/committee/credential_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/committee/encoding_test.go b/data/committee/encoding_test.go
index f9491dbbf..ae34120de 100644
--- a/data/committee/encoding_test.go
+++ b/data/committee/encoding_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/committee/sortition/sortition.go b/data/committee/sortition/sortition.go
index 4fad43066..f8a38179d 100644
--- a/data/committee/sortition/sortition.go
+++ b/data/committee/sortition/sortition.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/committee/sortition/sortition_test.go b/data/committee/sortition/sortition_test.go
index ac3eae019..81bf89398 100644
--- a/data/committee/sortition/sortition_test.go
+++ b/data/committee/sortition/sortition_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/common_test.go b/data/common_test.go
index b02103d4d..ab1004fc1 100644
--- a/data/common_test.go
+++ b/data/common_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/datatest/fabricateLedger.go b/data/datatest/fabricateLedger.go
index 55d992823..9c859bbee 100644
--- a/data/datatest/fabricateLedger.go
+++ b/data/datatest/fabricateLedger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/datatest/impls.go b/data/datatest/impls.go
index 30fe35ba9..7a8f804ea 100644
--- a/data/datatest/impls.go
+++ b/data/datatest/impls.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/hashable/message.go b/data/hashable/message.go
index 4da3fd94e..ae0ae7806 100644
--- a/data/hashable/message.go
+++ b/data/hashable/message.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/ledger.go b/data/ledger.go
index 0767d2948..f5d851082 100644
--- a/data/ledger.go
+++ b/data/ledger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/ledger_test.go b/data/ledger_test.go
index c49598d3c..29456608b 100644
--- a/data/ledger_test.go
+++ b/data/ledger_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/pools/statusCache.go b/data/pools/statusCache.go
index 7b281e38d..3b25f7f67 100644
--- a/data/pools/statusCache.go
+++ b/data/pools/statusCache.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/pools/transactionPool.go b/data/pools/transactionPool.go
index 4295e82ff..7d8ba6478 100644
--- a/data/pools/transactionPool.go
+++ b/data/pools/transactionPool.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/pools/transactionPool_test.go b/data/pools/transactionPool_test.go
index 4e65333b6..a16a7d30f 100644
--- a/data/pools/transactionPool_test.go
+++ b/data/pools/transactionPool_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/application.go b/data/transactions/application.go
index 4588ed22f..0db7e72b9 100644
--- a/data/transactions/application.go
+++ b/data/transactions/application.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/application_test.go b/data/transactions/application_test.go
index 5d50d7126..a076e4b8d 100644
--- a/data/transactions/application_test.go
+++ b/data/transactions/application_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/asset.go b/data/transactions/asset.go
index 021b4c1a3..9daafd5bc 100644
--- a/data/transactions/asset.go
+++ b/data/transactions/asset.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/common_test.go b/data/transactions/common_test.go
index 838b6d4a5..b600ce6cf 100644
--- a/data/transactions/common_test.go
+++ b/data/transactions/common_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/compactcert.go b/data/transactions/compactcert.go
index 2b1be0cd8..c73aa0db5 100644
--- a/data/transactions/compactcert.go
+++ b/data/transactions/compactcert.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/error.go b/data/transactions/error.go
index 0625c2170..a95deeb3f 100644
--- a/data/transactions/error.go
+++ b/data/transactions/error.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/keyreg.go b/data/transactions/keyreg.go
index cb354802b..aafcc7af8 100644
--- a/data/transactions/keyreg.go
+++ b/data/transactions/keyreg.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/assembler.go b/data/transactions/logic/assembler.go
index 613a93650..b7a6018e5 100644
--- a/data/transactions/logic/assembler.go
+++ b/data/transactions/logic/assembler.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/assembler_test.go b/data/transactions/logic/assembler_test.go
index 1c56ab7a4..0035d3f10 100644
--- a/data/transactions/logic/assembler_test.go
+++ b/data/transactions/logic/assembler_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/backwardCompat_test.go b/data/transactions/logic/backwardCompat_test.go
index 226c94840..b56531cc0 100644
--- a/data/transactions/logic/backwardCompat_test.go
+++ b/data/transactions/logic/backwardCompat_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/debugger.go b/data/transactions/logic/debugger.go
index f90e7b3f3..5ec924e2a 100644
--- a/data/transactions/logic/debugger.go
+++ b/data/transactions/logic/debugger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/debugger_test.go b/data/transactions/logic/debugger_test.go
index a9c0603dc..fa9bb4065 100644
--- a/data/transactions/logic/debugger_test.go
+++ b/data/transactions/logic/debugger_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/doc.go b/data/transactions/logic/doc.go
index 4887f45f3..5149f4420 100644
--- a/data/transactions/logic/doc.go
+++ b/data/transactions/logic/doc.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/doc_test.go b/data/transactions/logic/doc_test.go
index f41501624..1bbfd3cc2 100644
--- a/data/transactions/logic/doc_test.go
+++ b/data/transactions/logic/doc_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/eval.go b/data/transactions/logic/eval.go
index 842403e9c..0157e724d 100644
--- a/data/transactions/logic/eval.go
+++ b/data/transactions/logic/eval.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/evalAppTxn_test.go b/data/transactions/logic/evalAppTxn_test.go
index b24e10fc2..4c9f3a4f0 100644
--- a/data/transactions/logic/evalAppTxn_test.go
+++ b/data/transactions/logic/evalAppTxn_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/evalCrypto_test.go b/data/transactions/logic/evalCrypto_test.go
index 5362fbf4c..4f6a0b340 100644
--- a/data/transactions/logic/evalCrypto_test.go
+++ b/data/transactions/logic/evalCrypto_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/evalStateful_test.go b/data/transactions/logic/evalStateful_test.go
index b8e368bf3..ee940026b 100644
--- a/data/transactions/logic/evalStateful_test.go
+++ b/data/transactions/logic/evalStateful_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/eval_test.go b/data/transactions/logic/eval_test.go
index ef92c6ce5..72c07f01f 100644
--- a/data/transactions/logic/eval_test.go
+++ b/data/transactions/logic/eval_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/fields.go b/data/transactions/logic/fields.go
index 986342773..8d4d4a839 100644
--- a/data/transactions/logic/fields.go
+++ b/data/transactions/logic/fields.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/fields_test.go b/data/transactions/logic/fields_test.go
index 4a62d31cf..7d65593b6 100644
--- a/data/transactions/logic/fields_test.go
+++ b/data/transactions/logic/fields_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/opcodes.go b/data/transactions/logic/opcodes.go
index 11f1b258f..e426a253a 100644
--- a/data/transactions/logic/opcodes.go
+++ b/data/transactions/logic/opcodes.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/opcodes_test.go b/data/transactions/logic/opcodes_test.go
index b5e762785..955662ced 100644
--- a/data/transactions/logic/opcodes_test.go
+++ b/data/transactions/logic/opcodes_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logic/program.go b/data/transactions/logic/program.go
index 9d35a62a3..58265b7f9 100644
--- a/data/transactions/logic/program.go
+++ b/data/transactions/logic/program.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logicsig.go b/data/transactions/logicsig.go
index f02c094f4..03a520fc6 100644
--- a/data/transactions/logicsig.go
+++ b/data/transactions/logicsig.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/logictest/ledger.go b/data/transactions/logictest/ledger.go
index 51ed94124..3ea39cd00 100644
--- a/data/transactions/logictest/ledger.go
+++ b/data/transactions/logictest/ledger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/payment.go b/data/transactions/payment.go
index f5018345a..7676315a3 100644
--- a/data/transactions/payment.go
+++ b/data/transactions/payment.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/payment_test.go b/data/transactions/payment_test.go
index 7bdddd992..7f88c7e79 100644
--- a/data/transactions/payment_test.go
+++ b/data/transactions/payment_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/payset.go b/data/transactions/payset.go
index 363e4f7f6..c75755788 100644
--- a/data/transactions/payset.go
+++ b/data/transactions/payset.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/payset_test.go b/data/transactions/payset_test.go
index 9b8633b62..9446f45b6 100644
--- a/data/transactions/payset_test.go
+++ b/data/transactions/payset_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/perf_test.go b/data/transactions/perf_test.go
index 11303ba0d..1aa0bed49 100644
--- a/data/transactions/perf_test.go
+++ b/data/transactions/perf_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/signedtxn.go b/data/transactions/signedtxn.go
index c30cd5303..6ade34a7e 100644
--- a/data/transactions/signedtxn.go
+++ b/data/transactions/signedtxn.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/signedtxn_test.go b/data/transactions/signedtxn_test.go
index 9826c8f48..92de12182 100644
--- a/data/transactions/signedtxn_test.go
+++ b/data/transactions/signedtxn_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/sort.go b/data/transactions/sort.go
index 3746ab640..f0f10286f 100644
--- a/data/transactions/sort.go
+++ b/data/transactions/sort.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/teal.go b/data/transactions/teal.go
index 0826290b9..3b7e78d58 100644
--- a/data/transactions/teal.go
+++ b/data/transactions/teal.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/teal_test.go b/data/transactions/teal_test.go
index 32eea6abb..0d6561b3e 100644
--- a/data/transactions/teal_test.go
+++ b/data/transactions/teal_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/testhelpers.go b/data/transactions/testhelpers.go
index 3ffacf6db..8c981791c 100644
--- a/data/transactions/testhelpers.go
+++ b/data/transactions/testhelpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/transaction.go b/data/transactions/transaction.go
index fb356bb04..9a7d97899 100644
--- a/data/transactions/transaction.go
+++ b/data/transactions/transaction.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/transaction_test.go b/data/transactions/transaction_test.go
index 72fe13b2f..b01d7cb3a 100644
--- a/data/transactions/transaction_test.go
+++ b/data/transactions/transaction_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/verify/txn.go b/data/transactions/verify/txn.go
index 13a07b328..3564a45d3 100644
--- a/data/transactions/verify/txn.go
+++ b/data/transactions/verify/txn.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/verify/txn_test.go b/data/transactions/verify/txn_test.go
index 36ac93637..e770f9406 100644
--- a/data/transactions/verify/txn_test.go
+++ b/data/transactions/verify/txn_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/verify/verifiedTxnCache.go b/data/transactions/verify/verifiedTxnCache.go
index 0c9bbe2c0..c5cf079e1 100644
--- a/data/transactions/verify/verifiedTxnCache.go
+++ b/data/transactions/verify/verifiedTxnCache.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/transactions/verify/verifiedTxnCache_test.go b/data/transactions/verify/verifiedTxnCache_test.go
index c6e720b62..af8e36b42 100644
--- a/data/transactions/verify/verifiedTxnCache_test.go
+++ b/data/transactions/verify/verifiedTxnCache_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/txHandler.go b/data/txHandler.go
index fa8bf250b..1d4d1a500 100644
--- a/data/txHandler.go
+++ b/data/txHandler.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/txHandler_test.go b/data/txHandler_test.go
index a53d83163..653cd51e9 100644
--- a/data/txHandler_test.go
+++ b/data/txHandler_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/data/txntest/txn.go b/data/txntest/txn.go
index 063f085bf..49cb1be96 100644
--- a/data/txntest/txn.go
+++ b/data/txntest/txn.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/gen/generate.go b/gen/generate.go
index 08c2e373c..416251176 100644
--- a/gen/generate.go
+++ b/gen/generate.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/gen/generate_test.go b/gen/generate_test.go
index 8b1c90e43..0d377a2b6 100644
--- a/gen/generate_test.go
+++ b/gen/generate_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/gen/walletData.go b/gen/walletData.go
index 15cfd1f1d..95c508c27 100644
--- a/gen/walletData.go
+++ b/gen/walletData.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/installer/config.json.example b/installer/config.json.example
index fac112201..17cbfd974 100644
--- a/installer/config.json.example
+++ b/installer/config.json.example
@@ -1,5 +1,5 @@
{
- "Version": 19,
+ "Version": 20,
"AccountUpdatesStatsInterval": 5000000000,
"AccountsRebuildSynchronousMode": 1,
"AnnounceParticipationKey": true,
@@ -23,6 +23,7 @@
"DNSBootstrapID": "<network>.algorand.network",
"DNSSecurityFlags": 1,
"DeadlockDetection": 0,
+ "DeadlockDetectionThreshold": 30,
"DisableLocalhostConnectionRateLimit": true,
"DisableNetworking": false,
"DisableOutgoingConnectionThrottling": false,
@@ -77,6 +78,8 @@
"PublicAddress": "",
"ReconnectTime": 60000000000,
"ReservedFDs": 256,
+ "RestConnectionsHardLimit": 2048,
+ "RestConnectionsSoftLimit": 1024,
"RestReadTimeoutSeconds": 15,
"RestWriteTimeoutSeconds": 120,
"RunHosted": false,
diff --git a/ledger/accountdb.go b/ledger/accountdb.go
index 2b12b42c2..514332265 100644
--- a/ledger/accountdb.go
+++ b/ledger/accountdb.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/accountdb_test.go b/ledger/accountdb_test.go
index ab64fe48f..e1275a128 100644
--- a/ledger/accountdb_test.go
+++ b/ledger/accountdb_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/acctupdates.go b/ledger/acctupdates.go
index fa1537513..62cbd6b07 100644
--- a/ledger/acctupdates.go
+++ b/ledger/acctupdates.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/acctupdates_test.go b/ledger/acctupdates_test.go
index 27306af53..5f014985c 100644
--- a/ledger/acctupdates_test.go
+++ b/ledger/acctupdates_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -412,6 +412,8 @@ func TestAcctUpdates(t *testing.T) {
newPool.MicroAlgos.Raw -= prevTotals.RewardUnits() * rewardLevelDelta
updates.Upsert(testPoolAddr, newPool)
totals[testPoolAddr] = newPool
+ curTotals := accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ require.Equal(t, prevTotals.All(), curTotals.All())
blk := bookkeeping.Block{
BlockHeader: bookkeeping.BlockHeader{
@@ -424,7 +426,7 @@ func TestAcctUpdates(t *testing.T) {
delta := ledgercore.MakeStateDelta(&blk.BlockHeader, 0, updates.Len(), 0)
delta.Accts.MergeAccounts(updates)
delta.Creatables = creatablesFromUpdates(base, updates, knownCreatables)
- delta.Totals = accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ delta.Totals = curTotals
au.newBlock(blk, delta)
accts = append(accts, totals)
rewardsLevels = append(rewardsLevels, rewardLevel)
@@ -515,6 +517,8 @@ func TestAcctUpdatesFastUpdates(t *testing.T) {
newPool.MicroAlgos.Raw -= prevTotals.RewardUnits() * rewardLevelDelta
updates.Upsert(testPoolAddr, newPool)
totals[testPoolAddr] = newPool
+ curTotals := accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ require.Equal(t, prevTotals.All(), curTotals.All())
blk := bookkeeping.Block{
BlockHeader: bookkeeping.BlockHeader{
@@ -526,6 +530,7 @@ func TestAcctUpdatesFastUpdates(t *testing.T) {
delta := ledgercore.MakeStateDelta(&blk.BlockHeader, 0, updates.Len(), 0)
delta.Accts.MergeAccounts(updates)
+ delta.Totals = curTotals
au.newBlock(blk, delta)
accts = append(accts, totals)
rewardsLevels = append(rewardsLevels, rewardLevel)
@@ -602,6 +607,8 @@ func BenchmarkBalancesChanges(b *testing.B) {
newPool.MicroAlgos.Raw -= prevTotals.RewardUnits() * rewardLevelDelta
updates.Upsert(testPoolAddr, newPool)
totals[testPoolAddr] = newPool
+ curTotals := accumulateTotals(b, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ require.Equal(b, prevTotals.All(), curTotals.All())
blk := bookkeeping.Block{
BlockHeader: bookkeeping.BlockHeader{
@@ -613,6 +620,7 @@ func BenchmarkBalancesChanges(b *testing.B) {
delta := ledgercore.MakeStateDelta(&blk.BlockHeader, 0, updates.Len(), 0)
delta.Accts.MergeAccounts(updates)
+ delta.Totals = curTotals
au.newBlock(blk, delta)
accts = append(accts, totals)
rewardsLevels = append(rewardsLevels, rewardLevel)
@@ -729,6 +737,8 @@ func TestLargeAccountCountCatchpointGeneration(t *testing.T) {
newPool.MicroAlgos.Raw -= prevTotals.RewardUnits() * rewardLevelDelta
updates.Upsert(testPoolAddr, newPool)
totals[testPoolAddr] = newPool
+ curTotals := accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ require.Equal(t, prevTotals.All(), curTotals.All())
blk := bookkeeping.Block{
BlockHeader: bookkeeping.BlockHeader{
@@ -740,6 +750,7 @@ func TestLargeAccountCountCatchpointGeneration(t *testing.T) {
delta := ledgercore.MakeStateDelta(&blk.BlockHeader, 0, updates.Len(), 0)
delta.Accts.MergeAccounts(updates)
+ delta.Totals = curTotals
au.newBlock(blk, delta)
accts = append(accts, totals)
rewardsLevels = append(rewardsLevels, rewardLevel)
@@ -1288,8 +1299,8 @@ func TestCompactDeltas(t *testing.T) {
}
-// TestCachesInitialization test the functionality of the initializeCaches cache.
-func TestCachesInitialization(t *testing.T) {
+// TestAcctUpdatesCachesInitialization test the functionality of the initializeCaches cache.
+func TestAcctUpdatesCachesInitialization(t *testing.T) {
partitiontest.PartitionTest(t)
protocolVersion := protocol.ConsensusCurrentVersion
@@ -1340,6 +1351,8 @@ func TestCachesInitialization(t *testing.T) {
newPool.MicroAlgos.Raw -= prevTotals.RewardUnits() * rewardLevelDelta
updates.Upsert(testPoolAddr, newPool)
totals[testPoolAddr] = newPool
+ curTotals := accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ require.Equal(t, prevTotals.All(), curTotals.All())
blk := bookkeeping.Block{
BlockHeader: bookkeeping.BlockHeader{
@@ -1351,7 +1364,7 @@ func TestCachesInitialization(t *testing.T) {
delta := ledgercore.MakeStateDelta(&blk.BlockHeader, 0, updates.Len(), 0)
delta.Accts.MergeAccounts(updates)
- delta.Totals = accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ delta.Totals = curTotals
ml.addMockBlock(blockEntry{block: blk}, delta)
au.newBlock(blk, delta)
ml.trackers.committedUpTo(basics.Round(i))
@@ -1382,8 +1395,8 @@ func TestCachesInitialization(t *testing.T) {
require.Equal(t, recoveredLedgerRound-basics.Round(proto.MaxBalLookback), au.cachedDBRound)
}
-// TestSplittingConsensusVersionCommits tests the a sequence of commits that spans over multiple consensus versions works correctly.
-func TestSplittingConsensusVersionCommits(t *testing.T) {
+// TestAcctUpdatesSplittingConsensusVersionCommits tests the a sequence of commits that spans over multiple consensus versions works correctly.
+func TestAcctUpdatesSplittingConsensusVersionCommits(t *testing.T) {
partitiontest.PartitionTest(t)
initProtocolVersion := protocol.ConsensusV20
@@ -1439,6 +1452,8 @@ func TestSplittingConsensusVersionCommits(t *testing.T) {
newPool.MicroAlgos.Raw -= prevTotals.RewardUnits() * rewardLevelDelta
updates.Upsert(testPoolAddr, newPool)
totals[testPoolAddr] = newPool
+ curTotals := accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ require.Equal(t, prevTotals.All(), curTotals.All())
blk := bookkeeping.Block{
BlockHeader: bookkeeping.BlockHeader{
@@ -1450,7 +1465,7 @@ func TestSplittingConsensusVersionCommits(t *testing.T) {
delta := ledgercore.MakeStateDelta(&blk.BlockHeader, 0, updates.Len(), 0)
delta.Accts.MergeAccounts(updates)
- delta.Totals = accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ delta.Totals = curTotals
ml.addMockBlock(blockEntry{block: blk}, delta)
au.newBlock(blk, delta)
accts = append(accts, totals)
@@ -1474,6 +1489,8 @@ func TestSplittingConsensusVersionCommits(t *testing.T) {
newPool.MicroAlgos.Raw -= prevTotals.RewardUnits() * rewardLevelDelta
updates.Upsert(testPoolAddr, newPool)
totals[testPoolAddr] = newPool
+ curTotals := accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ require.Equal(t, prevTotals.All(), curTotals.All())
blk := bookkeeping.Block{
BlockHeader: bookkeeping.BlockHeader{
@@ -1485,7 +1502,7 @@ func TestSplittingConsensusVersionCommits(t *testing.T) {
delta := ledgercore.MakeStateDelta(&blk.BlockHeader, 0, updates.Len(), 0)
delta.Accts.MergeAccounts(updates)
- delta.Totals = accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ delta.Totals = curTotals
ml.addMockBlock(blockEntry{block: blk}, delta)
au.newBlock(blk, delta)
accts = append(accts, totals)
@@ -1498,9 +1515,9 @@ func TestSplittingConsensusVersionCommits(t *testing.T) {
}
-// TestSplittingConsensusVersionCommitsBoundry tests the a sequence of commits that spans over multiple consensus versions works correctly, and
-// in particular, complements TestSplittingConsensusVersionCommits by testing the commit boundary.
-func TestSplittingConsensusVersionCommitsBoundry(t *testing.T) {
+// TestAcctUpdatesSplittingConsensusVersionCommitsBoundry tests the a sequence of commits that spans over multiple consensus versions works correctly, and
+// in particular, complements TestAcctUpdatesSplittingConsensusVersionCommits by testing the commit boundary.
+func TestAcctUpdatesSplittingConsensusVersionCommitsBoundry(t *testing.T) {
partitiontest.PartitionTest(t)
initProtocolVersion := protocol.ConsensusV20
@@ -1556,6 +1573,8 @@ func TestSplittingConsensusVersionCommitsBoundry(t *testing.T) {
newPool.MicroAlgos.Raw -= prevTotals.RewardUnits() * rewardLevelDelta
updates.Upsert(testPoolAddr, newPool)
totals[testPoolAddr] = newPool
+ curTotals := accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ require.Equal(t, prevTotals.All(), curTotals.All())
blk := bookkeeping.Block{
BlockHeader: bookkeeping.BlockHeader{
@@ -1567,7 +1586,7 @@ func TestSplittingConsensusVersionCommitsBoundry(t *testing.T) {
delta := ledgercore.MakeStateDelta(&blk.BlockHeader, 0, updates.Len(), 0)
delta.Accts.MergeAccounts(updates)
- delta.Totals = accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ delta.Totals = curTotals
ml.addMockBlock(blockEntry{block: blk}, delta)
au.newBlock(blk, delta)
accts = append(accts, totals)
@@ -1590,6 +1609,8 @@ func TestSplittingConsensusVersionCommitsBoundry(t *testing.T) {
newPool.MicroAlgos.Raw -= prevTotals.RewardUnits() * rewardLevelDelta
updates.Upsert(testPoolAddr, newPool)
totals[testPoolAddr] = newPool
+ curTotals := accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ require.Equal(t, prevTotals.All(), curTotals.All())
blk := bookkeeping.Block{
BlockHeader: bookkeeping.BlockHeader{
@@ -1601,7 +1622,7 @@ func TestSplittingConsensusVersionCommitsBoundry(t *testing.T) {
delta := ledgercore.MakeStateDelta(&blk.BlockHeader, 0, updates.Len(), 0)
delta.Accts.MergeAccounts(updates)
- delta.Totals = accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ delta.Totals = curTotals
ml.addMockBlock(blockEntry{block: blk}, delta)
au.newBlock(blk, delta)
accts = append(accts, totals)
@@ -1626,6 +1647,8 @@ func TestSplittingConsensusVersionCommitsBoundry(t *testing.T) {
newPool.MicroAlgos.Raw -= prevTotals.RewardUnits() * rewardLevelDelta
updates.Upsert(testPoolAddr, newPool)
totals[testPoolAddr] = newPool
+ curTotals := accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ require.Equal(t, prevTotals.All(), curTotals.All())
blk := bookkeeping.Block{
BlockHeader: bookkeeping.BlockHeader{
@@ -1637,7 +1660,7 @@ func TestSplittingConsensusVersionCommitsBoundry(t *testing.T) {
delta := ledgercore.MakeStateDelta(&blk.BlockHeader, 0, updates.Len(), 0)
delta.Accts.MergeAccounts(updates)
- delta.Totals = accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ delta.Totals = curTotals
ml.addMockBlock(blockEntry{block: blk}, delta)
au.newBlock(blk, delta)
accts = append(accts, totals)
@@ -1677,3 +1700,152 @@ func TestConsecutiveVersion(t *testing.T) {
protocol.ConsensusV21,
}
}
+
+// This test attempts to cover the case when an accountUpdates.lookupX method:
+// - can't find the requested address,
+// - falls through looking at deltas and the LRU accounts cache,
+// - then hits the database (calling accountsDbQueries.lookup)
+// only to discover that the round stored in the database (committed in accountUpdates.commitRound)
+// is out of sync with accountUpdates.cachedDBRound (updated a little bit later in accountUpdates.postCommit).
+//
+// In this case it waits on a condition variable and retries when
+// commitSyncer/accountUpdates has advanced the cachedDBRound.
+func TestAcctUpdatesLookupRetry(t *testing.T) {
+ partitiontest.PartitionTest(t)
+
+ testProtocolVersion := protocol.ConsensusVersion("test-protocol-TestAcctUpdatesLookupRetry")
+ proto := config.Consensus[protocol.ConsensusCurrentVersion]
+ proto.MaxBalLookback = 10
+ config.Consensus[testProtocolVersion] = proto
+ defer func() {
+ delete(config.Consensus, testProtocolVersion)
+ }()
+
+ accts := []map[basics.Address]basics.AccountData{ledgertesting.RandomAccounts(20, true)}
+ rewardsLevels := []uint64{0}
+
+ pooldata := basics.AccountData{}
+ pooldata.MicroAlgos.Raw = 1000 * 1000 * 1000 * 1000
+ pooldata.Status = basics.NotParticipating
+ accts[0][testPoolAddr] = pooldata
+
+ sinkdata := basics.AccountData{}
+ sinkdata.MicroAlgos.Raw = 1000 * 1000 * 1000 * 1000
+ sinkdata.Status = basics.NotParticipating
+ accts[0][testSinkAddr] = sinkdata
+
+ ml := makeMockLedgerForTracker(t, false, 10, testProtocolVersion, accts)
+ defer ml.Close()
+
+ conf := config.GetDefaultLocal()
+ au := newAcctUpdates(t, ml, conf, ".")
+ defer au.close()
+
+ // cover 10 genesis blocks
+ rewardLevel := uint64(0)
+ for i := 1; i < 10; i++ {
+ accts = append(accts, accts[0])
+ rewardsLevels = append(rewardsLevels, rewardLevel)
+ }
+
+ checkAcctUpdates(t, au, 0, 9, accts, rewardsLevels, proto)
+
+ // lastCreatableID stores asset or app max used index to get rid of conflicts
+ lastCreatableID := crypto.RandUint64() % 512
+ knownCreatables := make(map[basics.CreatableIndex]bool)
+
+ for i := basics.Round(10); i < basics.Round(proto.MaxBalLookback+15); i++ {
+ rewardLevelDelta := crypto.RandUint64() % 5
+ rewardLevel += rewardLevelDelta
+ var updates ledgercore.AccountDeltas
+ var totals map[basics.Address]basics.AccountData
+ base := accts[i-1]
+ updates, totals, lastCreatableID = ledgertesting.RandomDeltasBalancedFull(1, base, rewardLevel, lastCreatableID)
+ prevTotals, err := au.Totals(basics.Round(i - 1))
+ require.NoError(t, err)
+
+ newPool := totals[testPoolAddr]
+ newPool.MicroAlgos.Raw -= prevTotals.RewardUnits() * rewardLevelDelta
+ updates.Upsert(testPoolAddr, newPool)
+ totals[testPoolAddr] = newPool
+
+ blk := bookkeeping.Block{
+ BlockHeader: bookkeeping.BlockHeader{
+ Round: basics.Round(i),
+ },
+ }
+ blk.RewardsLevel = rewardLevel
+ blk.CurrentProtocol = testProtocolVersion
+
+ delta := ledgercore.MakeStateDelta(&blk.BlockHeader, 0, updates.Len(), 0)
+ delta.Accts.MergeAccounts(updates)
+ delta.Creatables = creatablesFromUpdates(base, updates, knownCreatables)
+ delta.Totals = accumulateTotals(t, testProtocolVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ au.newBlock(blk, delta)
+ accts = append(accts, totals)
+ rewardsLevels = append(rewardsLevels, rewardLevel)
+
+ checkAcctUpdates(t, au, 0, i, accts, rewardsLevels, proto)
+ }
+
+ flushRound := func(i basics.Round) {
+ // Clear the timer to ensure a flush
+ ml.trackers.lastFlushTime = time.Time{}
+
+ ml.trackers.committedUpTo(basics.Round(proto.MaxBalLookback) + i)
+ ml.trackers.waitAccountsWriting()
+ }
+
+ // flush a couple of rounds (indirectly schedules commitSyncer)
+ flushRound(basics.Round(0))
+ flushRound(basics.Round(1))
+
+ // add stallingTracker to list of trackers
+ stallingTracker := &blockingTracker{
+ postCommitUnlockedEntryLock: make(chan struct{}),
+ postCommitUnlockedReleaseLock: make(chan struct{}),
+ postCommitEntryLock: make(chan struct{}),
+ postCommitReleaseLock: make(chan struct{}),
+ alwaysLock: true,
+ }
+ ml.trackers.trackers = append([]ledgerTracker{stallingTracker}, ml.trackers.trackers...)
+
+ // kick off another round
+ go flushRound(basics.Round(2))
+
+ // let stallingTracker enter postCommit() and block (waiting on postCommitReleaseLock)
+ // this will prevent accountUpdates.postCommit() from updating au.cachedDBRound = newBase
+ <-stallingTracker.postCommitEntryLock
+
+ // prune the baseAccounts cache, so that lookup will fall through to the DB
+ au.accountsMu.Lock()
+ au.baseAccounts.prune(0)
+ au.accountsMu.Unlock()
+
+ rnd := basics.Round(2)
+
+ // grab any address and data to use for call to lookup
+ var addr basics.Address
+ var data basics.AccountData
+ for a, d := range accts[rnd] {
+ addr = a
+ data = d
+ break
+ }
+
+ // release the postCommit lock, once au.lookupWithoutRewards hits au.accountsReadCond.Wait()
+ go func() {
+ time.Sleep(200 * time.Millisecond)
+ stallingTracker.postCommitReleaseLock <- struct{}{}
+ }()
+
+ // issue a LookupWithoutRewards while persistedData.round != au.cachedDBRound
+ d, validThrough, err := au.LookupWithoutRewards(rnd, addr)
+ require.NoError(t, err)
+ require.Equal(t, d, data)
+ require.GreaterOrEqualf(t, uint64(validThrough), uint64(rnd), "validThrough: %v rnd :%v", validThrough, rnd)
+
+ // allow the postCommitUnlocked() handler to go through
+ <-stallingTracker.postCommitUnlockedEntryLock
+ stallingTracker.postCommitUnlockedReleaseLock <- struct{}{}
+}
diff --git a/ledger/applications_test.go b/ledger/applications_test.go
index 5630fc19c..9eb3ddd69 100644
--- a/ledger/applications_test.go
+++ b/ledger/applications_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/apply/application.go b/ledger/apply/application.go
index 2ff573303..81197e0d0 100644
--- a/ledger/apply/application.go
+++ b/ledger/apply/application.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/apply/application_test.go b/ledger/apply/application_test.go
index 124a40936..17cced998 100644
--- a/ledger/apply/application_test.go
+++ b/ledger/apply/application_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/apply/apply.go b/ledger/apply/apply.go
index f6a91ed8e..c7d998268 100644
--- a/ledger/apply/apply.go
+++ b/ledger/apply/apply.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/apply/asset.go b/ledger/apply/asset.go
index 0796cb8f7..c3192bb84 100644
--- a/ledger/apply/asset.go
+++ b/ledger/apply/asset.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/apply/asset_test.go b/ledger/apply/asset_test.go
index 3fbad27c7..bb45647f3 100644
--- a/ledger/apply/asset_test.go
+++ b/ledger/apply/asset_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/apply/keyreg.go b/ledger/apply/keyreg.go
index 532bfac51..1cf93c614 100644
--- a/ledger/apply/keyreg.go
+++ b/ledger/apply/keyreg.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/apply/keyreg_test.go b/ledger/apply/keyreg_test.go
index ecb4e9072..ea0b24195 100644
--- a/ledger/apply/keyreg_test.go
+++ b/ledger/apply/keyreg_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/apply/mockBalances_test.go b/ledger/apply/mockBalances_test.go
index d08e992e8..06e8a6d38 100644
--- a/ledger/apply/mockBalances_test.go
+++ b/ledger/apply/mockBalances_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/apply/payment.go b/ledger/apply/payment.go
index cd2fd532f..1caa08255 100644
--- a/ledger/apply/payment.go
+++ b/ledger/apply/payment.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/apply/payment_test.go b/ledger/apply/payment_test.go
index 09b55306d..6f20dd9a5 100644
--- a/ledger/apply/payment_test.go
+++ b/ledger/apply/payment_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/apptxn_test.go b/ledger/apptxn_test.go
index 6166c5d68..cbefb140b 100644
--- a/ledger/apptxn_test.go
+++ b/ledger/apptxn_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/archival_test.go b/ledger/archival_test.go
index 9d4f3b15d..d278a3ee0 100644
--- a/ledger/archival_test.go
+++ b/ledger/archival_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/blockdb.go b/ledger/blockdb.go
index 9c68adfdc..1919fdb80 100644
--- a/ledger/blockdb.go
+++ b/ledger/blockdb.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/blockdb_test.go b/ledger/blockdb_test.go
index 0c2fa8ecd..da1d8303c 100644
--- a/ledger/blockdb_test.go
+++ b/ledger/blockdb_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/blockqueue.go b/ledger/blockqueue.go
index 25df6043a..cb14d6294 100644
--- a/ledger/blockqueue.go
+++ b/ledger/blockqueue.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/blockqueue_test.go b/ledger/blockqueue_test.go
index 55f2a39ef..0f6279890 100644
--- a/ledger/blockqueue_test.go
+++ b/ledger/blockqueue_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/bulletin.go b/ledger/bulletin.go
index b18813007..62012403b 100644
--- a/ledger/bulletin.go
+++ b/ledger/bulletin.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/bulletin_test.go b/ledger/bulletin_test.go
index cf8d16043..a3d5ae1f9 100644
--- a/ledger/bulletin_test.go
+++ b/ledger/bulletin_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/catchpointtracker.go b/ledger/catchpointtracker.go
index ab03db4ef..58d6e77b7 100644
--- a/ledger/catchpointtracker.go
+++ b/ledger/catchpointtracker.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/catchpointtracker_test.go b/ledger/catchpointtracker_test.go
index d2188f2e3..b5778691e 100644
--- a/ledger/catchpointtracker_test.go
+++ b/ledger/catchpointtracker_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -317,8 +317,11 @@ func TestReproducibleCatchpointLabels(t *testing.T) {
newPool.MicroAlgos.Raw -= prevTotals.RewardUnits() * rewardLevelDelta
updates.Upsert(testPoolAddr, newPool)
totals[testPoolAddr] = newPool
+ curTotals := accumulateTotals(t, protocol.ConsensusCurrentVersion, []map[basics.Address]basics.AccountData{totals}, rewardLevel)
+ require.Equal(t, prevTotals.All(), curTotals.All())
newTotals := ledgertesting.CalculateNewRoundAccountTotals(t, updates, rewardLevel, protoParams, base, prevTotals)
+ require.Equal(t, newTotals.All(), curTotals.All())
blk := bookkeeping.Block{
BlockHeader: bookkeeping.BlockHeader{
@@ -424,6 +427,7 @@ type blockingTracker struct {
postCommitEntryLock chan struct{}
postCommitReleaseLock chan struct{}
committedUpToRound int64
+ alwaysLock bool
}
// loadFromDisk is not implemented in the blockingTracker.
@@ -458,7 +462,7 @@ func (bt *blockingTracker) commitRound(context.Context, *sql.Tx, *deferredCommit
// postCommit implements entry/exit blockers, designed for testing.
func (bt *blockingTracker) postCommit(ctx context.Context, dcc *deferredCommitContext) {
- if dcc.isCatchpointRound && dcc.catchpointLabel != "" {
+ if bt.alwaysLock || (dcc.isCatchpointRound && dcc.catchpointLabel != "") {
bt.postCommitEntryLock <- struct{}{}
<-bt.postCommitReleaseLock
}
@@ -466,7 +470,7 @@ func (bt *blockingTracker) postCommit(ctx context.Context, dcc *deferredCommitCo
// postCommitUnlocked implements entry/exit blockers, designed for testing.
func (bt *blockingTracker) postCommitUnlocked(ctx context.Context, dcc *deferredCommitContext) {
- if dcc.isCatchpointRound && dcc.catchpointLabel != "" {
+ if bt.alwaysLock || (dcc.isCatchpointRound && dcc.catchpointLabel != "") {
bt.postCommitUnlockedEntryLock <- struct{}{}
<-bt.postCommitUnlockedReleaseLock
}
diff --git a/ledger/catchpointwriter.go b/ledger/catchpointwriter.go
index 349748176..22ce40fb6 100644
--- a/ledger/catchpointwriter.go
+++ b/ledger/catchpointwriter.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/catchpointwriter_test.go b/ledger/catchpointwriter_test.go
index 0b14f5524..2a12fb7d1 100644
--- a/ledger/catchpointwriter_test.go
+++ b/ledger/catchpointwriter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/catchupaccessor.go b/ledger/catchupaccessor.go
index 784a258c7..8ed4ad7e4 100644
--- a/ledger/catchupaccessor.go
+++ b/ledger/catchupaccessor.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/catchupaccessor_test.go b/ledger/catchupaccessor_test.go
index e3a073cdf..353a2c5e3 100644
--- a/ledger/catchupaccessor_test.go
+++ b/ledger/catchupaccessor_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/evalbench_test.go b/ledger/evalbench_test.go
index 52974c7d3..dea5a3899 100644
--- a/ledger/evalbench_test.go
+++ b/ledger/evalbench_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/evalindexer.go b/ledger/evalindexer.go
index 251e7c1f6..7cdd36d5f 100644
--- a/ledger/evalindexer.go
+++ b/ledger/evalindexer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/evalindexer_test.go b/ledger/evalindexer_test.go
index 76e4d2e42..105b49f99 100644
--- a/ledger/evalindexer_test.go
+++ b/ledger/evalindexer_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/internal/appcow.go b/ledger/internal/appcow.go
index 9a136f4bf..9d515c473 100644
--- a/ledger/internal/appcow.go
+++ b/ledger/internal/appcow.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/internal/appcow_test.go b/ledger/internal/appcow_test.go
index 978854eb8..4b4d14f78 100644
--- a/ledger/internal/appcow_test.go
+++ b/ledger/internal/appcow_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/internal/applications.go b/ledger/internal/applications.go
index fc18699b7..23a178d44 100644
--- a/ledger/internal/applications.go
+++ b/ledger/internal/applications.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/internal/applications_test.go b/ledger/internal/applications_test.go
index 94efcef1a..3ba517f74 100644
--- a/ledger/internal/applications_test.go
+++ b/ledger/internal/applications_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/internal/assetcow.go b/ledger/internal/assetcow.go
index b28d09a7f..2fbfb5ddc 100644
--- a/ledger/internal/assetcow.go
+++ b/ledger/internal/assetcow.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/internal/compactcert.go b/ledger/internal/compactcert.go
index 2f90c8b22..81387aba8 100644
--- a/ledger/internal/compactcert.go
+++ b/ledger/internal/compactcert.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/internal/compactcert_test.go b/ledger/internal/compactcert_test.go
index 690d49375..4b116a69f 100644
--- a/ledger/internal/compactcert_test.go
+++ b/ledger/internal/compactcert_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/internal/cow.go b/ledger/internal/cow.go
index 4bf546de9..aab0ae256 100644
--- a/ledger/internal/cow.go
+++ b/ledger/internal/cow.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/internal/cow_test.go b/ledger/internal/cow_test.go
index 968df87a0..45252b278 100644
--- a/ledger/internal/cow_test.go
+++ b/ledger/internal/cow_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/internal/eval.go b/ledger/internal/eval.go
index 1cb050bf6..336fcb943 100644
--- a/ledger/internal/eval.go
+++ b/ledger/internal/eval.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/internal/eval_blackbox_test.go b/ledger/internal/eval_blackbox_test.go
index 816bd6e68..90279a64b 100644
--- a/ledger/internal/eval_blackbox_test.go
+++ b/ledger/internal/eval_blackbox_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/internal/eval_test.go b/ledger/internal/eval_test.go
index c3bae4613..d8e7cd5fa 100644
--- a/ledger/internal/eval_test.go
+++ b/ledger/internal/eval_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/internal/evalindexer.go b/ledger/internal/evalindexer.go
index 454ae2d7a..b765e0e1e 100644
--- a/ledger/internal/evalindexer.go
+++ b/ledger/internal/evalindexer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledger.go b/ledger/ledger.go
index 4c0ececaa..02d5516af 100644
--- a/ledger/ledger.go
+++ b/ledger/ledger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledger_perf_test.go b/ledger/ledger_perf_test.go
index e3f36c4f7..3cb9bb5a9 100644
--- a/ledger/ledger_perf_test.go
+++ b/ledger/ledger_perf_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledger_test.go b/ledger/ledger_test.go
index 9fa3c08bd..b28965755 100644
--- a/ledger/ledger_test.go
+++ b/ledger/ledger_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledgercore/catchpointlabel.go b/ledger/ledgercore/catchpointlabel.go
index 9e99a830c..2b2e085fa 100644
--- a/ledger/ledgercore/catchpointlabel.go
+++ b/ledger/ledgercore/catchpointlabel.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledgercore/catchpointlabel_test.go b/ledger/ledgercore/catchpointlabel_test.go
index cfe744baa..5e7a22026 100644
--- a/ledger/ledgercore/catchpointlabel_test.go
+++ b/ledger/ledgercore/catchpointlabel_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledgercore/error.go b/ledger/ledgercore/error.go
index 68185a573..60ec1a6aa 100644
--- a/ledger/ledgercore/error.go
+++ b/ledger/ledgercore/error.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledgercore/misc.go b/ledger/ledgercore/misc.go
index f4fd21f50..9d798b4ee 100644
--- a/ledger/ledgercore/misc.go
+++ b/ledger/ledgercore/misc.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledgercore/onlineacct.go b/ledger/ledgercore/onlineacct.go
index de786e9be..b8dba2945 100644
--- a/ledger/ledgercore/onlineacct.go
+++ b/ledger/ledgercore/onlineacct.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledgercore/statedelta.go b/ledger/ledgercore/statedelta.go
index 60336d939..6e02fc6f2 100644
--- a/ledger/ledgercore/statedelta.go
+++ b/ledger/ledgercore/statedelta.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledgercore/statedelta_test.go b/ledger/ledgercore/statedelta_test.go
index f2f8bf7ad..e0aee73ea 100644
--- a/ledger/ledgercore/statedelta_test.go
+++ b/ledger/ledgercore/statedelta_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledgercore/totals.go b/ledger/ledgercore/totals.go
index ccc0b30ac..5cdee8100 100644
--- a/ledger/ledgercore/totals.go
+++ b/ledger/ledgercore/totals.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledgercore/totals_test.go b/ledger/ledgercore/totals_test.go
index cabbd45e4..a64dcf16b 100644
--- a/ledger/ledgercore/totals_test.go
+++ b/ledger/ledgercore/totals_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledgercore/validatedBlock.go b/ledger/ledgercore/validatedBlock.go
index ef6c8f250..9b4aa30f1 100644
--- a/ledger/ledgercore/validatedBlock.go
+++ b/ledger/ledgercore/validatedBlock.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/ledgercore/votersForRound.go b/ledger/ledgercore/votersForRound.go
index de76d2d29..c898efa8f 100644
--- a/ledger/ledgercore/votersForRound.go
+++ b/ledger/ledgercore/votersForRound.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/lruaccts.go b/ledger/lruaccts.go
index 2544ff3a7..c921bc014 100644
--- a/ledger/lruaccts.go
+++ b/ledger/lruaccts.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/lruaccts_test.go b/ledger/lruaccts_test.go
index 4c4d12ca3..023962ea6 100644
--- a/ledger/lruaccts_test.go
+++ b/ledger/lruaccts_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/metrics.go b/ledger/metrics.go
index 8c7e5dcc7..c7ac7dc00 100644
--- a/ledger/metrics.go
+++ b/ledger/metrics.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/notifier.go b/ledger/notifier.go
index db1347140..6feb06189 100644
--- a/ledger/notifier.go
+++ b/ledger/notifier.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/onlinetopheap.go b/ledger/onlinetopheap.go
index 72a81d88a..d3c818ec2 100644
--- a/ledger/onlinetopheap.go
+++ b/ledger/onlinetopheap.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/onlinetopheap_test.go b/ledger/onlinetopheap_test.go
index 11c85d599..7d72d0d41 100644
--- a/ledger/onlinetopheap_test.go
+++ b/ledger/onlinetopheap_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/perf_test.go b/ledger/perf_test.go
index 15aca599f..53cc2cb49 100644
--- a/ledger/perf_test.go
+++ b/ledger/perf_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/persistedaccts_list.go b/ledger/persistedaccts_list.go
index ae84e6f02..5570df893 100644
--- a/ledger/persistedaccts_list.go
+++ b/ledger/persistedaccts_list.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/persistedaccts_list_test.go b/ledger/persistedaccts_list_test.go
index 95b8b026d..800a803d7 100644
--- a/ledger/persistedaccts_list_test.go
+++ b/ledger/persistedaccts_list_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/roundlru.go b/ledger/roundlru.go
index 615dd164a..cfc4675ee 100644
--- a/ledger/roundlru.go
+++ b/ledger/roundlru.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/roundlru_test.go b/ledger/roundlru_test.go
index 7837bd555..ef8ac03af 100644
--- a/ledger/roundlru_test.go
+++ b/ledger/roundlru_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/testing/accountsTotals.go b/ledger/testing/accountsTotals.go
index b646a6829..100d11c51 100644
--- a/ledger/testing/accountsTotals.go
+++ b/ledger/testing/accountsTotals.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/testing/initState.go b/ledger/testing/initState.go
index ad96e1f76..29b9767dc 100644
--- a/ledger/testing/initState.go
+++ b/ledger/testing/initState.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/testing/randomAccounts.go b/ledger/testing/randomAccounts.go
index 86ec6a60c..d192847a3 100644
--- a/ledger/testing/randomAccounts.go
+++ b/ledger/testing/randomAccounts.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/testing/testGenesis.go b/ledger/testing/testGenesis.go
index a24c46c57..e150fafae 100644
--- a/ledger/testing/testGenesis.go
+++ b/ledger/testing/testGenesis.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/tracker.go b/ledger/tracker.go
index 44a255b03..b5d608c2b 100644
--- a/ledger/tracker.go
+++ b/ledger/tracker.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/trackerdb.go b/ledger/trackerdb.go
index dd73f1a8a..795378f78 100644
--- a/ledger/trackerdb.go
+++ b/ledger/trackerdb.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/txtail.go b/ledger/txtail.go
index 4d596396f..c390bab38 100644
--- a/ledger/txtail.go
+++ b/ledger/txtail.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/txtail_test.go b/ledger/txtail_test.go
index eaaf34a06..baa632dee 100644
--- a/ledger/txtail_test.go
+++ b/ledger/txtail_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/ledger/voters.go b/ledger/voters.go
index 898604072..ba7630598 100644
--- a/ledger/voters.go
+++ b/ledger/voters.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/accounts.go b/libgoal/accounts.go
index d2a1cdabe..3fc02fc88 100644
--- a/libgoal/accounts.go
+++ b/libgoal/accounts.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/error.go b/libgoal/error.go
index 676c7c742..63ce176aa 100644
--- a/libgoal/error.go
+++ b/libgoal/error.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/libgoal.go b/libgoal/libgoal.go
index 2563adf6e..15e5c823e 100644
--- a/libgoal/libgoal.go
+++ b/libgoal/libgoal.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/libgoal_test.go b/libgoal/libgoal_test.go
index 5d0959fbe..96c524ef4 100644
--- a/libgoal/libgoal_test.go
+++ b/libgoal/libgoal_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/lockedFile.go b/libgoal/lockedFile.go
index d940c8866..3c827d870 100644
--- a/libgoal/lockedFile.go
+++ b/libgoal/lockedFile.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/lockedFileLinux.go b/libgoal/lockedFileLinux.go
index 7c30421a9..989972873 100644
--- a/libgoal/lockedFileLinux.go
+++ b/libgoal/lockedFileLinux.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/lockedFileUnix.go b/libgoal/lockedFileUnix.go
index b8db1451a..70262a15c 100644
--- a/libgoal/lockedFileUnix.go
+++ b/libgoal/lockedFileUnix.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/lockedFileWindows.go b/libgoal/lockedFileWindows.go
index a3b26abb0..efc6de0ad 100644
--- a/libgoal/lockedFileWindows.go
+++ b/libgoal/lockedFileWindows.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/participation.go b/libgoal/participation.go
index 66ba9e4a5..b46d7c7ad 100644
--- a/libgoal/participation.go
+++ b/libgoal/participation.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/system.go b/libgoal/system.go
index 298c6e38c..6cf716671 100644
--- a/libgoal/system.go
+++ b/libgoal/system.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/teal.go b/libgoal/teal.go
index 99c4f92f8..f0b18ede6 100644
--- a/libgoal/teal.go
+++ b/libgoal/teal.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/transactions.go b/libgoal/transactions.go
index d1c51a7e9..25dd1e761 100644
--- a/libgoal/transactions.go
+++ b/libgoal/transactions.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/unencryptedWallet.go b/libgoal/unencryptedWallet.go
index 9a38dfaf9..8953fe0ea 100644
--- a/libgoal/unencryptedWallet.go
+++ b/libgoal/unencryptedWallet.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/walletHandles.go b/libgoal/walletHandles.go
index 85e0990de..c587c9af5 100644
--- a/libgoal/walletHandles.go
+++ b/libgoal/walletHandles.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/libgoal/wallets.go b/libgoal/wallets.go
index 4677b3ae8..5ba91a5a2 100644
--- a/libgoal/wallets.go
+++ b/libgoal/wallets.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/collector.go b/logging/collector.go
index ca316a900..a443b15ac 100644
--- a/logging/collector.go
+++ b/logging/collector.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/cyclicWriter.go b/logging/cyclicWriter.go
index 86a8d89f7..d7c20e6ce 100644
--- a/logging/cyclicWriter.go
+++ b/logging/cyclicWriter.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/cyclicWriter_test.go b/logging/cyclicWriter_test.go
index e3ea89530..d1eaa43b0 100644
--- a/logging/cyclicWriter_test.go
+++ b/logging/cyclicWriter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/logBuffer.go b/logging/logBuffer.go
index 9e280404a..8064e0d17 100644
--- a/logging/logBuffer.go
+++ b/logging/logBuffer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/logBuffer_test.go b/logging/logBuffer_test.go
index 9c0fba8b9..b2f8dc1e1 100644
--- a/logging/logBuffer_test.go
+++ b/logging/logBuffer_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/log_test.go b/logging/log_test.go
index 363791be1..2f4365ccb 100644
--- a/logging/log_test.go
+++ b/logging/log_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/logspec/agreement.go b/logging/logspec/agreement.go
index 7ce440198..6091891fb 100644
--- a/logging/logspec/agreement.go
+++ b/logging/logspec/agreement.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/logspec/ledger.go b/logging/logspec/ledger.go
index 7471120ce..e7538b562 100644
--- a/logging/logspec/ledger.go
+++ b/logging/logspec/ledger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/logspec/root.go b/logging/logspec/root.go
index decc5d7d7..1bec1eb96 100644
--- a/logging/logspec/root.go
+++ b/logging/logspec/root.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetry.go b/logging/telemetry.go
index f5bafc4bb..7f05267cd 100644
--- a/logging/telemetry.go
+++ b/logging/telemetry.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetryCommon.go b/logging/telemetryCommon.go
index 6e14ea090..3e8610b41 100644
--- a/logging/telemetryCommon.go
+++ b/logging/telemetryCommon.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetryConfig.go b/logging/telemetryConfig.go
index 32aede9f4..12c46bce0 100644
--- a/logging/telemetryConfig.go
+++ b/logging/telemetryConfig.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetryConfig_test.go b/logging/telemetryConfig_test.go
index 28cfef613..e0522a304 100644
--- a/logging/telemetryConfig_test.go
+++ b/logging/telemetryConfig_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetryFilteredHook.go b/logging/telemetryFilteredHook.go
index b681dd2f6..771a7e89f 100644
--- a/logging/telemetryFilteredHook.go
+++ b/logging/telemetryFilteredHook.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetryOperation.go b/logging/telemetryOperation.go
index 7c86bb0c4..077902dd2 100644
--- a/logging/telemetryOperation.go
+++ b/logging/telemetryOperation.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetry_test.go b/logging/telemetry_test.go
index 039ddf4f0..cd40cc512 100644
--- a/logging/telemetry_test.go
+++ b/logging/telemetry_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetryhook.go b/logging/telemetryhook.go
index 146843492..1a8c29729 100644
--- a/logging/telemetryhook.go
+++ b/logging/telemetryhook.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetryhook_test.go b/logging/telemetryhook_test.go
index 083df03c5..1846ed6f4 100644
--- a/logging/telemetryhook_test.go
+++ b/logging/telemetryhook_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -225,5 +225,10 @@ func TestAsyncTelemetryHook_QueueDepth(t *testing.T) {
close(filling)
hook.Close()
- require.Equal(t, maxDepth, len(testHook.entries()))
+ hookEntries := len(testHook.entries())
+ require.GreaterOrEqual(t, hookEntries, maxDepth)
+ // the anonymous goroutine in createAsyncHookLevels might pull an entry off the pending list before
+ // writing it off to the underlying hook. when that happens, the total number of sent entries could
+ // be one higher then the maxDepth.
+ require.LessOrEqual(t, hookEntries, maxDepth+1)
}
diff --git a/logging/telemetryspec/category.go b/logging/telemetryspec/category.go
index ed3711ab3..c7a8acf7a 100644
--- a/logging/telemetryspec/category.go
+++ b/logging/telemetryspec/category.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetryspec/event.go b/logging/telemetryspec/event.go
index 3caf35842..0fc1a3381 100644
--- a/logging/telemetryspec/event.go
+++ b/logging/telemetryspec/event.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetryspec/eventTiming.go b/logging/telemetryspec/eventTiming.go
index 06ff3991c..a43177a89 100644
--- a/logging/telemetryspec/eventTiming.go
+++ b/logging/telemetryspec/eventTiming.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetryspec/metric.go b/logging/telemetryspec/metric.go
index 349d3f972..bc75a246f 100644
--- a/logging/telemetryspec/metric.go
+++ b/logging/telemetryspec/metric.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetryspec/metric_test.go b/logging/telemetryspec/metric_test.go
index 0e096e72b..4b470c1c5 100644
--- a/logging/telemetryspec/metric_test.go
+++ b/logging/telemetryspec/metric_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/telemetryspec/operation.go b/logging/telemetryspec/operation.go
index 8213f5515..037e8fca3 100644
--- a/logging/telemetryspec/operation.go
+++ b/logging/telemetryspec/operation.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/testingLogger.go b/logging/testingLogger.go
index 09b789fb0..60696b963 100644
--- a/logging/testingLogger.go
+++ b/logging/testingLogger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/logging/usage.go b/logging/usage.go
index 6a3b9b821..6646dfbae 100644
--- a/logging/usage.go
+++ b/logging/usage.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/network.go b/netdeploy/network.go
index 6cc052f52..4266d38ab 100644
--- a/netdeploy/network.go
+++ b/netdeploy/network.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/networkTemplate.go b/netdeploy/networkTemplate.go
index 851644802..6f4cd72ad 100644
--- a/netdeploy/networkTemplate.go
+++ b/netdeploy/networkTemplate.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/networkTemplates_test.go b/netdeploy/networkTemplates_test.go
index cc31f73aa..b3f99f973 100644
--- a/netdeploy/networkTemplates_test.go
+++ b/netdeploy/networkTemplates_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/network_test.go b/netdeploy/network_test.go
index 958930fac..a4d663894 100644
--- a/netdeploy/network_test.go
+++ b/netdeploy/network_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/remote/bootstrappedNetwork.go b/netdeploy/remote/bootstrappedNetwork.go
index 9cdf934fe..3738ba466 100644
--- a/netdeploy/remote/bootstrappedNetwork.go
+++ b/netdeploy/remote/bootstrappedNetwork.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/remote/bootstrappedNetwork_test.go b/netdeploy/remote/bootstrappedNetwork_test.go
index ba1722d94..1c9f14e6e 100644
--- a/netdeploy/remote/bootstrappedNetwork_test.go
+++ b/netdeploy/remote/bootstrappedNetwork_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/remote/buildConfig.go b/netdeploy/remote/buildConfig.go
index e58eae50e..22e35e21e 100644
--- a/netdeploy/remote/buildConfig.go
+++ b/netdeploy/remote/buildConfig.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/remote/deployedNetwork.go b/netdeploy/remote/deployedNetwork.go
index 1bf4184a6..cda9b4a20 100644
--- a/netdeploy/remote/deployedNetwork.go
+++ b/netdeploy/remote/deployedNetwork.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/remote/deployedNetwork_test.go b/netdeploy/remote/deployedNetwork_test.go
index 299424943..077649ea8 100644
--- a/netdeploy/remote/deployedNetwork_test.go
+++ b/netdeploy/remote/deployedNetwork_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/remote/hostConfig.go b/netdeploy/remote/hostConfig.go
index 78fe7e3ac..d9710b80b 100644
--- a/netdeploy/remote/hostConfig.go
+++ b/netdeploy/remote/hostConfig.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/remote/hostTemplate.go b/netdeploy/remote/hostTemplate.go
index 58a00a640..faeccb3d0 100644
--- a/netdeploy/remote/hostTemplate.go
+++ b/netdeploy/remote/hostTemplate.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/remote/nodeConfig.go b/netdeploy/remote/nodeConfig.go
index 72e82356e..143271d5d 100644
--- a/netdeploy/remote/nodeConfig.go
+++ b/netdeploy/remote/nodeConfig.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/remote/nodeWalletData.go b/netdeploy/remote/nodeWalletData.go
index 97190cc75..1f08ea252 100644
--- a/netdeploy/remote/nodeWalletData.go
+++ b/netdeploy/remote/nodeWalletData.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/remote/nodecfg/nodeConfigurator.go b/netdeploy/remote/nodecfg/nodeConfigurator.go
index acca0a592..7c4bb4217 100644
--- a/netdeploy/remote/nodecfg/nodeConfigurator.go
+++ b/netdeploy/remote/nodecfg/nodeConfigurator.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/remote/nodecfg/nodeDir.go b/netdeploy/remote/nodecfg/nodeDir.go
index 863ab302c..a59b15c3a 100644
--- a/netdeploy/remote/nodecfg/nodeDir.go
+++ b/netdeploy/remote/nodecfg/nodeDir.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/netdeploy/remote/topology.go b/netdeploy/remote/topology.go
index c47eceed6..b909abda5 100644
--- a/netdeploy/remote/topology.go
+++ b/netdeploy/remote/topology.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/connPerfMon.go b/network/connPerfMon.go
index b81867722..d1b2e7219 100644
--- a/network/connPerfMon.go
+++ b/network/connPerfMon.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/connPerfMon_test.go b/network/connPerfMon_test.go
index 401b7d3ba..b323e1ec2 100644
--- a/network/connPerfMon_test.go
+++ b/network/connPerfMon_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/dialer.go b/network/dialer.go
index 202a05756..b674d6e53 100644
--- a/network/dialer.go
+++ b/network/dialer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/limited_reader_slurper.go b/network/limited_reader_slurper.go
index 7caff6730..8795579f4 100644
--- a/network/limited_reader_slurper.go
+++ b/network/limited_reader_slurper.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/limited_reader_slurper_test.go b/network/limited_reader_slurper_test.go
index e13fcacce..517069348 100644
--- a/network/limited_reader_slurper_test.go
+++ b/network/limited_reader_slurper_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/limitlistener/helper_stub_test.go b/network/limitlistener/helper_stub_test.go
new file mode 100644
index 000000000..a1430427c
--- /dev/null
+++ b/network/limitlistener/helper_stub_test.go
@@ -0,0 +1,12 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
+
+package limitlistener_test
+
+func maxOpenFiles() int {
+ return defaultMaxOpenFiles
+}
diff --git a/network/limitlistener/helper_unix_test.go b/network/limitlistener/helper_unix_test.go
new file mode 100644
index 000000000..9cae78912
--- /dev/null
+++ b/network/limitlistener/helper_unix_test.go
@@ -0,0 +1,18 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+
+package limitlistener_test
+
+import "syscall"
+
+func maxOpenFiles() int {
+ var rlim syscall.Rlimit
+ if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlim); err != nil {
+ return defaultMaxOpenFiles
+ }
+ return int(rlim.Cur)
+}
diff --git a/network/limitlistener/helper_windows_test.go b/network/limitlistener/helper_windows_test.go
new file mode 100644
index 000000000..c67e20d4a
--- /dev/null
+++ b/network/limitlistener/helper_windows_test.go
@@ -0,0 +1,9 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package limitlistener_test
+
+func maxOpenFiles() int {
+ return 4 * defaultMaxOpenFiles /* actually it's 16581375 */
+}
diff --git a/network/limitlistener/rejectingLimitListener.go b/network/limitlistener/rejectingLimitListener.go
new file mode 100644
index 000000000..60d89199c
--- /dev/null
+++ b/network/limitlistener/rejectingLimitListener.go
@@ -0,0 +1,85 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// RejectingLimitListener is a modification of LimitListener in
+// "golang.org/x/net/netutil". The difference is that when the number of connections
+// exceeds the limit, RejectingLimitListener will accept and immediately close all
+// new connections.
+
+package limitlistener
+
+import (
+ "errors"
+ "fmt"
+ "net"
+ "sync"
+
+ "github.com/algorand/go-algorand/logging"
+)
+
+// RejectingLimitListener returns a Listener that accepts at most n simultaneous
+// connections from the provided Listener. `log` can be nil.
+func RejectingLimitListener(l net.Listener, n uint64, log logging.Logger) net.Listener {
+ return &rejectingLimitListener{
+ Listener: l,
+ log: log,
+ sem: make(chan struct{}, n),
+ done: make(chan struct{}),
+ }
+}
+
+type rejectingLimitListener struct {
+ net.Listener
+ log logging.Logger
+ sem chan struct{}
+ closeOnce sync.Once // ensures the done chan is only closed once
+ done chan struct{} // no values sent; closed when Close is called
+}
+
+func (l *rejectingLimitListener) release() {
+ <-l.sem
+}
+
+func (l *rejectingLimitListener) Accept() (net.Conn, error) {
+ for {
+ select {
+ case <-l.done:
+ return nil, errors.New("Accept() limit listener is closed")
+ default:
+ c, err := l.Listener.Accept()
+ if err != nil {
+ return nil, fmt.Errorf("Accept() accept err: %w", err)
+ }
+ select {
+ case l.sem <- struct{}{}:
+ return &rejectingLimitListenerConn{Conn: c, release: l.release}, nil
+ default:
+ // Close connection immediately.
+ err = c.Close()
+ if (err != nil) && (l.log != nil) {
+ l.log.Debugf(
+ "rejectingLimitListener.Accept() failed to close connection, err %v", err)
+ }
+ }
+ }
+ }
+}
+
+func (l *rejectingLimitListener) Close() error {
+ err := l.Listener.Close()
+ l.closeOnce.Do(func() { close(l.done) })
+ return err
+}
+
+type rejectingLimitListenerConn struct {
+ net.Conn
+ releaseOnce sync.Once
+ release func()
+}
+
+func (l *rejectingLimitListenerConn) Close() error {
+ err := l.Conn.Close()
+ l.releaseOnce.Do(l.release)
+ return err
+}
diff --git a/network/limitlistener/rejectingLimitListener_test.go b/network/limitlistener/rejectingLimitListener_test.go
new file mode 100644
index 000000000..7f286e13d
--- /dev/null
+++ b/network/limitlistener/rejectingLimitListener_test.go
@@ -0,0 +1,144 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package limitlistener_test
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "net"
+ "net/http"
+ "testing"
+ "time"
+
+ "github.com/algorand/go-algorand/network/limitlistener"
+ "github.com/algorand/go-algorand/test/partitiontest"
+)
+
+const defaultMaxOpenFiles = 256
+const timeout = 5 * time.Second
+
+func TestRejectingLimitListenerBasic(t *testing.T) {
+ partitiontest.PartitionTest(t)
+
+ const limit = 5
+ attempts := (maxOpenFiles() - limit) / 2
+ if attempts > 256 { // maximum length of accept queue is 128 by default
+ attempts = 256
+ }
+
+ l, err := net.Listen("tcp", "127.0.0.1:0")
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer l.Close()
+ l = limitlistener.RejectingLimitListener(l, limit, nil)
+
+ server := http.Server{}
+ handlerCh := make(chan struct{})
+ server.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ <-handlerCh
+ fmt.Fprint(w, "some body")
+ })
+ go server.Serve(l)
+ defer server.Close()
+
+ for i := 0; i < 3; i++ {
+ queryCh := make(chan error)
+ for j := 0; j < attempts; j++ {
+ go func() {
+ c := http.Client{}
+ r, err := c.Get("http://" + l.Addr().String())
+ if err != nil {
+ queryCh <- err
+ return
+ }
+
+ io.Copy(ioutil.Discard, r.Body)
+ r.Body.Close()
+
+ queryCh <- nil
+ }()
+ }
+
+ for j := 0; j < attempts-limit; j++ {
+ err := <-queryCh
+ if err == nil {
+ t.Errorf("this connection should have failed")
+ }
+ }
+
+ for j := 0; j < limit; j++ {
+ handlerCh <- struct{}{}
+ err := <-queryCh
+ if err != nil {
+ t.Errorf("this connection should have been successful, err: %v", err)
+ }
+ }
+
+ // Give the rejecting limit listener time to update its semaphor.
+ time.Sleep(time.Millisecond)
+ }
+}
+
+type errorListener struct {
+ net.Listener
+}
+
+func (errorListener) Accept() (net.Conn, error) {
+ return nil, errFake
+}
+
+var errFake = errors.New("fake error from errorListener")
+
+func TestRejectingLimitListenerBaseListenerError(t *testing.T) {
+ partitiontest.PartitionTest(t)
+
+ errCh := make(chan error, 1)
+ go func() {
+ defer close(errCh)
+ const n = 2
+ ll := limitlistener.RejectingLimitListener(errorListener{}, n, nil)
+ for i := 0; i < n+1; i++ {
+ _, err := ll.Accept()
+ if !errors.Is(err, errFake) {
+ errCh <- fmt.Errorf("Accept error %v doesn't contain errFake", err)
+ return
+ }
+ }
+ }()
+
+ select {
+ case err, ok := <-errCh:
+ if ok {
+ t.Fatalf("server: %v", err)
+ }
+ case <-time.After(timeout):
+ t.Fatal("timeout. deadlock?")
+ }
+}
+
+func TestRejectingLimitListenerClose(t *testing.T) {
+ partitiontest.PartitionTest(t)
+
+ ln, err := net.Listen("tcp", "127.0.0.1:0")
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer ln.Close()
+ ln = limitlistener.RejectingLimitListener(ln, 1, nil)
+
+ err = ln.Close()
+ if err != nil {
+ t.Errorf("unsuccessful ln.Close()")
+ }
+
+ c, err := ln.Accept()
+ if err == nil {
+ c.Close()
+ t.Errorf("unexpected successful Accept()")
+ }
+}
diff --git a/network/messageFilter.go b/network/messageFilter.go
index c559df848..c497b2770 100644
--- a/network/messageFilter.go
+++ b/network/messageFilter.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/messageFilter_test.go b/network/messageFilter_test.go
index fc1190728..15ce99b9a 100644
--- a/network/messageFilter_test.go
+++ b/network/messageFilter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/messagetracer/graphtrace.go b/network/messagetracer/graphtrace.go
index 9005ceacc..8a9269801 100644
--- a/network/messagetracer/graphtrace.go
+++ b/network/messagetracer/graphtrace.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/messagetracer/interface.go b/network/messagetracer/interface.go
index 0aafdc017..567a7860b 100644
--- a/network/messagetracer/interface.go
+++ b/network/messagetracer/interface.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/msgOfInterest.go b/network/msgOfInterest.go
index bdf277127..2345ab20f 100644
--- a/network/msgOfInterest.go
+++ b/network/msgOfInterest.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/msgOfInterest_test.go b/network/msgOfInterest_test.go
index ba3fe798b..971886b54 100644
--- a/network/msgOfInterest_test.go
+++ b/network/msgOfInterest_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/multiplexer.go b/network/multiplexer.go
index a31d97b36..cc25efd3e 100644
--- a/network/multiplexer.go
+++ b/network/multiplexer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/multiplexer_test.go b/network/multiplexer_test.go
index cd5bca0c2..58ce88bec 100644
--- a/network/multiplexer_test.go
+++ b/network/multiplexer_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/netprio.go b/network/netprio.go
index fc7e82302..bc512afa0 100644
--- a/network/netprio.go
+++ b/network/netprio.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/netprio_test.go b/network/netprio_test.go
index 8035b9bc8..ff02d4abb 100644
--- a/network/netprio_test.go
+++ b/network/netprio_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/peersheap.go b/network/peersheap.go
index afc1c45dc..dfc572aae 100644
--- a/network/peersheap.go
+++ b/network/peersheap.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/phonebook.go b/network/phonebook.go
index ea08d1bba..656bf9c6d 100644
--- a/network/phonebook.go
+++ b/network/phonebook.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/phonebook_test.go b/network/phonebook_test.go
index 69a971bfe..b1d6c35f4 100644
--- a/network/phonebook_test.go
+++ b/network/phonebook_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/rateLimitingTransport.go b/network/rateLimitingTransport.go
index ae77e2b9c..2ec611865 100644
--- a/network/rateLimitingTransport.go
+++ b/network/rateLimitingTransport.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/requestLogger.go b/network/requestLogger.go
index 7b4d9c014..b455de85c 100644
--- a/network/requestLogger.go
+++ b/network/requestLogger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/requestLogger_test.go b/network/requestLogger_test.go
index f65099dc3..b45d985df 100644
--- a/network/requestLogger_test.go
+++ b/network/requestLogger_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/requestTracker.go b/network/requestTracker.go
index 0fade36e3..13cb2f205 100644
--- a/network/requestTracker.go
+++ b/network/requestTracker.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/requestTracker_test.go b/network/requestTracker_test.go
index 0016969fa..8e9a03eb3 100644
--- a/network/requestTracker_test.go
+++ b/network/requestTracker_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/topics.go b/network/topics.go
index 6fd023e46..f52dede87 100644
--- a/network/topics.go
+++ b/network/topics.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/topics_test.go b/network/topics_test.go
index a98d21f2a..07b29d09e 100644
--- a/network/topics_test.go
+++ b/network/topics_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/wsNetwork.go b/network/wsNetwork.go
index 9f4a1b281..7768addf2 100644
--- a/network/wsNetwork.go
+++ b/network/wsNetwork.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -39,12 +39,12 @@ import (
"github.com/algorand/go-deadlock"
"github.com/algorand/websocket"
"github.com/gorilla/mux"
- "golang.org/x/net/netutil"
"github.com/algorand/go-algorand/config"
"github.com/algorand/go-algorand/crypto"
"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-algorand/logging/telemetryspec"
+ "github.com/algorand/go-algorand/network/limitlistener"
"github.com/algorand/go-algorand/protocol"
tools_network "github.com/algorand/go-algorand/tools/network"
"github.com/algorand/go-algorand/tools/network/dnssec"
@@ -77,9 +77,6 @@ const httpServerIdleTimeout = time.Second * 4
// size of the request body.
const httpServerMaxHeaderBytes = 4096
-// MaxInt is the maximum int which might be int32 or int64
-const MaxInt = int((^uint(0)) >> 1)
-
// connectionActivityMonitorInterval is the interval at which we check
// if any of the connected peers have been idle for a long while and
// need to be disconnected.
@@ -734,11 +731,6 @@ func (wn *WebsocketNetwork) setup() {
// Start makes network connections and threads
func (wn *WebsocketNetwork) Start() {
- var err error
- if wn.config.IncomingConnectionsLimit < 0 {
- wn.config.IncomingConnectionsLimit = MaxInt
- }
-
wn.messagesOfInterestMu.Lock()
defer wn.messagesOfInterestMu.Unlock()
wn.messagesOfInterestEncoded = true
@@ -746,15 +738,6 @@ func (wn *WebsocketNetwork) Start() {
wn.messagesOfInterestEnc = MarshallMessageOfInterestMap(wn.messagesOfInterest)
}
- // Make sure we do not accept more incoming connections than our
- // open file rlimit, with some headroom for other FDs (DNS, log
- // files, SQLite files, telemetry, ...)
- err = wn.rlimitIncomingConnections()
- if err != nil {
- wn.log.Error("ws network start: rlimitIncomingConnections ", err)
- return
- }
-
if wn.config.NetAddress != "" {
listener, err := net.Listen("tcp", wn.config.NetAddress)
if err != nil {
@@ -762,7 +745,8 @@ func (wn *WebsocketNetwork) Start() {
return
}
// wrap the original listener with a limited connection listener
- listener = netutil.LimitListener(listener, wn.config.IncomingConnectionsLimit)
+ listener = limitlistener.RejectingLimitListener(
+ listener, uint64(wn.config.IncomingConnectionsLimit), wn.log)
// wrap the limited connection listener with a requests tracker listener
wn.listener = wn.requestsTracker.Listener(listener)
wn.log.Debugf("listening on %s", wn.listener.Addr().String())
diff --git a/network/wsNetwork_common.go b/network/wsNetwork_common.go
deleted file mode 100644
index 67f219b29..000000000
--- a/network/wsNetwork_common.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
-// This file is part of go-algorand
-//
-// go-algorand is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as
-// published by the Free Software Foundation, either version 3 of the
-// License, or (at your option) any later version.
-//
-// go-algorand is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with go-algorand. If not, see <https://www.gnu.org/licenses/>.
-
-// +build !windows
-
-package network
-
-import (
- "runtime"
-
- "golang.org/x/sys/unix"
-)
-
-func (wn *WebsocketNetwork) rlimitIncomingConnections() error {
- var lim unix.Rlimit
- err := unix.Getrlimit(unix.RLIMIT_NOFILE, &lim)
- if err != nil {
- return err
- }
-
- // If rlim_max is not sufficient, reduce IncomingConnectionsLimit
- var rlimitMaxCap uint64
- if lim.Max < wn.config.ReservedFDs {
- rlimitMaxCap = 0
- } else {
- rlimitMaxCap = lim.Max - wn.config.ReservedFDs
- }
- if rlimitMaxCap > uint64(MaxInt) {
- rlimitMaxCap = uint64(MaxInt)
- }
- if wn.config.IncomingConnectionsLimit > int(rlimitMaxCap) {
- wn.log.Warnf("Reducing IncomingConnectionsLimit from %d to %d since RLIMIT_NOFILE is %d",
- wn.config.IncomingConnectionsLimit, rlimitMaxCap, lim.Max)
- wn.config.IncomingConnectionsLimit = int(rlimitMaxCap)
- }
-
- // Set rlim_cur to match IncomingConnectionsLimit
- newLimit := uint64(wn.config.IncomingConnectionsLimit) + wn.config.ReservedFDs
- if newLimit > lim.Cur {
- if runtime.GOOS == "darwin" && newLimit > 10240 && lim.Max == 0x7fffffffffffffff {
- // The max file limit is 10240, even though
- // the max returned by Getrlimit is 1<<63-1.
- // This is OPEN_MAX in sys/syslimits.h.
- // see https://github.com/golang/go/issues/30401
- newLimit = 10240
- }
- lim.Cur = newLimit
- err = unix.Setrlimit(unix.RLIMIT_NOFILE, &lim)
- if err != nil {
- return err
- }
- }
-
- return nil
-}
diff --git a/network/wsNetwork_test.go b/network/wsNetwork_test.go
index 74c690241..f7e5db2da 100644
--- a/network/wsNetwork_test.go
+++ b/network/wsNetwork_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -108,7 +108,6 @@ func init() {
defaultConfig.GossipFanout = 4
defaultConfig.NetAddress = "127.0.0.1:0"
defaultConfig.BaseLoggerDebugLevel = uint32(logging.Debug)
- defaultConfig.IncomingConnectionsLimit = -1
defaultConfig.DNSBootstrapID = ""
defaultConfig.MaxConnectionsPerIP = 30
}
diff --git a/network/wsNetwork_windows.go b/network/wsNetwork_windows.go
deleted file mode 100644
index eef416d3e..000000000
--- a/network/wsNetwork_windows.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
-// This file is part of go-algorand
-//
-// go-algorand is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as
-// published by the Free Software Foundation, either version 3 of the
-// License, or (at your option) any later version.
-//
-// go-algorand is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with go-algorand. If not, see <https://www.gnu.org/licenses/>.
-
-// +build windows
-
-package network
-
-func (wn *WebsocketNetwork) rlimitIncomingConnections() error {
- return nil
-}
diff --git a/network/wsPeer.go b/network/wsPeer.go
index f476cfa7e..e0d209c41 100644
--- a/network/wsPeer.go
+++ b/network/wsPeer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/network/wsPeer_test.go b/network/wsPeer_test.go
index 0570325b9..60a0e3a79 100644
--- a/network/wsPeer_test.go
+++ b/network/wsPeer_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/node/assemble_test.go b/node/assemble_test.go
index 5f7dae7d5..3a3d3979a 100644
--- a/node/assemble_test.go
+++ b/node/assemble_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/node/error.go b/node/error.go
index 713ebf514..02bf72505 100644
--- a/node/error.go
+++ b/node/error.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/node/impls.go b/node/impls.go
index d7ced370b..2b60cf04b 100644
--- a/node/impls.go
+++ b/node/impls.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/node/indexer/db.go b/node/indexer/db.go
index f0c5a42d3..9c74d4ae1 100644
--- a/node/indexer/db.go
+++ b/node/indexer/db.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/node/indexer/indexer.go b/node/indexer/indexer.go
index 5d90acc7b..c022d48ef 100644
--- a/node/indexer/indexer.go
+++ b/node/indexer/indexer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/node/indexer/indexer_test.go b/node/indexer/indexer_test.go
index 910ada11a..d8fbea077 100644
--- a/node/indexer/indexer_test.go
+++ b/node/indexer/indexer_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/node/netprio.go b/node/netprio.go
index d3a4e99b6..c8d7031a6 100644
--- a/node/netprio.go
+++ b/node/netprio.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/node/node.go b/node/node.go
index e5a2f7e6a..119f36aa0 100644
--- a/node/node.go
+++ b/node/node.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -159,7 +159,6 @@ type TxnWithStatus struct {
// MakeFull sets up an Algorand full node
// (i.e., it returns a node that participates in consensus)
func MakeFull(log logging.Logger, rootDir string, cfg config.Local, phonebookAddresses []string, genesis bookkeeping.Genesis) (*AlgorandFullNode, error) {
-
node := new(AlgorandFullNode)
node.rootDir = rootDir
node.log = log.With("name", cfg.NetAddress)
@@ -786,23 +785,23 @@ func (node *AlgorandFullNode) ListParticipationKeys() (partKeys []account.Partic
}
// GetParticipationKey retries the information of a participation id from the node
-func (node *AlgorandFullNode) GetParticipationKey(partKey account.ParticipationID) (account.ParticipationRecord, error) {
- rval := node.accountManager.Registry().Get(partKey)
+func (node *AlgorandFullNode) GetParticipationKey(partKeyID account.ParticipationID) (account.ParticipationRecord, error) {
+ rval := node.accountManager.Registry().Get(partKeyID)
if rval.IsZero() {
return account.ParticipationRecord{}, account.ErrParticipationIDNotFound
}
- return node.accountManager.Registry().Get(partKey), nil
+ return rval, nil
}
// RemoveParticipationKey given a participation id, remove the records from the node
-func (node *AlgorandFullNode) RemoveParticipationKey(partKey account.ParticipationID) error {
+func (node *AlgorandFullNode) RemoveParticipationKey(partKeyID account.ParticipationID) error {
// Need to remove the file and then remove the entry in the registry
// Let's first get the recorded information from the registry so we can lookup the file
- partRecord := node.accountManager.Registry().Get(partKey)
+ partRecord := node.accountManager.Registry().Get(partKeyID)
if partRecord.IsZero() {
return account.ErrParticipationIDNotFound
@@ -815,7 +814,7 @@ func (node *AlgorandFullNode) RemoveParticipationKey(partKey account.Participati
filename := config.PartKeyFilename(partRecord.ParticipationID.String(), uint64(partRecord.FirstValid), uint64(partRecord.LastValid))
fullyQualifiedFilename := filepath.Join(outDir, filepath.Base(filename))
- err := node.accountManager.Registry().Delete(partKey)
+ err := node.accountManager.Registry().Delete(partKeyID)
if err != nil {
return err
}
@@ -834,6 +833,19 @@ func (node *AlgorandFullNode) RemoveParticipationKey(partKey account.Participati
return nil
}
+// AppendParticipationKeys given a participation id, remove the records from the node
+func (node *AlgorandFullNode) AppendParticipationKeys(partKeyID account.ParticipationID, keys account.StateProofKeys) error {
+ err := node.accountManager.Registry().AppendKeys(partKeyID, keys)
+ if err != nil {
+ return err
+ }
+
+ // PKI TODO: pick a better timeout, this is just something short. This could also be removed if we change
+ // POST /v2/participation and DELETE /v2/participation to return "202 OK Accepted" instead of waiting and getting
+ // the error message.
+ return node.accountManager.Registry().Flush(500 * time.Millisecond)
+}
+
func createTemporaryParticipationKey(outDir string, partKeyBinary []byte) (string, error) {
var sb strings.Builder
diff --git a/node/node_test.go b/node/node_test.go
index bfd33a8f0..6dfdd1d90 100644
--- a/node/node_test.go
+++ b/node/node_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -57,7 +57,7 @@ var defaultConfig = config.Local{
}
func setupFullNodes(t *testing.T, proto protocol.ConsensusVersion, verificationPool execpool.BacklogPool, customConsensus config.ConsensusProtocols) ([]*AlgorandFullNode, []string, []string) {
- util.RaiseRlimit(1000)
+ util.SetFdSoftLimit(1000)
f, _ := os.Create(t.Name() + ".log")
logging.Base().SetJSONFormatter()
logging.Base().SetOutput(f)
diff --git a/node/poolStats.go b/node/poolStats.go
index c571c4251..19b0090b4 100644
--- a/node/poolStats.go
+++ b/node/poolStats.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/node/topAccountListener.go b/node/topAccountListener.go
index 416045c17..a0b90e0c5 100644
--- a/node/topAccountListener.go
+++ b/node/topAccountListener.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/node/topAccountListener_test.go b/node/topAccountListener_test.go
index 6faaa5f9d..2c25f85f7 100644
--- a/node/topAccountListener_test.go
+++ b/node/topAccountListener_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/nodecontrol/LaggedStdIo.go b/nodecontrol/LaggedStdIo.go
index 1ff69a69a..4738452f3 100644
--- a/nodecontrol/LaggedStdIo.go
+++ b/nodecontrol/LaggedStdIo.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/nodecontrol/NodeController.go b/nodecontrol/NodeController.go
index 77798a4ee..b1044b43d 100644
--- a/nodecontrol/NodeController.go
+++ b/nodecontrol/NodeController.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/nodecontrol/algodControl.go b/nodecontrol/algodControl.go
index d6aed9f48..872fa05a4 100644
--- a/nodecontrol/algodControl.go
+++ b/nodecontrol/algodControl.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/nodecontrol/algodControl_test.go b/nodecontrol/algodControl_test.go
index 2349e9c45..80c231ba7 100644
--- a/nodecontrol/algodControl_test.go
+++ b/nodecontrol/algodControl_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/nodecontrol/kmdControl.go b/nodecontrol/kmdControl.go
index 08fd8a2c3..f55b16876 100644
--- a/nodecontrol/kmdControl.go
+++ b/nodecontrol/kmdControl.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/nodecontrol/kmdControl_common.go b/nodecontrol/kmdControl_common.go
index 947ccd80a..a73c75746 100644
--- a/nodecontrol/kmdControl_common.go
+++ b/nodecontrol/kmdControl_common.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/nodecontrol/kmdControl_windows.go b/nodecontrol/kmdControl_windows.go
index 601cba07f..fbb34a296 100644
--- a/nodecontrol/kmdControl_windows.go
+++ b/nodecontrol/kmdControl_windows.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/nodecontrol/nodeControlErrors.go b/nodecontrol/nodeControlErrors.go
index 74f62d14e..6ed43d56a 100644
--- a/nodecontrol/nodeControlErrors.go
+++ b/nodecontrol/nodeControlErrors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/protocol/codec.go b/protocol/codec.go
index 85944c022..10a412044 100644
--- a/protocol/codec.go
+++ b/protocol/codec.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/protocol/codec_test.go b/protocol/codec_test.go
index 14fef6187..79814dadc 100644
--- a/protocol/codec_test.go
+++ b/protocol/codec_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/protocol/codec_tester.go b/protocol/codec_tester.go
index 9fcbf7c35..f507cebb9 100644
--- a/protocol/codec_tester.go
+++ b/protocol/codec_tester.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/protocol/compactcerts.go b/protocol/compactcerts.go
index e3a56c91a..06e1e3b18 100644
--- a/protocol/compactcerts.go
+++ b/protocol/compactcerts.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/protocol/consensus.go b/protocol/consensus.go
index 3af634534..26bcf4b85 100644
--- a/protocol/consensus.go
+++ b/protocol/consensus.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/protocol/encodebench_test.go b/protocol/encodebench_test.go
index cb8e5a541..3c015bf6b 100644
--- a/protocol/encodebench_test.go
+++ b/protocol/encodebench_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/protocol/hash.go b/protocol/hash.go
index 77d1a2b2f..1549e6fcc 100644
--- a/protocol/hash.go
+++ b/protocol/hash.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/protocol/networks.go b/protocol/networks.go
index c573a77fe..ff1c8ee0f 100644
--- a/protocol/networks.go
+++ b/protocol/networks.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/protocol/tags.go b/protocol/tags.go
index 0cab25628..8ae6cfe56 100644
--- a/protocol/tags.go
+++ b/protocol/tags.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/protocol/test/allocbound_slice.go b/protocol/test/allocbound_slice.go
index 12ee01dfe..c825a7d25 100644
--- a/protocol/test/allocbound_slice.go
+++ b/protocol/test/allocbound_slice.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/protocol/transcode/core.go b/protocol/transcode/core.go
index d1e4fd012..863fbabf9 100644
--- a/protocol/transcode/core.go
+++ b/protocol/transcode/core.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/protocol/transcode/core_test.go b/protocol/transcode/core_test.go
index 330ea6655..132c4270a 100644
--- a/protocol/transcode/core_test.go
+++ b/protocol/transcode/core_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/protocol/txntype.go b/protocol/txntype.go
index 919c576d4..1b50dab8e 100644
--- a/protocol/txntype.go
+++ b/protocol/txntype.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/rpcs/blockService.go b/rpcs/blockService.go
index 698751b25..80c7f2338 100644
--- a/rpcs/blockService.go
+++ b/rpcs/blockService.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/rpcs/blockService_test.go b/rpcs/blockService_test.go
index 828f2265a..e9c8791ae 100644
--- a/rpcs/blockService_test.go
+++ b/rpcs/blockService_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/rpcs/httpTxSync.go b/rpcs/httpTxSync.go
index 390d0751d..63b99c8a6 100644
--- a/rpcs/httpTxSync.go
+++ b/rpcs/httpTxSync.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/rpcs/ledgerService.go b/rpcs/ledgerService.go
index 8a8500c57..582dd89b4 100644
--- a/rpcs/ledgerService.go
+++ b/rpcs/ledgerService.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/rpcs/registrar.go b/rpcs/registrar.go
index 7c4fbd43b..1e782d802 100644
--- a/rpcs/registrar.go
+++ b/rpcs/registrar.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/rpcs/txService.go b/rpcs/txService.go
index df08114c6..e621d6541 100644
--- a/rpcs/txService.go
+++ b/rpcs/txService.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/rpcs/txService_test.go b/rpcs/txService_test.go
index fd92b83a1..4db86d10c 100644
--- a/rpcs/txService_test.go
+++ b/rpcs/txService_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/rpcs/txSyncer.go b/rpcs/txSyncer.go
index 0290d82a6..34d054d40 100644
--- a/rpcs/txSyncer.go
+++ b/rpcs/txSyncer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/rpcs/txSyncer_test.go b/rpcs/txSyncer_test.go
index 9b89fda1b..d4b0d2fbc 100644
--- a/rpcs/txSyncer_test.go
+++ b/rpcs/txSyncer_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/shared/algoh/config.go b/shared/algoh/config.go
index adab8a8df..687fd1be2 100644
--- a/shared/algoh/config.go
+++ b/shared/algoh/config.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/shared/pingpong/accounts.go b/shared/pingpong/accounts.go
index ba208abcc..402ee48de 100644
--- a/shared/pingpong/accounts.go
+++ b/shared/pingpong/accounts.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/shared/pingpong/config.go b/shared/pingpong/config.go
index 21841ed20..73ad4e4ec 100644
--- a/shared/pingpong/config.go
+++ b/shared/pingpong/config.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/shared/pingpong/pingpong.go b/shared/pingpong/pingpong.go
index 6780d13b3..9c1b72cac 100644
--- a/shared/pingpong/pingpong.go
+++ b/shared/pingpong/pingpong.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/commandandcontrol/cc_agent/component/agent.go b/test/commandandcontrol/cc_agent/component/agent.go
index f467c9303..fb1bc504a 100644
--- a/test/commandandcontrol/cc_agent/component/agent.go
+++ b/test/commandandcontrol/cc_agent/component/agent.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/commandandcontrol/cc_agent/component/agent_test.go b/test/commandandcontrol/cc_agent/component/agent_test.go
index 0fb21f0dc..7ca805eb7 100644
--- a/test/commandandcontrol/cc_agent/component/agent_test.go
+++ b/test/commandandcontrol/cc_agent/component/agent_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/commandandcontrol/cc_agent/component/pingPongComponent.go b/test/commandandcontrol/cc_agent/component/pingPongComponent.go
index 155060c97..7f992e793 100644
--- a/test/commandandcontrol/cc_agent/component/pingPongComponent.go
+++ b/test/commandandcontrol/cc_agent/component/pingPongComponent.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/commandandcontrol/cc_agent/main.go b/test/commandandcontrol/cc_agent/main.go
index 8e5ef9a3c..a64ca804e 100644
--- a/test/commandandcontrol/cc_agent/main.go
+++ b/test/commandandcontrol/cc_agent/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/commandandcontrol/cc_client/main.go b/test/commandandcontrol/cc_client/main.go
index b144b685c..c45fec1b8 100644
--- a/test/commandandcontrol/cc_client/main.go
+++ b/test/commandandcontrol/cc_client/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/commandandcontrol/cc_service/main.go b/test/commandandcontrol/cc_service/main.go
index e42c16933..a95130320 100644
--- a/test/commandandcontrol/cc_service/main.go
+++ b/test/commandandcontrol/cc_service/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/commandandcontrol/lib/ccCommon.go b/test/commandandcontrol/lib/ccCommon.go
index 5088549e3..f3db52a51 100644
--- a/test/commandandcontrol/lib/ccCommon.go
+++ b/test/commandandcontrol/lib/ccCommon.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/algod/cleanup_test.go b/test/e2e-go/cli/algod/cleanup_test.go
index bfad64877..24b77e7d9 100644
--- a/test/e2e-go/cli/algod/cleanup_test.go
+++ b/test/e2e-go/cli/algod/cleanup_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/algod/expect/algod_expect_test.go b/test/e2e-go/cli/algod/expect/algod_expect_test.go
index fd1568096..ec69fc715 100644
--- a/test/e2e-go/cli/algod/expect/algod_expect_test.go
+++ b/test/e2e-go/cli/algod/expect/algod_expect_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/algod/stdstreams_test.go b/test/e2e-go/cli/algod/stdstreams_test.go
index 08f2a3613..cb335cad6 100644
--- a/test/e2e-go/cli/algod/stdstreams_test.go
+++ b/test/e2e-go/cli/algod/stdstreams_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/algoh/expect/algoh_expect_test.go b/test/e2e-go/cli/algoh/expect/algoh_expect_test.go
index 004473ce7..f260a1bd6 100644
--- a/test/e2e-go/cli/algoh/expect/algoh_expect_test.go
+++ b/test/e2e-go/cli/algoh/expect/algoh_expect_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/goal/account_test.go b/test/e2e-go/cli/goal/account_test.go
index d35e30705..67165a6d0 100644
--- a/test/e2e-go/cli/goal/account_test.go
+++ b/test/e2e-go/cli/goal/account_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/goal/clerk_test.go b/test/e2e-go/cli/goal/clerk_test.go
index 73fd2daa0..948eb1a61 100644
--- a/test/e2e-go/cli/goal/clerk_test.go
+++ b/test/e2e-go/cli/goal/clerk_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/goal/common_test.go b/test/e2e-go/cli/goal/common_test.go
index af617ee80..b9d0a4b0c 100644
--- a/test/e2e-go/cli/goal/common_test.go
+++ b/test/e2e-go/cli/goal/common_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/goal/expect/catchpointCatchupWebProxy/webproxy.go b/test/e2e-go/cli/goal/expect/catchpointCatchupWebProxy/webproxy.go
index 8f7e2edaa..3090a943a 100644
--- a/test/e2e-go/cli/goal/expect/catchpointCatchupWebProxy/webproxy.go
+++ b/test/e2e-go/cli/goal/expect/catchpointCatchupWebProxy/webproxy.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/goal/expect/goal_expect_test.go b/test/e2e-go/cli/goal/expect/goal_expect_test.go
index 69964b03d..55bdf7ce6 100644
--- a/test/e2e-go/cli/goal/expect/goal_expect_test.go
+++ b/test/e2e-go/cli/goal/expect/goal_expect_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/goal/node_cleanup_test.go b/test/e2e-go/cli/goal/node_cleanup_test.go
index 8a7b8f164..8365adbe5 100644
--- a/test/e2e-go/cli/goal/node_cleanup_test.go
+++ b/test/e2e-go/cli/goal/node_cleanup_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/perf/libgoal_test.go b/test/e2e-go/cli/perf/libgoal_test.go
index 817ddeef5..a98164003 100644
--- a/test/e2e-go/cli/perf/libgoal_test.go
+++ b/test/e2e-go/cli/perf/libgoal_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/perf/payment_test.go b/test/e2e-go/cli/perf/payment_test.go
index bf5a7e8a1..1989ac3cb 100644
--- a/test/e2e-go/cli/perf/payment_test.go
+++ b/test/e2e-go/cli/perf/payment_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/tealdbg/cdtmock/main.go b/test/e2e-go/cli/tealdbg/cdtmock/main.go
index fa2791ea0..9cb3cf072 100644
--- a/test/e2e-go/cli/tealdbg/cdtmock/main.go
+++ b/test/e2e-go/cli/tealdbg/cdtmock/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/cli/tealdbg/expect/tealdbg_expect_test.go b/test/e2e-go/cli/tealdbg/expect/tealdbg_expect_test.go
index 401344a06..72248cfff 100644
--- a/test/e2e-go/cli/tealdbg/expect/tealdbg_expect_test.go
+++ b/test/e2e-go/cli/tealdbg/expect/tealdbg_expect_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/catchup/basicCatchup_test.go b/test/e2e-go/features/catchup/basicCatchup_test.go
index ab77ec7b8..ce908b9e6 100644
--- a/test/e2e-go/features/catchup/basicCatchup_test.go
+++ b/test/e2e-go/features/catchup/basicCatchup_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -331,3 +331,92 @@ func shutdownClonedNode(nodeDataDir string, f *fixtures.RestClientFixture, t *te
os.RemoveAll(nodeDataDir)
}
}
+
+// TestBasicCatchupCompletes confirms the the catchup eventually completes and stops.
+func TestBasicCatchupCompletes(t *testing.T) {
+ partitiontest.PartitionTest(t)
+ defer fixtures.ShutdownSynchronizedTest(t)
+
+ if testing.Short() {
+ t.Skip()
+ }
+ t.Parallel()
+ a := require.New(fixtures.SynchronizedTest(t))
+
+ // Make the network progress faster
+ consensus := make(config.ConsensusProtocols)
+ fastProtocol := config.Consensus[protocol.ConsensusCurrentVersion]
+ fastProtocol.ApprovedUpgrades = map[protocol.ConsensusVersion]uint64{}
+ fastProtocol.AgreementFilterTimeoutPeriod0 = 400 * time.Millisecond
+ fastProtocol.AgreementFilterTimeout = 400 * time.Millisecond
+ consensus[protocol.ConsensusCurrentVersion] = fastProtocol
+
+ // Setup the fixture with the modified fast consensus
+ var fixture fixtures.RestClientFixture
+ fixture.SetConsensus(consensus)
+ fixture.Setup(t, filepath.Join("nettemplates", "TwoNodes100Second.json"))
+ defer fixture.Shutdown()
+
+ // Get 2nd node so we wait until we know they're at target block
+ nc, err := fixture.GetNodeController("Node")
+ a.NoError(err)
+
+ // Let the network make some progress.
+ // Make it long enough so the catchup to it is longer than a single round agreement
+ a.NoError(err)
+ waitForRound := uint64(100)
+
+ // Now prepare a third node
+ cloneDataDir := filepath.Join(fixture.PrimaryDataDir(), "../clone")
+ cloneLedger := false
+ err = fixture.NC.Clone(cloneDataDir, cloneLedger)
+ a.NoError(err)
+
+ // Wait for the network to make some progess.
+ err = fixture.ClientWaitForRoundWithTimeout(fixture.GetAlgodClientForController(nc), waitForRound)
+ a.NoError(err)
+
+ // Start the third node to catchup.
+ startTime := time.Now()
+ cloneClient, err := fixture.StartNode(cloneDataDir)
+ a.NoError(err)
+ defer shutdownClonedNode(cloneDataDir, &fixture, t)
+
+ // Wait for it to catchup
+ err = fixture.LibGoalFixture.ClientWaitForRoundWithTimeout(cloneClient, waitForRound)
+ a.NoError(err)
+
+ // Calculate the catchup time
+ catchupTime := time.Since(startTime)
+
+ // Check if curStatus.CatchupTime, the "Time since last block" is less than the catchup time.
+ // - If the catchup has not stopped, this value will keep on growing, and eventually be larger than the time
+ // of a single round agreement.
+ // - If the catchup stops after it completes, this value will be the time since the last round was
+ // obtained through the agreement, and be much smaller than the catchup time.
+ client := fixture.GetAlgodClientForController(fixture.LibGoalFixture.GetNodeControllerForDataDir(cloneDataDir))
+
+ // Prevent false positive
+ // - Since obtaining the exact catchup time is not possible, wait catchupTime again, to make sure curStatus.CatchupTime
+ // will be at least our estimated catchupTime (since it keeps on growing if catchup has not stopped).
+ time.Sleep(catchupTime)
+
+ // Prevent false negative
+ // The network may have made some progress since waitForRound, it could be that the
+ // third node is still catching up even after getting to waitForRound.
+ // Moreover, it takes some time to transition from the catchup to agreement.
+ // Give it some more time and check again..
+ pass := false
+ for x := 0; x < 100; x++ {
+ curStatus, statusErr := client.Status()
+ require.NoError(t, statusErr, "fixture should be able to get node status")
+ currentStateMsec := time.Duration(curStatus.CatchupTime).Milliseconds()
+ catchupMsec := catchupTime.Milliseconds()
+ pass = currentStateMsec < catchupMsec
+ if pass {
+ break
+ }
+ time.Sleep(100 * time.Millisecond)
+ }
+ a.True(pass)
+}
diff --git a/test/e2e-go/features/catchup/catchpointCatchup_test.go b/test/e2e-go/features/catchup/catchpointCatchup_test.go
index 1548f5599..f1eb14b4e 100644
--- a/test/e2e-go/features/catchup/catchpointCatchup_test.go
+++ b/test/e2e-go/features/catchup/catchpointCatchup_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/compactcert/compactcert_test.go b/test/e2e-go/features/compactcert/compactcert_test.go
index b56897e08..cc98535b7 100644
--- a/test/e2e-go/features/compactcert/compactcert_test.go
+++ b/test/e2e-go/features/compactcert/compactcert_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/devmode/devmode_test.go b/test/e2e-go/features/devmode/devmode_test.go
index ae807a831..e5c9ab7ea 100644
--- a/test/e2e-go/features/devmode/devmode_test.go
+++ b/test/e2e-go/features/devmode/devmode_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/multisig/multisig_test.go b/test/e2e-go/features/multisig/multisig_test.go
index 14673110f..07c8f9661 100644
--- a/test/e2e-go/features/multisig/multisig_test.go
+++ b/test/e2e-go/features/multisig/multisig_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/participation/accountParticipationTransitions_test.go b/test/e2e-go/features/participation/accountParticipationTransitions_test.go
index 5b2c3ea0c..e395a1644 100644
--- a/test/e2e-go/features/participation/accountParticipationTransitions_test.go
+++ b/test/e2e-go/features/participation/accountParticipationTransitions_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/participation/onlineOfflineParticipation_test.go b/test/e2e-go/features/participation/onlineOfflineParticipation_test.go
index 7c817974e..b14d778c1 100644
--- a/test/e2e-go/features/participation/onlineOfflineParticipation_test.go
+++ b/test/e2e-go/features/participation/onlineOfflineParticipation_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/participation/overlappingParticipationKeys_test.go b/test/e2e-go/features/participation/overlappingParticipationKeys_test.go
index c98cf7a9e..771fa39a1 100644
--- a/test/e2e-go/features/participation/overlappingParticipationKeys_test.go
+++ b/test/e2e-go/features/participation/overlappingParticipationKeys_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/participation/participationExpiration_test.go b/test/e2e-go/features/participation/participationExpiration_test.go
index 915691d03..795dd9c98 100644
--- a/test/e2e-go/features/participation/participationExpiration_test.go
+++ b/test/e2e-go/features/participation/participationExpiration_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/participation/participationRewards_test.go b/test/e2e-go/features/participation/participationRewards_test.go
index b41b29397..9b4143d43 100644
--- a/test/e2e-go/features/participation/participationRewards_test.go
+++ b/test/e2e-go/features/participation/participationRewards_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/partitionRecovery/partitionRecovery_test.go b/test/e2e-go/features/partitionRecovery/partitionRecovery_test.go
index 3ec2c323d..dc549d72e 100644
--- a/test/e2e-go/features/partitionRecovery/partitionRecovery_test.go
+++ b/test/e2e-go/features/partitionRecovery/partitionRecovery_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/teal/compile_test.go b/test/e2e-go/features/teal/compile_test.go
index 4db988bd4..866e1c54d 100644
--- a/test/e2e-go/features/teal/compile_test.go
+++ b/test/e2e-go/features/teal/compile_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/transactions/accountv2_test.go b/test/e2e-go/features/transactions/accountv2_test.go
index 3cefff35d..a79c4293d 100644
--- a/test/e2e-go/features/transactions/accountv2_test.go
+++ b/test/e2e-go/features/transactions/accountv2_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/transactions/app_pages_test.go b/test/e2e-go/features/transactions/app_pages_test.go
index 2387ecfad..6c293f50d 100644
--- a/test/e2e-go/features/transactions/app_pages_test.go
+++ b/test/e2e-go/features/transactions/app_pages_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/transactions/application_test.go b/test/e2e-go/features/transactions/application_test.go
index 19de8ad39..c9a4ac131 100644
--- a/test/e2e-go/features/transactions/application_test.go
+++ b/test/e2e-go/features/transactions/application_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/transactions/asset_test.go b/test/e2e-go/features/transactions/asset_test.go
index 03cf40744..97528a3ef 100644
--- a/test/e2e-go/features/transactions/asset_test.go
+++ b/test/e2e-go/features/transactions/asset_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/transactions/close_account_test.go b/test/e2e-go/features/transactions/close_account_test.go
index 6ce754479..8787568dc 100644
--- a/test/e2e-go/features/transactions/close_account_test.go
+++ b/test/e2e-go/features/transactions/close_account_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/transactions/group_test.go b/test/e2e-go/features/transactions/group_test.go
index f17e25d37..4852da25d 100644
--- a/test/e2e-go/features/transactions/group_test.go
+++ b/test/e2e-go/features/transactions/group_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/transactions/lease_test.go b/test/e2e-go/features/transactions/lease_test.go
index 2d34d3d34..10a238e74 100644
--- a/test/e2e-go/features/transactions/lease_test.go
+++ b/test/e2e-go/features/transactions/lease_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/transactions/onlineStatusChange_test.go b/test/e2e-go/features/transactions/onlineStatusChange_test.go
index 3c12bf4c9..b9e78a5f9 100644
--- a/test/e2e-go/features/transactions/onlineStatusChange_test.go
+++ b/test/e2e-go/features/transactions/onlineStatusChange_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/transactions/proof_test.go b/test/e2e-go/features/transactions/proof_test.go
index 2ef4b8e48..754354253 100644
--- a/test/e2e-go/features/transactions/proof_test.go
+++ b/test/e2e-go/features/transactions/proof_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/features/transactions/sendReceive_test.go b/test/e2e-go/features/transactions/sendReceive_test.go
index fadf5b620..2d55d0b83 100644
--- a/test/e2e-go/features/transactions/sendReceive_test.go
+++ b/test/e2e-go/features/transactions/sendReceive_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/globals/constants.go b/test/e2e-go/globals/constants.go
index 56d507d6a..b738b6d65 100644
--- a/test/e2e-go/globals/constants.go
+++ b/test/e2e-go/globals/constants.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/kmd/e2e_kmd_server_client_test.go b/test/e2e-go/kmd/e2e_kmd_server_client_test.go
index 7b9c36ca7..eb61861bb 100644
--- a/test/e2e-go/kmd/e2e_kmd_server_client_test.go
+++ b/test/e2e-go/kmd/e2e_kmd_server_client_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/kmd/e2e_kmd_sqlite_test.go b/test/e2e-go/kmd/e2e_kmd_sqlite_test.go
index 833cc2866..496070ccb 100644
--- a/test/e2e-go/kmd/e2e_kmd_sqlite_test.go
+++ b/test/e2e-go/kmd/e2e_kmd_sqlite_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/kmd/e2e_kmd_wallet_keyops_test.go b/test/e2e-go/kmd/e2e_kmd_wallet_keyops_test.go
index 122f3203e..364dcfb03 100644
--- a/test/e2e-go/kmd/e2e_kmd_wallet_keyops_test.go
+++ b/test/e2e-go/kmd/e2e_kmd_wallet_keyops_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/kmd/e2e_kmd_wallet_multisig_test.go b/test/e2e-go/kmd/e2e_kmd_wallet_multisig_test.go
index 53fb07a02..3b43606d6 100644
--- a/test/e2e-go/kmd/e2e_kmd_wallet_multisig_test.go
+++ b/test/e2e-go/kmd/e2e_kmd_wallet_multisig_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/kmd/e2e_kmd_wallet_test.go b/test/e2e-go/kmd/e2e_kmd_wallet_test.go
index a08ff861f..4fb8f3a15 100644
--- a/test/e2e-go/kmd/e2e_kmd_wallet_test.go
+++ b/test/e2e-go/kmd/e2e_kmd_wallet_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/perf/basic_test.go b/test/e2e-go/perf/basic_test.go
index d9748e5cd..dd70d422d 100644
--- a/test/e2e-go/perf/basic_test.go
+++ b/test/e2e-go/perf/basic_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/restAPI/restClient_test.go b/test/e2e-go/restAPI/restClient_test.go
index e8aff991d..d1f41eb2b 100644
--- a/test/e2e-go/restAPI/restClient_test.go
+++ b/test/e2e-go/restAPI/restClient_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/stress/transactions/createManyAndGoOnline_test.go b/test/e2e-go/stress/transactions/createManyAndGoOnline_test.go
index 318a0f138..77c11ccb4 100644
--- a/test/e2e-go/stress/transactions/createManyAndGoOnline_test.go
+++ b/test/e2e-go/stress/transactions/createManyAndGoOnline_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/upgrades/application_support_test.go b/test/e2e-go/upgrades/application_support_test.go
index 20b7f4e05..3667cc3ce 100644
--- a/test/e2e-go/upgrades/application_support_test.go
+++ b/test/e2e-go/upgrades/application_support_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/upgrades/rekey_support_test.go b/test/e2e-go/upgrades/rekey_support_test.go
index 3def211f9..4988b79c4 100644
--- a/test/e2e-go/upgrades/rekey_support_test.go
+++ b/test/e2e-go/upgrades/rekey_support_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/e2e-go/upgrades/send_receive_upgrade_test.go b/test/e2e-go/upgrades/send_receive_upgrade_test.go
index b67a5b21d..d72563804 100644
--- a/test/e2e-go/upgrades/send_receive_upgrade_test.go
+++ b/test/e2e-go/upgrades/send_receive_upgrade_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/framework/fixtures/baseFixture.go b/test/framework/fixtures/baseFixture.go
index 6fe4da576..c14203f15 100644
--- a/test/framework/fixtures/baseFixture.go
+++ b/test/framework/fixtures/baseFixture.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/framework/fixtures/expectFixture.go b/test/framework/fixtures/expectFixture.go
index 377bce502..8d5bc9d5b 100644
--- a/test/framework/fixtures/expectFixture.go
+++ b/test/framework/fixtures/expectFixture.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/framework/fixtures/fixture.go b/test/framework/fixtures/fixture.go
index 44ad4b132..914cc092e 100644
--- a/test/framework/fixtures/fixture.go
+++ b/test/framework/fixtures/fixture.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/framework/fixtures/goalFixture.go b/test/framework/fixtures/goalFixture.go
index 20636cf17..576db08ca 100644
--- a/test/framework/fixtures/goalFixture.go
+++ b/test/framework/fixtures/goalFixture.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/framework/fixtures/kmdFixture.go b/test/framework/fixtures/kmdFixture.go
index 1226bd090..75a357f2a 100644
--- a/test/framework/fixtures/kmdFixture.go
+++ b/test/framework/fixtures/kmdFixture.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/framework/fixtures/libgoalFixture.go b/test/framework/fixtures/libgoalFixture.go
index 7e57f4bfa..38ddefbeb 100644
--- a/test/framework/fixtures/libgoalFixture.go
+++ b/test/framework/fixtures/libgoalFixture.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/framework/fixtures/restClientFixture.go b/test/framework/fixtures/restClientFixture.go
index 06a891b95..fe45f755e 100644
--- a/test/framework/fixtures/restClientFixture.go
+++ b/test/framework/fixtures/restClientFixture.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/framework/fixtures/webProxyFixture.go b/test/framework/fixtures/webProxyFixture.go
index a0cc71215..94cee4ce7 100644
--- a/test/framework/fixtures/webProxyFixture.go
+++ b/test/framework/fixtures/webProxyFixture.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/linttest/lintissues.go b/test/linttest/lintissues.go
index 1a6a43618..77b0c33c2 100644
--- a/test/linttest/lintissues.go
+++ b/test/linttest/lintissues.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/netperf-go/puppeteer/main.go b/test/netperf-go/puppeteer/main.go
index 37aa5eb55..87dbb47cf 100644
--- a/test/netperf-go/puppeteer/main.go
+++ b/test/netperf-go/puppeteer/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/netperf-go/puppeteer/promMetricFetcher.go b/test/netperf-go/puppeteer/promMetricFetcher.go
index 544421b88..64a3341a0 100644
--- a/test/netperf-go/puppeteer/promMetricFetcher.go
+++ b/test/netperf-go/puppeteer/promMetricFetcher.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/netperf-go/puppeteer/promMetricFetcher_test.go b/test/netperf-go/puppeteer/promMetricFetcher_test.go
index 3cea5e687..86579f86f 100644
--- a/test/netperf-go/puppeteer/promMetricFetcher_test.go
+++ b/test/netperf-go/puppeteer/promMetricFetcher_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/netperf-go/puppeteer/puppeteer.go b/test/netperf-go/puppeteer/puppeteer.go
index d5ee41472..bcc870672 100644
--- a/test/netperf-go/puppeteer/puppeteer.go
+++ b/test/netperf-go/puppeteer/puppeteer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/netperf-go/puppeteer/puppeteer_test.go b/test/netperf-go/puppeteer/puppeteer_test.go
index 979e7f3cf..7bf89cddc 100644
--- a/test/netperf-go/puppeteer/puppeteer_test.go
+++ b/test/netperf-go/puppeteer/puppeteer_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/netperf-go/puppeteer/roundpoller.go b/test/netperf-go/puppeteer/roundpoller.go
index e2c229f2f..f4d689f6f 100644
--- a/test/netperf-go/puppeteer/roundpoller.go
+++ b/test/netperf-go/puppeteer/roundpoller.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/partitiontest/filtering.go b/test/partitiontest/filtering.go
index 74a263aaa..0af5e2e14 100644
--- a/test/partitiontest/filtering.go
+++ b/test/partitiontest/filtering.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/test/scripts/e2e_subs/e2e-app-abi-method.sh b/test/scripts/e2e_subs/e2e-app-abi-method.sh
index 72bf746dd..46cc5406a 100755
--- a/test/scripts/e2e_subs/e2e-app-abi-method.sh
+++ b/test/scripts/e2e_subs/e2e-app-abi-method.sh
@@ -16,9 +16,18 @@ gcmd="goal -w ${WALLET}"
ACCOUNT=$(${gcmd} account list|awk '{ print $3 }')
-printf '#pragma version 2\nint 1' > "${TEMPDIR}/simple.teal"
-PROGRAM=($(${gcmd} clerk compile "${TEMPDIR}/simple.teal"))
-APPID=$(${gcmd} app create --creator ${ACCOUNT} --approval-prog ${DIR}/tealprogs/app-abi-method-example.teal --clear-prog ${TEMPDIR}/simple.teal --global-byteslices 0 --global-ints 0 --local-byteslices 1 --local-ints 0 | grep Created | awk '{ print $6 }')
+printf '#pragma version 2\nint 1' > "${TEMPDIR}/simple-v2.teal"
+printf '#pragma version 3\nint 1' > "${TEMPDIR}/simple-v3.teal"
+
+# Create
+RES=$(${gcmd} app method --method "create(uint64)uint64" --arg "1234" --create --approval-prog ${DIR}/tealprogs/app-abi-method-example.teal --clear-prog ${TEMPDIR}/simple-v2.teal --global-byteslices 0 --global-ints 0 --local-byteslices 1 --local-ints 0 --extra-pages 0 --from $ACCOUNT 2>&1 || true)
+EXPECTED="method create(uint64)uint64 succeeded with output: 2468"
+if [[ $RES != *"${EXPECTED}"* ]]; then
+ date '+app-abi-method-test FAIL the method call to create(uint64)uint64 should not fail %Y%m%d_%H%M%S'
+ false
+fi
+
+APPID=$(echo "$RES" | grep Created | awk '{ print $6 }')
# Opt in
RES=$(${gcmd} app method --method "optIn(string)string" --arg "\"Algorand Fan\"" --on-completion optin --app-id $APPID --from $ACCOUNT 2>&1 || true)
@@ -28,6 +37,14 @@ if [[ $RES != *"${EXPECTED}"* ]]; then
false
fi
+# No arguments or return value
+RES=$(${gcmd} app method --method "empty()void" --app-id $APPID --from $ACCOUNT 2>&1 || true)
+EXPECTED="method empty()void succeeded"
+if [[ $RES != *"${EXPECTED}" ]]; then
+ date '+app-abi-method-test FAIL the method call to empty()void should not fail %Y%m%d_%H%M%S'
+ false
+fi
+
# 1 + 2 = 3
RES=$(${gcmd} app method --method "add(uint64,uint64)uint64" --arg 1 --arg 2 --app-id $APPID --from $ACCOUNT 2>&1 || true)
EXPECTED="method add(uint64,uint64)uint64 succeeded with output: 3"
@@ -78,6 +95,14 @@ if [[ $RES != *"${EXPECTED}"* ]]; then
false
fi
+# Update
+RES=$(${gcmd} app method --method "update()void" --on-completion updateapplication --approval-prog ${DIR}/tealprogs/app-abi-method-example.teal --clear-prog ${TEMPDIR}/simple-v3.teal --app-id $APPID --from $ACCOUNT 2>&1 || true)
+EXPECTED="method update()void succeeded"
+if [[ $RES != *"${EXPECTED}"* ]]; then
+ date '+app-abi-method-test FAIL the method call to update()void should not fail %Y%m%d_%H%M%S'
+ false
+fi
+
# Delete
RES=$(${gcmd} app method --method "delete()void" --on-completion deleteapplication --app-id $APPID --from $ACCOUNT 2>&1 || true)
EXPECTED="method delete()void succeeded"
diff --git a/test/scripts/e2e_subs/tealprogs/app-abi-method-example.teal b/test/scripts/e2e_subs/tealprogs/app-abi-method-example.teal
index 2711cd333..83c4f0fdd 100644
--- a/test/scripts/e2e_subs/tealprogs/app-abi-method-example.teal
+++ b/test/scripts/e2e_subs/tealprogs/app-abi-method-example.teal
@@ -1,9 +1,17 @@
-// generated from https://gist.github.com/jasonpaulos/99e4f8a75f2fc2ec9b8073c064530359
+// generated from https://gist.github.com/jasonpaulos/99e4f8a75f2fc2ec9b8073c064530359/b4d37519ccc67383042b6c0fb8b7b26a2e538738
#pragma version 5
txn ApplicationID
int 0
==
-bnz main_l16
+bnz main_l18
+txn OnCompletion
+int UpdateApplication
+==
+txna ApplicationArgs 0
+byte 0xa0e81872
+==
+&&
+bnz main_l17
txn OnCompletion
int OptIn
==
@@ -11,7 +19,7 @@ txna ApplicationArgs 0
byte 0xcfa68e36
==
&&
-bnz main_l15
+bnz main_l16
txn OnCompletion
int CloseOut
==
@@ -19,7 +27,7 @@ txna ApplicationArgs 0
byte 0xa9f42b3d
==
&&
-bnz main_l14
+bnz main_l15
txn OnCompletion
int DeleteApplication
==
@@ -27,7 +35,7 @@ txna ApplicationArgs 0
byte 0x24378d3c
==
&&
-bnz main_l13
+bnz main_l14
txn OnCompletion
int NoOp
==
@@ -35,7 +43,7 @@ txna ApplicationArgs 0
byte 0xfe6bdf69
==
&&
-bnz main_l12
+bnz main_l13
txn OnCompletion
int NoOp
==
@@ -43,7 +51,7 @@ txna ApplicationArgs 0
byte 0xa88c26a5
==
&&
-bnz main_l11
+bnz main_l12
txn OnCompletion
int NoOp
==
@@ -51,7 +59,7 @@ txna ApplicationArgs 0
byte 0x3e3b3d28
==
&&
-bnz main_l10
+bnz main_l11
txn OnCompletion
int NoOp
==
@@ -59,10 +67,10 @@ txna ApplicationArgs 0
byte 0x0df0050f
==
&&
-bnz main_l9
+bnz main_l10
int 0
return
-main_l9:
+main_l10:
txna ApplicationArgs 1
txna ApplicationArgs 2
txna ApplicationArgs 3
@@ -72,45 +80,75 @@ txna ApplicationArgs 6
txna ApplicationArgs 7
txna ApplicationArgs 8
txna ApplicationArgs 9
+callsub sub8
+int 1
+return
+main_l11:
+txna ApplicationArgs 1
+callsub sub7
+int 1
+return
+main_l12:
callsub sub6
int 1
return
-main_l10:
+main_l13:
txna ApplicationArgs 1
+txna ApplicationArgs 2
callsub sub5
int 1
return
-main_l11:
+main_l14:
callsub sub4
int 1
return
-main_l12:
-txna ApplicationArgs 1
-txna ApplicationArgs 2
+main_l15:
callsub sub3
int 1
return
-main_l13:
+main_l16:
+txna ApplicationArgs 1
callsub sub2
int 1
return
-main_l14:
+main_l17:
callsub sub1
int 1
return
-main_l15:
-txna ApplicationArgs 1
-callsub sub0
-int 1
-return
-main_l16:
+main_l18:
+txn NumAppArgs
+int 0
+>
+bnz main_l20
+main_l19:
int 1
return
-sub0: // optIn
+main_l20:
+txna ApplicationArgs 0
+byte 0x43464101
+==
+assert
+txna ApplicationArgs 1
+callsub sub0
+b main_l19
+sub0: // create
store 0
+byte 0x151f7c75
+load 0
+btoi
+int 2
+*
+itob
+concat
+log
+retsub
+sub1: // update
+retsub
+sub2: // optIn
+store 1
int 0
byte "name"
-load 0
+load 1
extract 2 0
app_local_put
byte "hello "
@@ -118,59 +156,59 @@ int 0
byte "name"
app_local_get
concat
-store 1
+store 2
byte 0x151f7c75
-load 1
+load 2
len
itob
extract 6 2
concat
-load 1
+load 2
concat
log
retsub
-sub1: // closeOut
+sub3: // closeOut
byte "goodbye "
int 0
byte "name"
app_local_get
concat
-store 2
+store 3
byte 0x151f7c75
-load 2
+load 3
len
itob
extract 6 2
concat
-load 2
+load 3
concat
log
retsub
-sub2: // deleteApp
+sub4: // deleteApp
txn Sender
global CreatorAddress
==
assert
retsub
-sub3: // add
+sub5: // add
+store 5
store 4
-store 3
byte 0x151f7c75
-load 3
-btoi
load 4
btoi
+load 5
+btoi
+
itob
concat
log
retsub
-sub4: // empty
+sub6: // empty
byte "random inconsequential log"
log
retsub
-sub5: // payment
-store 5
+sub7: // payment
+store 6
txn GroupIndex
int 1
-
@@ -183,19 +221,20 @@ txn GroupIndex
int 1
-
gtxns Amount
-load 5
+load 6
btoi
==
-bnz sub5_l2
+bnz sub7_l2
byte 0x00
-b sub5_l3
-sub5_l2:
+b sub7_l3
+sub7_l2:
byte 0x80
-sub5_l3:
+sub7_l3:
concat
log
retsub
-sub6: // referenceTest
+sub8: // referenceTest
+store 15
store 14
store 13
store 12
@@ -204,25 +243,24 @@ store 10
store 9
store 8
store 7
-store 6
byte 0x151f7c75
-load 6
-concat
-load 8
+load 7
concat
-load 10
+load 9
concat
-load 7
+load 11
concat
-load 13
+load 8
concat
load 14
concat
-load 9
+load 15
concat
-load 11
+load 10
concat
load 12
concat
+load 13
+concat
log
retsub
diff --git a/test/testdata/configs/config-v20.json b/test/testdata/configs/config-v20.json
new file mode 100644
index 000000000..17cbfd974
--- /dev/null
+++ b/test/testdata/configs/config-v20.json
@@ -0,0 +1,100 @@
+{
+ "Version": 20,
+ "AccountUpdatesStatsInterval": 5000000000,
+ "AccountsRebuildSynchronousMode": 1,
+ "AnnounceParticipationKey": true,
+ "Archival": false,
+ "BaseLoggerDebugLevel": 4,
+ "BlockServiceCustomFallbackEndpoints": "",
+ "BroadcastConnectionsLimit": -1,
+ "CadaverSizeTarget": 1073741824,
+ "CatchpointFileHistoryLength": 365,
+ "CatchpointInterval": 10000,
+ "CatchpointTracking": 0,
+ "CatchupBlockDownloadRetryAttempts": 1000,
+ "CatchupBlockValidateMode": 0,
+ "CatchupFailurePeerRefreshRate": 10,
+ "CatchupGossipBlockFetchTimeoutSec": 4,
+ "CatchupHTTPBlockFetchTimeoutSec": 4,
+ "CatchupLedgerDownloadRetryAttempts": 50,
+ "CatchupParallelBlocks": 16,
+ "ConnectionsRateLimitingCount": 60,
+ "ConnectionsRateLimitingWindowSeconds": 1,
+ "DNSBootstrapID": "<network>.algorand.network",
+ "DNSSecurityFlags": 1,
+ "DeadlockDetection": 0,
+ "DeadlockDetectionThreshold": 30,
+ "DisableLocalhostConnectionRateLimit": true,
+ "DisableNetworking": false,
+ "DisableOutgoingConnectionThrottling": false,
+ "EnableAccountUpdatesStats": false,
+ "EnableAgreementReporting": false,
+ "EnableAgreementTimeMetrics": false,
+ "EnableAssembleStats": false,
+ "EnableBlockService": false,
+ "EnableBlockServiceFallbackToArchiver": true,
+ "EnableCatchupFromArchiveServers": false,
+ "EnableDeveloperAPI": false,
+ "EnableGossipBlockService": true,
+ "EnableIncomingMessageFilter": false,
+ "EnableLedgerService": false,
+ "EnableMetricReporting": false,
+ "EnableOutgoingNetworkMessageFiltering": true,
+ "EnablePingHandler": true,
+ "EnableProcessBlockStats": false,
+ "EnableProfiler": false,
+ "EnableRequestLogger": false,
+ "EnableTopAccountsReporting": false,
+ "EnableVerbosedTransactionSyncLogging": false,
+ "EndpointAddress": "127.0.0.1:0",
+ "FallbackDNSResolverAddress": "",
+ "ForceFetchTransactions": false,
+ "ForceRelayMessages": false,
+ "GossipFanout": 4,
+ "IncomingConnectionsLimit": 800,
+ "IncomingMessageFilterBucketCount": 5,
+ "IncomingMessageFilterBucketSize": 512,
+ "IsIndexerActive": false,
+ "LedgerSynchronousMode": 2,
+ "LogArchiveMaxAge": "",
+ "LogArchiveName": "node.archive.log",
+ "LogSizeLimit": 1073741824,
+ "MaxCatchpointDownloadDuration": 7200000000000,
+ "MaxConnectionsPerIP": 30,
+ "MinCatchpointFileDownloadBytesPerSecond": 20480,
+ "NetAddress": "",
+ "NetworkMessageTraceServer": "",
+ "NetworkProtocolVersion": "",
+ "NodeExporterListenAddress": ":9100",
+ "NodeExporterPath": "./node_exporter",
+ "OptimizeAccountsDatabaseOnStartup": false,
+ "OutgoingMessageFilterBucketCount": 3,
+ "OutgoingMessageFilterBucketSize": 128,
+ "ParticipationKeysRefreshInterval": 60000000000,
+ "PeerConnectionsUpdateInterval": 3600,
+ "PeerPingPeriodSeconds": 0,
+ "PriorityPeers": {},
+ "ProposalAssemblyTime": 250000000,
+ "PublicAddress": "",
+ "ReconnectTime": 60000000000,
+ "ReservedFDs": 256,
+ "RestConnectionsHardLimit": 2048,
+ "RestConnectionsSoftLimit": 1024,
+ "RestReadTimeoutSeconds": 15,
+ "RestWriteTimeoutSeconds": 120,
+ "RunHosted": false,
+ "SuggestedFeeBlockHistory": 3,
+ "SuggestedFeeSlidingWindowSize": 50,
+ "TLSCertFile": "",
+ "TLSKeyFile": "",
+ "TelemetryToLog": true,
+ "TransactionSyncDataExchangeRate": 0,
+ "TransactionSyncSignificantMessageThreshold": 0,
+ "TxPoolExponentialIncreaseFactor": 2,
+ "TxPoolSize": 15000,
+ "TxSyncIntervalSeconds": 60,
+ "TxSyncServeResponseSize": 1000000,
+ "TxSyncTimeoutSeconds": 30,
+ "UseXForwardedForAddressField": "",
+ "VerifiedTranscationsCacheSize": 30000
+}
diff --git a/test/testdata/consensus/catchpointtestingprotocol.json b/test/testdata/consensus/catchpointtestingprotocol.json
index 25ad217e2..a006e7d96 100644
--- a/test/testdata/consensus/catchpointtestingprotocol.json
+++ b/test/testdata/consensus/catchpointtestingprotocol.json
@@ -36,7 +36,6 @@
"AgreementFilterTimeout": 1000000000,
"AgreementFilterTimeoutPeriod0": 1000000000,
"FastRecoveryLambda": 300000000000,
- "FastPartitionRecovery": true,
"PaysetCommit": 1,
"MaxTimestampIncrement": 25,
"SupportSignedTxnInBlock": true,
diff --git a/tools/debug/carpenter/main.go b/tools/debug/carpenter/main.go
index 6f66211f1..d43f2267b 100644
--- a/tools/debug/carpenter/main.go
+++ b/tools/debug/carpenter/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/debug/coroner/main.go b/tools/debug/coroner/main.go
index 57acf0b38..669e560de 100644
--- a/tools/debug/coroner/main.go
+++ b/tools/debug/coroner/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/debug/doberman/logo.go b/tools/debug/doberman/logo.go
index dbd85cffb..163b73951 100644
--- a/tools/debug/doberman/logo.go
+++ b/tools/debug/doberman/logo.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/debug/doberman/main.go b/tools/debug/doberman/main.go
index e44609eb4..eb8eb447b 100644
--- a/tools/debug/doberman/main.go
+++ b/tools/debug/doberman/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/debug/genconsensusconfig/main.go b/tools/debug/genconsensusconfig/main.go
index 850781f98..74f6eda2f 100644
--- a/tools/debug/genconsensusconfig/main.go
+++ b/tools/debug/genconsensusconfig/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/debug/logfilter/main.go b/tools/debug/logfilter/main.go
index 265c501fe..1c7545a48 100644
--- a/tools/debug/logfilter/main.go
+++ b/tools/debug/logfilter/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/debug/logfilter/main_test.go b/tools/debug/logfilter/main_test.go
index a68007374..9058f611c 100644
--- a/tools/debug/logfilter/main_test.go
+++ b/tools/debug/logfilter/main_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/misc/convertAddress.go b/tools/misc/convertAddress.go
index 90cdf74b1..c8c4e9997 100644
--- a/tools/misc/convertAddress.go
+++ b/tools/misc/convertAddress.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/bootstrap.go b/tools/network/bootstrap.go
index b461ab039..cd15ef2ab 100644
--- a/tools/network/bootstrap.go
+++ b/tools/network/bootstrap.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/cloudflare/cloudflare.go b/tools/network/cloudflare/cloudflare.go
index d4535a133..565070257 100644
--- a/tools/network/cloudflare/cloudflare.go
+++ b/tools/network/cloudflare/cloudflare.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/cloudflare/createRecord.go b/tools/network/cloudflare/createRecord.go
index 23e3515d6..e8c2b2851 100644
--- a/tools/network/cloudflare/createRecord.go
+++ b/tools/network/cloudflare/createRecord.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/cloudflare/deleteRecord.go b/tools/network/cloudflare/deleteRecord.go
index 31fc0be86..eaa775761 100644
--- a/tools/network/cloudflare/deleteRecord.go
+++ b/tools/network/cloudflare/deleteRecord.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/cloudflare/helpers.go b/tools/network/cloudflare/helpers.go
index 372092159..c221cb36d 100644
--- a/tools/network/cloudflare/helpers.go
+++ b/tools/network/cloudflare/helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/cloudflare/listRecords.go b/tools/network/cloudflare/listRecords.go
index 9554dc2d3..ba8372d2a 100644
--- a/tools/network/cloudflare/listRecords.go
+++ b/tools/network/cloudflare/listRecords.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/cloudflare/updateRecord.go b/tools/network/cloudflare/updateRecord.go
index e31117a01..18607187c 100644
--- a/tools/network/cloudflare/updateRecord.go
+++ b/tools/network/cloudflare/updateRecord.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/cloudflare/zones.go b/tools/network/cloudflare/zones.go
index 912a1057e..49e6d6078 100644
--- a/tools/network/cloudflare/zones.go
+++ b/tools/network/cloudflare/zones.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/anchor.go b/tools/network/dnssec/anchor.go
index 86cb7fb2f..8f7066904 100644
--- a/tools/network/dnssec/anchor.go
+++ b/tools/network/dnssec/anchor.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/anchor_test.go b/tools/network/dnssec/anchor_test.go
index f953f222c..cea0d2adb 100644
--- a/tools/network/dnssec/anchor_test.go
+++ b/tools/network/dnssec/anchor_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/client.go b/tools/network/dnssec/client.go
index b40196891..5ebfc8478 100644
--- a/tools/network/dnssec/client.go
+++ b/tools/network/dnssec/client.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/client_test.go b/tools/network/dnssec/client_test.go
index 4d5e7e43f..3bcc8f79d 100644
--- a/tools/network/dnssec/client_test.go
+++ b/tools/network/dnssec/client_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/config.go b/tools/network/dnssec/config.go
index c1b72463c..a9c38bff9 100644
--- a/tools/network/dnssec/config.go
+++ b/tools/network/dnssec/config.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/config_test.go b/tools/network/dnssec/config_test.go
index a0e9ebb0c..6115c7eef 100644
--- a/tools/network/dnssec/config_test.go
+++ b/tools/network/dnssec/config_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/config_unix.go b/tools/network/dnssec/config_unix.go
index a78696486..bb328cde6 100644
--- a/tools/network/dnssec/config_unix.go
+++ b/tools/network/dnssec/config_unix.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/config_unix_test.go b/tools/network/dnssec/config_unix_test.go
index f6ebe1bc1..c6699e67f 100644
--- a/tools/network/dnssec/config_unix_test.go
+++ b/tools/network/dnssec/config_unix_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/config_windows.go b/tools/network/dnssec/config_windows.go
index 871e5514e..357f1aa1f 100644
--- a/tools/network/dnssec/config_windows.go
+++ b/tools/network/dnssec/config_windows.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/dialer.go b/tools/network/dnssec/dialer.go
index b071759f2..8bb9f869b 100644
--- a/tools/network/dnssec/dialer.go
+++ b/tools/network/dnssec/dialer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/dnssec_test.go b/tools/network/dnssec/dnssec_test.go
index 612ae12b1..496499048 100644
--- a/tools/network/dnssec/dnssec_test.go
+++ b/tools/network/dnssec/dnssec_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/relay-check/main.go b/tools/network/dnssec/relay-check/main.go
index 609ce21ee..4b2dcad29 100644
--- a/tools/network/dnssec/relay-check/main.go
+++ b/tools/network/dnssec/relay-check/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/resolver.go b/tools/network/dnssec/resolver.go
index d8cffd2fb..5aabcfd28 100644
--- a/tools/network/dnssec/resolver.go
+++ b/tools/network/dnssec/resolver.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/sort.go b/tools/network/dnssec/sort.go
index 768df9642..0bdf17f88 100644
--- a/tools/network/dnssec/sort.go
+++ b/tools/network/dnssec/sort.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/sort_test.go b/tools/network/dnssec/sort_test.go
index 523c7325d..3440e2303 100644
--- a/tools/network/dnssec/sort_test.go
+++ b/tools/network/dnssec/sort_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/testHarness.go b/tools/network/dnssec/testHarness.go
index c1d17d4a4..5f5310a8e 100644
--- a/tools/network/dnssec/testHarness.go
+++ b/tools/network/dnssec/testHarness.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/trustchain.go b/tools/network/dnssec/trustchain.go
index 4d76cacc0..3cde9bea7 100644
--- a/tools/network/dnssec/trustchain.go
+++ b/tools/network/dnssec/trustchain.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/trustedchain_test.go b/tools/network/dnssec/trustedchain_test.go
index 9c541299e..2f671c007 100644
--- a/tools/network/dnssec/trustedchain_test.go
+++ b/tools/network/dnssec/trustedchain_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/trustedzone.go b/tools/network/dnssec/trustedzone.go
index d23709190..b3f20dc44 100644
--- a/tools/network/dnssec/trustedzone.go
+++ b/tools/network/dnssec/trustedzone.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/trustedzone_test.go b/tools/network/dnssec/trustedzone_test.go
index 27759eee4..6d3bbaa04 100644
--- a/tools/network/dnssec/trustedzone_test.go
+++ b/tools/network/dnssec/trustedzone_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/util.go b/tools/network/dnssec/util.go
index 04db0430c..1622f490f 100644
--- a/tools/network/dnssec/util.go
+++ b/tools/network/dnssec/util.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/dnssec/util_test.go b/tools/network/dnssec/util_test.go
index 9f5ffa4c5..d467d52c8 100644
--- a/tools/network/dnssec/util_test.go
+++ b/tools/network/dnssec/util_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/externalIP.go b/tools/network/externalIP.go
index 57e136c44..a726d03fc 100644
--- a/tools/network/externalIP.go
+++ b/tools/network/externalIP.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/resolveController.go b/tools/network/resolveController.go
index d50cd2c72..fd12d0dbf 100644
--- a/tools/network/resolveController.go
+++ b/tools/network/resolveController.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/resolveController_test.go b/tools/network/resolveController_test.go
index c30d3287c..8a843c902 100644
--- a/tools/network/resolveController_test.go
+++ b/tools/network/resolveController_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/resolver.go b/tools/network/resolver.go
index ae3fc3f59..467bb1e12 100644
--- a/tools/network/resolver.go
+++ b/tools/network/resolver.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/resolver_test.go b/tools/network/resolver_test.go
index 2021daa2c..9e2de0af9 100644
--- a/tools/network/resolver_test.go
+++ b/tools/network/resolver_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/telemetryURIUpdateService.go b/tools/network/telemetryURIUpdateService.go
index a6e0da307..ab0cc8110 100644
--- a/tools/network/telemetryURIUpdateService.go
+++ b/tools/network/telemetryURIUpdateService.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/network/telemetryURIUpdateService_test.go b/tools/network/telemetryURIUpdateService_test.go
index b254d4157..afe8bf242 100644
--- a/tools/network/telemetryURIUpdateService_test.go
+++ b/tools/network/telemetryURIUpdateService_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/teal/algotmpl/extract.go b/tools/teal/algotmpl/extract.go
index fbbd7c7d6..b8c045366 100644
--- a/tools/teal/algotmpl/extract.go
+++ b/tools/teal/algotmpl/extract.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/teal/algotmpl/main.go b/tools/teal/algotmpl/main.go
index 24d8aa414..2d24841a5 100644
--- a/tools/teal/algotmpl/main.go
+++ b/tools/teal/algotmpl/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/teal/dkey/dsign/main.go b/tools/teal/dkey/dsign/main.go
index d29d0a57f..ff8a6067b 100644
--- a/tools/teal/dkey/dsign/main.go
+++ b/tools/teal/dkey/dsign/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/tools/teal/tealcut/main.go b/tools/teal/tealcut/main.go
index 8561f3238..96958c42a 100644
--- a/tools/teal/tealcut/main.go
+++ b/tools/teal/tealcut/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/codecs/json.go b/util/codecs/json.go
index 9a7fa22c0..071c2f30c 100644
--- a/util/codecs/json.go
+++ b/util/codecs/json.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/codecs/json_test.go b/util/codecs/json_test.go
index 432784a48..de35acf3c 100644
--- a/util/codecs/json_test.go
+++ b/util/codecs/json_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/condvar/timedwait.go b/util/condvar/timedwait.go
index e4699fded..9ed142f1b 100644
--- a/util/condvar/timedwait.go
+++ b/util/condvar/timedwait.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/condvar/timedwait_test.go b/util/condvar/timedwait_test.go
index bfc9daae5..20b8f70a4 100644
--- a/util/condvar/timedwait_test.go
+++ b/util/condvar/timedwait_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/db/dbpair.go b/util/db/dbpair.go
index 203a4a56c..bab7d5243 100644
--- a/util/db/dbpair.go
+++ b/util/db/dbpair.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/db/dbutil.go b/util/db/dbutil.go
index 410bfb0c1..123f4e00d 100644
--- a/util/db/dbutil.go
+++ b/util/db/dbutil.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -204,12 +204,12 @@ func (db *Accessor) IsSharedCacheConnection() bool {
// Atomic executes a piece of code with respect to the database atomically.
// For transactions where readOnly is false, sync determines whether or not to wait for the result.
func (db *Accessor) Atomic(fn idemFn, extras ...interface{}) (err error) {
- return db.atomic(fn, nil, extras...)
+ return db.atomic(fn, extras...)
}
// Atomic executes a piece of code with respect to the database atomically.
// For transactions where readOnly is false, sync determines whether or not to wait for the result.
-func (db *Accessor) atomic(fn idemFn, commitLocker sync.Locker, extras ...interface{}) (err error) {
+func (db *Accessor) atomic(fn idemFn, extras ...interface{}) (err error) {
atomicDeadline := time.Now().Add(time.Second)
// note that the sql library will drop panics inside an active transaction
@@ -232,29 +232,6 @@ func (db *Accessor) atomic(fn idemFn, commitLocker sync.Locker, extras ...interf
var conn *sql.Conn
ctx := context.Background()
- commitWriteLockTaken := false
- if commitLocker != nil && db.IsSharedCacheConnection() {
- // When we're using in memory database, the sqlite implementation forces us to use a shared cache
- // mode so that multiple connections ( i.e. read and write ) could share the database instance.
- // ( it would also create issues between precompiled statements and regular atomic calls, as the former
- // would generate a connection on the fly).
- // when using a shared cache, we have to be aware that there are additional locking mechanisms that are
- // internal to the sqlite. Two of them which play a role here are the sqlite_unlock_notify which
- // prevents a shared cache locks from returning "database is busy" error and would block instead, and
- // table level locks, which ensure that at any one time, a single table may have any number of active
- // read-locks or a single active write lock.
- // see https://www.sqlite.org/sharedcache.html for more details.
- // These shared cache constrains are more strict than the WAL based concurrency limitations, which allows
- // one writer and multiple readers at the same time.
- // In particular, the shared cache limitation means that since a connection could become a writer, any synchronization
- // operating that would prevent this operation from completing could result with a deadlock.
- // This is the reason why for shared cache connections, we'll take the lock before starting the write transaction,
- // and would keep it along. It will cause a degraded performance when using a shared cache connection
- // compared to a private cache connection, but would grentee correct locking semantics.
- commitLocker.Lock()
- commitWriteLockTaken = true
- }
-
for i := 0; (i == 0) || dbretry(err); i++ {
if i > 0 {
if i < infoTxRetries {
@@ -271,21 +248,11 @@ func (db *Accessor) atomic(fn idemFn, commitLocker sync.Locker, extras ...interf
if err != nil {
// fail case - unable to create database connection
- if commitLocker != nil && commitWriteLockTaken {
- commitLocker.Unlock()
- }
return
}
defer conn.Close()
for i := 0; ; i++ {
- // check if the lock was taken in previous iteration
- if commitLocker != nil && (!db.IsSharedCacheConnection()) && commitWriteLockTaken {
- // undo the lock.
- commitLocker.Unlock()
- commitWriteLockTaken = false
- }
-
if i > 0 {
if i < infoTxRetries {
db.getDecoratedLogger(fn, extras).Infof("db.atomic: %d retries (last err: %v)", i, err)
@@ -319,12 +286,6 @@ func (db *Accessor) atomic(fn idemFn, commitLocker sync.Locker, extras ...interf
}
}
- // if everytyhing went well, take the lock, as we're going to attempt to commit the transaction to database.
- if commitLocker != nil && (!commitWriteLockTaken) && (!db.IsSharedCacheConnection()) {
- commitLocker.Lock()
- commitWriteLockTaken = true
- }
-
err = tx.Commit()
if err == nil {
// update the deadline, as it might have been updated.
@@ -335,11 +296,6 @@ func (db *Accessor) atomic(fn idemFn, commitLocker sync.Locker, extras ...interf
}
}
- // if we've errored, make sure to unlock the commitLocker ( if there is any )
- if err != nil && commitLocker != nil && commitWriteLockTaken {
- commitLocker.Unlock()
- }
-
if time.Now().After(atomicDeadline) {
db.getDecoratedLogger(fn, extras).Warnf("dbatomic: tx surpassed expected deadline by %v", time.Now().Sub(atomicDeadline))
}
@@ -362,14 +318,6 @@ func ResetTransactionWarnDeadline(ctx context.Context, tx *sql.Tx, deadline time
return
}
-// AtomicCommitWriteLock executes a piece of code with respect to the database atomically.
-// For transactions where readOnly is false, sync determines whether or not to wait for the result.
-// The commitLocker is being taken before the transaction is committed. In case of an error, the lock would get released.
-// on all success cases ( i.e. err = nil ) the lock would be taken. on all the fail cases, the lock would be released
-func (db *Accessor) AtomicCommitWriteLock(fn idemFn, commitLocker sync.Locker, extras ...interface{}) (err error) {
- return db.atomic(fn, commitLocker, extras...)
-}
-
// Vacuum perform a full-vacuum on the given database. In order for the vacuum to succeed, the storage needs to have
// double the amount of the current database size ( roughly ), and we cannot have any other transaction ( either read
// or write ) being active.
diff --git a/util/db/dbutil_test.go b/util/db/dbutil_test.go
index a675d3b84..12d73a86c 100644
--- a/util/db/dbutil_test.go
+++ b/util/db/dbutil_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/db/fullfsync_darwin.go b/util/db/fullfsync_darwin.go
index 83d1a92da..8a529305a 100644
--- a/util/db/fullfsync_darwin.go
+++ b/util/db/fullfsync_darwin.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/db/initialize.go b/util/db/initialize.go
index 1662a17b4..71141707c 100644
--- a/util/db/initialize.go
+++ b/util/db/initialize.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/db/initialize_test.go b/util/db/initialize_test.go
index 46f2ec941..d7b879d6a 100644
--- a/util/db/initialize_test.go
+++ b/util/db/initialize_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/db/perf_test.go b/util/db/perf_test.go
index eb25bbcbf..1e0a8bccd 100644
--- a/util/db/perf_test.go
+++ b/util/db/perf_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/db/queryable.go b/util/db/queryable.go
index cfdc9d109..c76e506b3 100644
--- a/util/db/queryable.go
+++ b/util/db/queryable.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/db/versioning.go b/util/db/versioning.go
index 6de41495d..5b61d776b 100644
--- a/util/db/versioning.go
+++ b/util/db/versioning.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/db/versioning_test.go b/util/db/versioning_test.go
index 29b96eb23..fd2fecc23 100644
--- a/util/db/versioning_test.go
+++ b/util/db/versioning_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/execpool/backlog.go b/util/execpool/backlog.go
index dae3700ee..966aafe97 100644
--- a/util/execpool/backlog.go
+++ b/util/execpool/backlog.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/execpool/pool.go b/util/execpool/pool.go
index adbd047a7..1b37dd95f 100644
--- a/util/execpool/pool.go
+++ b/util/execpool/pool.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/io.go b/util/io.go
index 9a681b871..453a98663 100644
--- a/util/io.go
+++ b/util/io.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/counter.go b/util/metrics/counter.go
index 67f3e682f..3a7b36357 100644
--- a/util/metrics/counter.go
+++ b/util/metrics/counter.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/counterCommon.go b/util/metrics/counterCommon.go
index 4de99efea..26ef7f924 100644
--- a/util/metrics/counterCommon.go
+++ b/util/metrics/counterCommon.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/counter_test.go b/util/metrics/counter_test.go
index 67c7a0785..43ef0c27a 100644
--- a/util/metrics/counter_test.go
+++ b/util/metrics/counter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/gauge.go b/util/metrics/gauge.go
index c1497489e..f4e27b957 100644
--- a/util/metrics/gauge.go
+++ b/util/metrics/gauge.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/gauge_test.go b/util/metrics/gauge_test.go
index 1e1164b01..301ae22a7 100644
--- a/util/metrics/gauge_test.go
+++ b/util/metrics/gauge_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/metrics.go b/util/metrics/metrics.go
index b759f8425..01f161888 100644
--- a/util/metrics/metrics.go
+++ b/util/metrics/metrics.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/metrics_test.go b/util/metrics/metrics_test.go
index 25b3fd8f4..8d526906e 100644
--- a/util/metrics/metrics_test.go
+++ b/util/metrics/metrics_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/registry.go b/util/metrics/registry.go
index 214b245ff..d82b49367 100644
--- a/util/metrics/registry.go
+++ b/util/metrics/registry.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/registryCommon.go b/util/metrics/registryCommon.go
index 052f73277..e5046d806 100644
--- a/util/metrics/registryCommon.go
+++ b/util/metrics/registryCommon.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/registry_test.go b/util/metrics/registry_test.go
index e4d8fc2d7..3c60f09d8 100644
--- a/util/metrics/registry_test.go
+++ b/util/metrics/registry_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/reporter.go b/util/metrics/reporter.go
index 90cc371c3..efecf6f65 100644
--- a/util/metrics/reporter.go
+++ b/util/metrics/reporter.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/reporter_test.go b/util/metrics/reporter_test.go
index cec86f63e..7339c708d 100755
--- a/util/metrics/reporter_test.go
+++ b/util/metrics/reporter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/segment.go b/util/metrics/segment.go
index 18640d5da..21db004f3 100644
--- a/util/metrics/segment.go
+++ b/util/metrics/segment.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/segment_test.go b/util/metrics/segment_test.go
index d3590f5a6..c5cae321d 100644
--- a/util/metrics/segment_test.go
+++ b/util/metrics/segment_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/service.go b/util/metrics/service.go
index 630bbe75e..576d14404 100644
--- a/util/metrics/service.go
+++ b/util/metrics/service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/serviceCommon.go b/util/metrics/serviceCommon.go
index 7a6c9e06a..e0b26c820 100644
--- a/util/metrics/serviceCommon.go
+++ b/util/metrics/serviceCommon.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/stringGauge.go b/util/metrics/stringGauge.go
index d3d2bf53c..c398533e4 100644
--- a/util/metrics/stringGauge.go
+++ b/util/metrics/stringGauge.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/stringGaugeCommon.go b/util/metrics/stringGaugeCommon.go
index 685bac531..40358b22d 100644
--- a/util/metrics/stringGaugeCommon.go
+++ b/util/metrics/stringGaugeCommon.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/stringGauge_test.go b/util/metrics/stringGauge_test.go
index 1ea3650bc..97296ba5c 100644
--- a/util/metrics/stringGauge_test.go
+++ b/util/metrics/stringGauge_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/tagcounter.go b/util/metrics/tagcounter.go
index 3b97454f3..8dc73ea3b 100644
--- a/util/metrics/tagcounter.go
+++ b/util/metrics/tagcounter.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/metrics/tagcounter_test.go b/util/metrics/tagcounter_test.go
index 1e1c5b5aa..a2f8a87a0 100644
--- a/util/metrics/tagcounter_test.go
+++ b/util/metrics/tagcounter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/process.go b/util/process.go
index 68c03005c..4ea34796a 100644
--- a/util/process.go
+++ b/util/process.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/process_common.go b/util/process_common.go
index bb706b308..5685b06a5 100644
--- a/util/process_common.go
+++ b/util/process_common.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/process_windows.go b/util/process_windows.go
index 1d2250e64..b7a5c6b65 100644
--- a/util/process_windows.go
+++ b/util/process_windows.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/s3/fileIterator.go b/util/s3/fileIterator.go
index 500527d04..d5adbd096 100644
--- a/util/s3/fileIterator.go
+++ b/util/s3/fileIterator.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/s3/s3Helper.go b/util/s3/s3Helper.go
index 236911370..43f017443 100644
--- a/util/s3/s3Helper.go
+++ b/util/s3/s3Helper.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/s3/s3Helper_test.go b/util/s3/s3Helper_test.go
index 20406e733..6c4609501 100644
--- a/util/s3/s3Helper_test.go
+++ b/util/s3/s3Helper_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/tar/tar.go b/util/tar/tar.go
index 193a031a5..68d03b51f 100644
--- a/util/tar/tar.go
+++ b/util/tar/tar.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/tar/untar.go b/util/tar/untar.go
index 965e010ef..e6de065a6 100644
--- a/util/tar/untar.go
+++ b/util/tar/untar.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/timers/frozen.go b/util/timers/frozen.go
index 7b668959c..0ff5434ea 100644
--- a/util/timers/frozen.go
+++ b/util/timers/frozen.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/timers/interface.go b/util/timers/interface.go
index aec9a424c..dc3c1957c 100644
--- a/util/timers/interface.go
+++ b/util/timers/interface.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/timers/monotonic.go b/util/timers/monotonic.go
index 2788a6caa..9d720ba86 100644
--- a/util/timers/monotonic.go
+++ b/util/timers/monotonic.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/timers/monotonic_test.go b/util/timers/monotonic_test.go
index 115c70295..b9fecdbdb 100644
--- a/util/timers/monotonic_test.go
+++ b/util/timers/monotonic_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/tokens/tokens.go b/util/tokens/tokens.go
index 594d50238..7b6d33d47 100644
--- a/util/tokens/tokens.go
+++ b/util/tokens/tokens.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
diff --git a/util/util.go b/util/util.go
index 03d17ac0f..c4c7a7385 100644
--- a/util/util.go
+++ b/util/util.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -19,23 +19,24 @@
package util
import (
+ "fmt"
"syscall"
)
/* misc */
-// RaiseRlimit increases the number of file descriptors we can have
-func RaiseRlimit(amount uint64) error {
+// SetFdSoftLimit sets a new file descriptors soft limit.
+func SetFdSoftLimit(newLimit uint64) error {
var rLimit syscall.Rlimit
err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
- return err
+ return fmt.Errorf("SetFdSoftLimit() err: %w", err)
}
- rLimit.Cur = amount
+ rLimit.Cur = newLimit
err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
- return err
+ return fmt.Errorf("SetFdSoftLimit() err: %w", err)
}
return nil
}
diff --git a/util/util_windows.go b/util/util_windows.go
index 80e16bf68..5a533b655 100644
--- a/util/util_windows.go
+++ b/util/util_windows.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
@@ -24,8 +24,8 @@ import (
/* misc */
-// RaiseRlimit increases the number of file descriptors we can have
-func RaiseRlimit(_ uint64) error {
+// SetFdSoftLimit sets a new file descriptors soft limit.
+func SetFdSoftLimit(_ uint64) error {
return nil
}
diff --git a/util/watchdogStreamReader.go b/util/watchdogStreamReader.go
index 29d7fa099..8842483bd 100644
--- a/util/watchdogStreamReader.go
+++ b/util/watchdogStreamReader.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2021 Algorand, Inc.
+// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify