diff --git a/.changelog/config.toml b/.changelog/config.toml deleted file mode 100644 index de0fee50c2f..00000000000 --- a/.changelog/config.toml +++ /dev/null @@ -1 +0,0 @@ -project_url = 'https://github.com/cometbft/cometbft' diff --git a/.changelog/epilogue.md b/.changelog/epilogue.md deleted file mode 100644 index c6ac1f1c716..00000000000 --- a/.changelog/epilogue.md +++ /dev/null @@ -1,11 +0,0 @@ ---- - -CometBFT is a fork of [Tendermint Core](https://github.com/tendermint/tendermint) as of late December 2022. - -## Bug bounty - -Friendly reminder, we have a [bug bounty program](https://hackerone.com/cosmos). - -## Previous changes - -For changes released before the creation of CometBFT, please refer to the Tendermint Core [CHANGELOG.md](https://github.com/tendermint/tendermint/blob/a9feb1c023e172b542c972605311af83b777855b/CHANGELOG.md). diff --git a/.changelog/unreleased/.gitkeep b/.changelog/unreleased/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/.changelog/v0.34.27/breaking-changes/152-rename-binary-docker.md b/.changelog/v0.34.27/breaking-changes/152-rename-binary-docker.md deleted file mode 100644 index 3870f96f927..00000000000 --- a/.changelog/v0.34.27/breaking-changes/152-rename-binary-docker.md +++ /dev/null @@ -1,2 +0,0 @@ -- Rename binary to `cometbft` and Docker image to `cometbft/cometbft` - ([\#152](https://github.com/cometbft/cometbft/pull/152)) diff --git a/.changelog/v0.34.27/breaking-changes/211-deprecate-tmhome.md b/.changelog/v0.34.27/breaking-changes/211-deprecate-tmhome.md deleted file mode 100644 index d2bded0f279..00000000000 --- a/.changelog/v0.34.27/breaking-changes/211-deprecate-tmhome.md +++ /dev/null @@ -1,3 +0,0 @@ -- The `TMHOME` environment variable was renamed to `CMTHOME`, and all - environment variables starting with `TM_` are instead prefixed with `CMT_` - ([\#211](https://github.com/cometbft/cometbft/issues/211)) diff --git a/.changelog/v0.34.27/breaking-changes/360-update-to-go-119.md b/.changelog/v0.34.27/breaking-changes/360-update-to-go-119.md deleted file mode 100644 index 97fafda93bb..00000000000 --- a/.changelog/v0.34.27/breaking-changes/360-update-to-go-119.md +++ /dev/null @@ -1,2 +0,0 @@ -- Use Go 1.19 to build CometBFT, since Go 1.18 has reached end-of-life. - ([\#360](https://github.com/cometbft/cometbft/issues/360)) diff --git a/.changelog/v0.34.27/bug-fixes/383-txindexer-fix-slash-parsing.md b/.changelog/v0.34.27/bug-fixes/383-txindexer-fix-slash-parsing.md deleted file mode 100644 index c08824da9d7..00000000000 --- a/.changelog/v0.34.27/bug-fixes/383-txindexer-fix-slash-parsing.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[state/kvindexer]` Resolved crashes when event values contained slashes, - introduced after adding event sequences. - (\#[383](https://github.com/cometbft/cometbft/pull/383): @jmalicevic) diff --git a/.changelog/v0.34.27/bug-fixes/386-quick-fix-needproofblock.md b/.changelog/v0.34.27/bug-fixes/386-quick-fix-needproofblock.md deleted file mode 100644 index d3d2f5b7387..00000000000 --- a/.changelog/v0.34.27/bug-fixes/386-quick-fix-needproofblock.md +++ /dev/null @@ -1,6 +0,0 @@ -- `[consensus]` Short-term fix for the case when `needProofBlock` cannot find - previous block meta by defaulting to the creation of a new proof block. - ([\#386](https://github.com/cometbft/cometbft/pull/386): @adizere) - - Special thanks to the [Vega.xyz](https://vega.xyz/) team, and in particular - to Zohar (@ze97286), for reporting the problem and working with us to get to - a fix. diff --git a/.changelog/v0.34.27/bug-fixes/4-busy-loop-send-block-part.md b/.changelog/v0.34.27/bug-fixes/4-busy-loop-send-block-part.md deleted file mode 100644 index 414ec44cb10..00000000000 --- a/.changelog/v0.34.27/bug-fixes/4-busy-loop-send-block-part.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[consensus]` Fixed a busy loop that happened when sending of a block part - failed by sleeping in case of error. - ([\#4](https://github.com/informalsystems/tendermint/pull/4)) diff --git a/.changelog/v0.34.27/bug-fixes/9936-p2p-fix-envelope-sending.md b/.changelog/v0.34.27/bug-fixes/9936-p2p-fix-envelope-sending.md deleted file mode 100644 index fd38b79b9f7..00000000000 --- a/.changelog/v0.34.27/bug-fixes/9936-p2p-fix-envelope-sending.md +++ /dev/null @@ -1,5 +0,0 @@ -- `[p2p]` Correctly use non-blocking `TrySendEnvelope` method when attempting to - send messages, as opposed to the blocking `SendEnvelope` method. It is unclear - whether this has a meaningful impact on P2P performance, but this patch does - correct the underlying behaviour to what it should be - ([tendermint/tendermint\#9936](https://github.com/tendermint/tendermint/pull/9936)) diff --git a/.changelog/v0.34.27/dependencies/160-tmdb-to-cometbftdb.md b/.changelog/v0.34.27/dependencies/160-tmdb-to-cometbftdb.md deleted file mode 100644 index e4c1351312c..00000000000 --- a/.changelog/v0.34.27/dependencies/160-tmdb-to-cometbftdb.md +++ /dev/null @@ -1,3 +0,0 @@ -- Replace [tm-db](https://github.com/tendermint/tm-db) with - [cometbft-db](https://github.com/cometbft/cometbft-db) - ([\#160](https://github.com/cometbft/cometbft/pull/160)) \ No newline at end of file diff --git a/.changelog/v0.34.27/dependencies/165-bump-tmloadtest.md b/.changelog/v0.34.27/dependencies/165-bump-tmloadtest.md deleted file mode 100644 index 175163ac004..00000000000 --- a/.changelog/v0.34.27/dependencies/165-bump-tmloadtest.md +++ /dev/null @@ -1,2 +0,0 @@ -- Bump tm-load-test to v1.3.0 to remove implicit dependency on Tendermint Core - ([\#165](https://github.com/cometbft/cometbft/pull/165)) \ No newline at end of file diff --git a/.changelog/v0.34.27/dependencies/9787-btcec-dep-update.md b/.changelog/v0.34.27/dependencies/9787-btcec-dep-update.md deleted file mode 100644 index d155748e0cb..00000000000 --- a/.changelog/v0.34.27/dependencies/9787-btcec-dep-update.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[crypto]` Update to use btcec v2 and the latest btcutil - ([tendermint/tendermint\#9787](https://github.com/tendermint/tendermint/pull/9787): - @wcsiu) diff --git a/.changelog/v0.34.27/features/9759-kvindexer-match-event.md b/.changelog/v0.34.27/features/9759-kvindexer-match-event.md deleted file mode 100644 index 281f6cd1fb8..00000000000 --- a/.changelog/v0.34.27/features/9759-kvindexer-match-event.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[rpc]` Add `match_event` query parameter to indicate to the RPC that it - should match events _within_ attributes, not only within a height - ([tendermint/tendermint\#9759](https://github.com/tendermint/tendermint/pull/9759)) diff --git a/.changelog/v0.34.27/improvements/136-remove-tm-signer-harness.md b/.changelog/v0.34.27/improvements/136-remove-tm-signer-harness.md deleted file mode 100644 index 6eb6c2158c2..00000000000 --- a/.changelog/v0.34.27/improvements/136-remove-tm-signer-harness.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[tools/tm-signer-harness]` Remove the folder as it is unused - ([\#136](https://github.com/cometbft/cometbft/issues/136)) \ No newline at end of file diff --git a/.changelog/v0.34.27/improvements/204-version-commit-hash.md b/.changelog/v0.34.27/improvements/204-version-commit-hash.md deleted file mode 100644 index 675a1a2924b..00000000000 --- a/.changelog/v0.34.27/improvements/204-version-commit-hash.md +++ /dev/null @@ -1,2 +0,0 @@ -- Append the commit hash to the version of CometBFT being built - ([\#204](https://github.com/cometbft/cometbft/pull/204)) \ No newline at end of file diff --git a/.changelog/v0.34.27/improvements/314-prio-mempool-badtxlog.md b/.changelog/v0.34.27/improvements/314-prio-mempool-badtxlog.md deleted file mode 100644 index ba4ac031e20..00000000000 --- a/.changelog/v0.34.27/improvements/314-prio-mempool-badtxlog.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[mempool/v1]` Suppress "rejected bad transaction" in priority mempool logs by - reducing log level from info to debug - ([\#314](https://github.com/cometbft/cometbft/pull/314): @JayT106) diff --git a/.changelog/v0.34.27/improvements/56-rpc-cache-rpc-responses.md b/.changelog/v0.34.27/improvements/56-rpc-cache-rpc-responses.md deleted file mode 100644 index 344b3df93b9..00000000000 --- a/.changelog/v0.34.27/improvements/56-rpc-cache-rpc-responses.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[e2e]` Add functionality for uncoordinated (minor) upgrades - ([\#56](https://github.com/tendermint/tendermint/pull/56)) \ No newline at end of file diff --git a/.changelog/v0.34.27/improvements/9733-consensus-metrics.md b/.changelog/v0.34.27/improvements/9733-consensus-metrics.md deleted file mode 100644 index 77d8c743ec7..00000000000 --- a/.changelog/v0.34.27/improvements/9733-consensus-metrics.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[consensus]` Add `consensus_block_gossip_parts_received` and - `consensus_step_duration_seconds` metrics in order to aid in investigating the - impact of database compaction on consensus performance - ([tendermint/tendermint\#9733](https://github.com/tendermint/tendermint/pull/9733)) diff --git a/.changelog/v0.34.27/improvements/9759-kvindexer-match-event.md b/.changelog/v0.34.27/improvements/9759-kvindexer-match-event.md deleted file mode 100644 index 8b5757cb8ec..00000000000 --- a/.changelog/v0.34.27/improvements/9759-kvindexer-match-event.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[state/kvindexer]` Add `match.event` keyword to support condition evaluation - based on the event the attributes belong to - ([tendermint/tendermint\#9759](https://github.com/tendermint/tendermint/pull/9759)) diff --git a/.changelog/v0.34.27/improvements/9764-p2p-fix-logspam.md b/.changelog/v0.34.27/improvements/9764-p2p-fix-logspam.md deleted file mode 100644 index 78fa6844fee..00000000000 --- a/.changelog/v0.34.27/improvements/9764-p2p-fix-logspam.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[p2p]` Reduce log spam through reducing log level of "Dialing peer" and - "Added peer" messages from info to debug - ([tendermint/tendermint\#9764](https://github.com/tendermint/tendermint/pull/9764): - @faddat) diff --git a/.changelog/v0.34.27/improvements/9776-consensus-vote-bandwidth.md b/.changelog/v0.34.27/improvements/9776-consensus-vote-bandwidth.md deleted file mode 100644 index 2bfdd05acf8..00000000000 --- a/.changelog/v0.34.27/improvements/9776-consensus-vote-bandwidth.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[consensus]` Reduce bandwidth consumption of consensus votes by roughly 50% - through fixing a small logic bug - ([tendermint/tendermint\#9776](https://github.com/tendermint/tendermint/pull/9776)) diff --git a/.changelog/v0.34.27/summary.md b/.changelog/v0.34.27/summary.md deleted file mode 100644 index e4a13db501b..00000000000 --- a/.changelog/v0.34.27/summary.md +++ /dev/null @@ -1,17 +0,0 @@ -*Feb 27, 2023* - -This is the first official release of CometBFT - a fork of [Tendermint -Core](https://github.com/tendermint/tendermint). This particular release is -intended to be compatible with the Tendermint Core v0.34 release series. - -For details as to how to upgrade to CometBFT from Tendermint Core, please see -our [upgrading guidelines](./UPGRADING.md). - -If you have any questions, comments, concerns or feedback on this release, we -would love to hear from you! Please contact us via [GitHub -Discussions](https://github.com/cometbft/cometbft/discussions), -[Discord](https://discord.gg/cosmosnetwork) (in the `#cometbft` channel) or -[Telegram](https://t.me/CometBFT). - -Special thanks to @wcsiu, @ze97286, @faddat and @JayT106 for their contributions -to this release! diff --git a/.changelog/v0.37.0/breaking-changes/211-deprecate-tmhome.md b/.changelog/v0.37.0/breaking-changes/211-deprecate-tmhome.md deleted file mode 100644 index 547fc4e2d54..00000000000 --- a/.changelog/v0.37.0/breaking-changes/211-deprecate-tmhome.md +++ /dev/null @@ -1,2 +0,0 @@ -- The `TMHOME` environment variable was renamed to `CMTHOME`, and all environment variables starting with `TM_` are instead prefixed with `CMT_` - ([\#211](https://github.com/cometbft/cometbft/issues/211)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/230-p2p-peer-msg-type-and-metric.md b/.changelog/v0.37.0/breaking-changes/230-p2p-peer-msg-type-and-metric.md deleted file mode 100644 index 5e7d11eae66..00000000000 --- a/.changelog/v0.37.0/breaking-changes/230-p2p-peer-msg-type-and-metric.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[p2p]` Reactor `Send`, `TrySend` and `Receive` renamed to `SendEnvelope`, - `TrySendEnvelope` and `ReceiveEnvelope` to allow metrics to be appended to - messages and measure bytes sent/received. - ([\#230](https://github.com/cometbft/cometbft/pull/230)) diff --git a/.changelog/v0.37.0/breaking-changes/385-update-to-go1.20.md b/.changelog/v0.37.0/breaking-changes/385-update-to-go1.20.md deleted file mode 100644 index 5e9ea3386ac..00000000000 --- a/.changelog/v0.37.0/breaking-changes/385-update-to-go1.20.md +++ /dev/null @@ -1,2 +0,0 @@ -- Bump minimum Go version to 1.20 - ([\#385](https://github.com/cometbft/cometbft/issues/385)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/409-deprecate-blocksyncmode.md b/.changelog/v0.37.0/breaking-changes/409-deprecate-blocksyncmode.md deleted file mode 100644 index a32707ad37d..00000000000 --- a/.changelog/v0.37.0/breaking-changes/409-deprecate-blocksyncmode.md +++ /dev/null @@ -1,5 +0,0 @@ -- [config] The boolean key `fastsync` is deprecated and replaced by - `block_sync`. ([\#9259](https://github.com/tendermint/tendermint/pull/9259)) - At the same time, `block_sync` is also deprecated. In the next release, - BlocSync will always be enabled and `block_sync` will be removed. - ([\#409](https://github.com/cometbft/cometbft/issues/409)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/5783-abci-lenght-delim.md b/.changelog/v0.37.0/breaking-changes/5783-abci-lenght-delim.md deleted file mode 100644 index d2b82c9bdd8..00000000000 --- a/.changelog/v0.37.0/breaking-changes/5783-abci-lenght-delim.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[abci]` Make length delimiter encoding consistent - (`uint64`) between ABCI and P2P wire-level protocols - ([\#5783](https://github.com/tendermint/tendermint/pull/5783)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/6403-abci-events-mangled.md b/.changelog/v0.37.0/breaking-changes/6403-abci-events-mangled.md deleted file mode 100644 index e62e77327ce..00000000000 --- a/.changelog/v0.37.0/breaking-changes/6403-abci-events-mangled.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[abci]` Change the `key` and `value` fields from - `[]byte` to `string` in the `EventAttribute` type. - ([\#6403](https://github.com/tendermint/tendermint/pull/6403)) diff --git a/.changelog/v0.37.0/breaking-changes/6684-abci-remove-counter-app.md b/.changelog/v0.37.0/breaking-changes/6684-abci-remove-counter-app.md deleted file mode 100644 index f990265a09b..00000000000 --- a/.changelog/v0.37.0/breaking-changes/6684-abci-remove-counter-app.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[abci/counter]` Delete counter example app - ([\#6684](https://github.com/tendermint/tendermint/pull/6684)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/8216-abci-include-meaningful-headers.md b/.changelog/v0.37.0/breaking-changes/8216-abci-include-meaningful-headers.md deleted file mode 100644 index a09f8a56737..00000000000 --- a/.changelog/v0.37.0/breaking-changes/8216-abci-include-meaningful-headers.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[abci]` Renamed `EvidenceType` to `MisbehaviorType` and `Evidence` - to `Misbehavior` as a more accurate label of their contents. - ([\#8216](https://github.com/tendermint/tendermint/pull/8216)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/8656-abci-cli-added-proposal-commands-a.md b/.changelog/v0.37.0/breaking-changes/8656-abci-cli-added-proposal-commands-a.md deleted file mode 100644 index 3d70d40daaa..00000000000 --- a/.changelog/v0.37.0/breaking-changes/8656-abci-cli-added-proposal-commands-a.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[abci]` Added cli commands for `PrepareProposal` and `ProcessProposal`. - ([\#8656](https://github.com/tendermint/tendermint/pull/8656)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/8901-abci-cli-added-proposal-commands-b.md b/.changelog/v0.37.0/breaking-changes/8901-abci-cli-added-proposal-commands-b.md deleted file mode 100644 index cdc7ff8bf46..00000000000 --- a/.changelog/v0.37.0/breaking-changes/8901-abci-cli-added-proposal-commands-b.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[abci]` Added cli commands for `PrepareProposal` and `ProcessProposal`. - ([\#8901](https://github.com/tendermint/tendermint/pull/8901)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/9122-abci-renamed-lastcommitinfo-commitinfo.md b/.changelog/v0.37.0/breaking-changes/9122-abci-renamed-lastcommitinfo-commitinfo.md deleted file mode 100644 index b679c1808b8..00000000000 --- a/.changelog/v0.37.0/breaking-changes/9122-abci-renamed-lastcommitinfo-commitinfo.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[abci]` Renamed `LastCommitInfo` to `CommitInfo` in preparation for vote - extensions. ([\#9122](https://github.com/tendermint/tendermint/pull/9122)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/9144-change-english-speling.md b/.changelog/v0.37.0/breaking-changes/9144-change-english-speling.md deleted file mode 100644 index 6a37394c74a..00000000000 --- a/.changelog/v0.37.0/breaking-changes/9144-change-english-speling.md +++ /dev/null @@ -1,3 +0,0 @@ -- Change spelling from British English to American. Rename - `Subscription.Cancelled()` to `Subscription.Canceled()` in `libs/pubsub` - ([\#9144](https://github.com/tendermint/tendermint/pull/9144)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/9145-abci-remove-setoption.md b/.changelog/v0.37.0/breaking-changes/9145-abci-remove-setoption.md deleted file mode 100644 index 1332d9cb591..00000000000 --- a/.changelog/v0.37.0/breaking-changes/9145-abci-remove-setoption.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[abci]` Removes unused Response/Request `SetOption` from ABCI - ([\#9145](https://github.com/tendermint/tendermint/pull/9145)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/9259-config-rename-fastsync-blocksync.md b/.changelog/v0.37.0/breaking-changes/9259-config-rename-fastsync-blocksync.md deleted file mode 100644 index 228f6a08c79..00000000000 --- a/.changelog/v0.37.0/breaking-changes/9259-config-rename-fastsync-blocksync.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[config]` Rename the fastsync section and the - fast\_sync key blocksync and block\_sync respectively - ([\#9259](https://github.com/tendermint/tendermint/pull/9259)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/9287-abci-multiple-field-renaming-a.md b/.changelog/v0.37.0/breaking-changes/9287-abci-multiple-field-renaming-a.md deleted file mode 100644 index 6e1ef58cb3f..00000000000 --- a/.changelog/v0.37.0/breaking-changes/9287-abci-multiple-field-renaming-a.md +++ /dev/null @@ -1,5 +0,0 @@ -- `[abci/params]` Deduplicate `ConsensusParams` and `BlockParams` so - only `types` proto definitions are use. Remove `TimeIotaMs` and use - a hard-coded 1 millisecond value to ensure monotonically increasing - block times. Rename `AppVersion` to `App` so as to not stutter. - ([\#9287](https://github.com/tendermint/tendermint/pull/9287)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/9287-abci-multiple-field-renaming-b.md b/.changelog/v0.37.0/breaking-changes/9287-abci-multiple-field-renaming-b.md deleted file mode 100644 index 88d3b08838c..00000000000 --- a/.changelog/v0.37.0/breaking-changes/9287-abci-multiple-field-renaming-b.md +++ /dev/null @@ -1,6 +0,0 @@ -- `[types]` Reduce the use of protobuf types in core logic. `ConsensusParams`, - `BlockParams`, `ValidatorParams`, `EvidenceParams`, `VersionParams` have - become native types. They still utilize protobuf when being sent over - the wire or written to disk. Moved `ValidateConsensusParams` inside - (now native type) `ConsensusParams`, and renamed it to `ValidateBasic`. - ([\#9287](https://github.com/tendermint/tendermint/pull/9287)) \ No newline at end of file diff --git a/.changelog/v0.37.0/breaking-changes/9301-abci-add-v1-methods.md b/.changelog/v0.37.0/breaking-changes/9301-abci-add-v1-methods.md deleted file mode 100644 index efb1b95a1ad..00000000000 --- a/.changelog/v0.37.0/breaking-changes/9301-abci-add-v1-methods.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[abci]` New ABCI methods `PrepareProposal` and `ProcessProposal` which give - the app control over transactions proposed and allows for verification of - proposed blocks. ([\#9301](https://github.com/tendermint/tendermint/pull/9301)) \ No newline at end of file diff --git a/.changelog/v0.37.0/bug-fixes/382-txindexer-fix-slash-parsing.md b/.changelog/v0.37.0/bug-fixes/382-txindexer-fix-slash-parsing.md deleted file mode 100644 index 8537c9d7377..00000000000 --- a/.changelog/v0.37.0/bug-fixes/382-txindexer-fix-slash-parsing.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[state/kvindexer]` Resolved crashes when event values contained slashes, - introduced after adding event sequences in - [\#77](https://github.com/cometbft/cometbft/pull/77). @jmalicevic - ([\#382](https://github.com/cometbft/cometbft/pull/382)) diff --git a/.changelog/v0.37.0/bug-fixes/386-quick-fix-needproofblock.md b/.changelog/v0.37.0/bug-fixes/386-quick-fix-needproofblock.md deleted file mode 100644 index 2180086ce97..00000000000 --- a/.changelog/v0.37.0/bug-fixes/386-quick-fix-needproofblock.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[consensus]` ([\#386](https://github.com/cometbft/cometbft/pull/386)) Short-term fix for the case when `needProofBlock` cannot find previous block meta by defaulting to the creation of a new proof block. (@adizere) - - Special thanks to the [Vega.xyz](https://vega.xyz/) team, and in particular to Zohar (@ze97286), for reporting the problem and working with us to get to a fix. diff --git a/.changelog/v0.37.0/bug-fixes/4-busy-loop-send-block-part.md b/.changelog/v0.37.0/bug-fixes/4-busy-loop-send-block-part.md deleted file mode 100644 index 59bda2afc3e..00000000000 --- a/.changelog/v0.37.0/bug-fixes/4-busy-loop-send-block-part.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[consensus]` Fixed a busy loop that happened when sending of a block part failed by sleeping in case of error. - ([\#4](https://github.com/informalsystems/tendermint/pull/4)) \ No newline at end of file diff --git a/.changelog/v0.37.0/bug-fixes/77-kvindexer-fix-evattribute-indexing.md b/.changelog/v0.37.0/bug-fixes/77-kvindexer-fix-evattribute-indexing.md deleted file mode 100644 index 2d35d7e99d7..00000000000 --- a/.changelog/v0.37.0/bug-fixes/77-kvindexer-fix-evattribute-indexing.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[state/kvindexer]` Fixed the default behaviour of the kvindexer to index and - query attributes by events in which they occur. In 0.34.25 this was mitigated - by a separated RPC flag. @jmalicevic - ([\#77](https://github.com/cometbft/cometbft/pull/77)) diff --git a/.changelog/v0.37.0/bug-fixes/9073-docker-enable-cross-platform-build.md b/.changelog/v0.37.0/bug-fixes/9073-docker-enable-cross-platform-build.md deleted file mode 100644 index ef3891f5118..00000000000 --- a/.changelog/v0.37.0/bug-fixes/9073-docker-enable-cross-platform-build.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[docker]` enable cross platform build using docker buildx - ([\#9073](https://github.com/tendermint/tendermint/pull/9073)) \ No newline at end of file diff --git a/.changelog/v0.37.0/bug-fixes/9229-consensus-fix-enterpropose-roundno.md b/.changelog/v0.37.0/bug-fixes/9229-consensus-fix-enterpropose-roundno.md deleted file mode 100644 index 071f6210d19..00000000000 --- a/.changelog/v0.37.0/bug-fixes/9229-consensus-fix-enterpropose-roundno.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[consensus]` fix round number of `enterPropose` - when handling `RoundStepNewRound` timeout. - ([\#9229](https://github.com/tendermint/tendermint/pull/9229)) \ No newline at end of file diff --git a/.changelog/v0.37.0/bug-fixes/9462-docker-use-right-go-version.md b/.changelog/v0.37.0/bug-fixes/9462-docker-use-right-go-version.md deleted file mode 100644 index 16bee8a631c..00000000000 --- a/.changelog/v0.37.0/bug-fixes/9462-docker-use-right-go-version.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[docker]` ensure Docker image uses consistent version of Go - ([\#9462](https://github.com/tendermint/tendermint/pull/9462)) \ No newline at end of file diff --git a/.changelog/v0.37.0/bug-fixes/9500-p2p-prevent-adding-errored-peers.md b/.changelog/v0.37.0/bug-fixes/9500-p2p-prevent-adding-errored-peers.md deleted file mode 100644 index 41038ddb62e..00000000000 --- a/.changelog/v0.37.0/bug-fixes/9500-p2p-prevent-adding-errored-peers.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[p2p]` prevent peers who have errored from being added to `peer_set` - ([\#9500](https://github.com/tendermint/tendermint/pull/9500)) \ No newline at end of file diff --git a/.changelog/v0.37.0/bug-fixes/9518-blocksync-handle-senqueueue-full.md b/.changelog/v0.37.0/bug-fixes/9518-blocksync-handle-senqueueue-full.md deleted file mode 100644 index b486654b17d..00000000000 --- a/.changelog/v0.37.0/bug-fixes/9518-blocksync-handle-senqueueue-full.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[blocksync]` handle the case when the sending - queue is full: retry block request after a timeout - ([\#9518](https://github.com/tendermint/tendermint/pull/9518)) \ No newline at end of file diff --git a/.changelog/v0.37.0/features/9301-abci-add-v1-methods.md b/.changelog/v0.37.0/features/9301-abci-add-v1-methods.md deleted file mode 100644 index efb1b95a1ad..00000000000 --- a/.changelog/v0.37.0/features/9301-abci-add-v1-methods.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[abci]` New ABCI methods `PrepareProposal` and `ProcessProposal` which give - the app control over transactions proposed and allows for verification of - proposed blocks. ([\#9301](https://github.com/tendermint/tendermint/pull/9301)) \ No newline at end of file diff --git a/.changelog/v0.37.0/improvements/136-remove-tm-signer-harness.md b/.changelog/v0.37.0/improvements/136-remove-tm-signer-harness.md deleted file mode 100644 index 6eb6c2158c2..00000000000 --- a/.changelog/v0.37.0/improvements/136-remove-tm-signer-harness.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[tools/tm-signer-harness]` Remove the folder as it is unused - ([\#136](https://github.com/cometbft/cometbft/issues/136)) \ No newline at end of file diff --git a/.changelog/v0.37.0/improvements/230-p2p-peer-msg-type-and-metric.md b/.changelog/v0.37.0/improvements/230-p2p-peer-msg-type-and-metric.md deleted file mode 100644 index 6eeede4c728..00000000000 --- a/.changelog/v0.37.0/improvements/230-p2p-peer-msg-type-and-metric.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[p2p]` Reactor `Send`, `TrySend` and `Receive` renamed to `SendEnvelope`, - `TrySendEnvelope` and `ReceiveEnvelope` to allow metrics to be appended to - messages and measure bytes sent/received. - ([\#230](https://github.com/cometbft/cometbft/pull/230)) \ No newline at end of file diff --git a/.changelog/v0.37.0/improvements/56-rpc-cache-rpc-responses.md b/.changelog/v0.37.0/improvements/56-rpc-cache-rpc-responses.md deleted file mode 100644 index 344b3df93b9..00000000000 --- a/.changelog/v0.37.0/improvements/56-rpc-cache-rpc-responses.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[e2e]` Add functionality for uncoordinated (minor) upgrades - ([\#56](https://github.com/tendermint/tendermint/pull/56)) \ No newline at end of file diff --git a/.changelog/v0.37.0/improvements/5706-abci-add-version-plus-info.md b/.changelog/v0.37.0/improvements/5706-abci-add-version-plus-info.md deleted file mode 100644 index 1225ec4769a..00000000000 --- a/.changelog/v0.37.0/improvements/5706-abci-add-version-plus-info.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[abci]` Added `AbciVersion` to `RequestInfo` allowing - applications to check ABCI version when connecting to CometBFT. - ([\#5706](https://github.com/tendermint/tendermint/pull/5706)) \ No newline at end of file diff --git a/.changelog/v0.37.0/improvements/9171-cli-add-hard-flag.md b/.changelog/v0.37.0/improvements/9171-cli-add-hard-flag.md deleted file mode 100644 index febc57f4265..00000000000 --- a/.changelog/v0.37.0/improvements/9171-cli-add-hard-flag.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[cli]` add `--hard` flag to rollback command (and a boolean to the `RollbackState` method). This will rollback - state and remove the last block. This command can be triggered multiple times. The application must also rollback - state to the same height. - ([\#9171](https://github.com/tendermint/tendermint/pull/9171)) diff --git a/.changelog/v0.37.0/improvements/9250-crypto-update-btcec-btcutil.md b/.changelog/v0.37.0/improvements/9250-crypto-update-btcec-btcutil.md deleted file mode 100644 index 3c3bd0ec304..00000000000 --- a/.changelog/v0.37.0/improvements/9250-crypto-update-btcec-btcutil.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[crypto]` Update to use btcec v2 and the latest btcutil. - ([\#9250](https://github.com/tendermint/tendermint/pull/9250)) \ No newline at end of file diff --git a/.changelog/v0.37.0/improvements/9276-rpc-add-header-queries.md b/.changelog/v0.37.0/improvements/9276-rpc-add-header-queries.md deleted file mode 100644 index 9daeac4cab3..00000000000 --- a/.changelog/v0.37.0/improvements/9276-rpc-add-header-queries.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[rpc]` Added `header` and `header_by_hash` queries to the RPC client - ([\#9276](https://github.com/tendermint/tendermint/pull/9276)) \ No newline at end of file diff --git a/.changelog/v0.37.0/improvements/9356-proto-use-cosmos-gogo.md b/.changelog/v0.37.0/improvements/9356-proto-use-cosmos-gogo.md deleted file mode 100644 index c64b6def3bf..00000000000 --- a/.changelog/v0.37.0/improvements/9356-proto-use-cosmos-gogo.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[proto]` Migrate from `gogo/protobuf` to `cosmos/gogoproto` - ([\#9356](https://github.com/tendermint/tendermint/pull/9356)) \ No newline at end of file diff --git a/.changelog/v0.37.0/improvements/9650-rpc-enable-caching.md b/.changelog/v0.37.0/improvements/9650-rpc-enable-caching.md deleted file mode 100644 index 3b6b5034726..00000000000 --- a/.changelog/v0.37.0/improvements/9650-rpc-enable-caching.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[rpc]` Enable caching of RPC responses - ([\#9650](https://github.com/tendermint/tendermint/pull/9650)) \ No newline at end of file diff --git a/.changelog/v0.37.0/improvements/9760-consensus-ref-to-previous-height-precommits.md b/.changelog/v0.37.0/improvements/9760-consensus-ref-to-previous-height-precommits.md deleted file mode 100644 index 4763bd2d39e..00000000000 --- a/.changelog/v0.37.0/improvements/9760-consensus-ref-to-previous-height-precommits.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[consensus]` Save peer LastCommit correctly to achieve 50% reduction in gossiped precommits. - ([\#9760](https://github.com/tendermint/tendermint/pull/9760)) \ No newline at end of file diff --git a/.changelog/v0.37.0/summary.md b/.changelog/v0.37.0/summary.md deleted file mode 100644 index b96e98f5e96..00000000000 --- a/.changelog/v0.37.0/summary.md +++ /dev/null @@ -1,25 +0,0 @@ -*March 6, 2023* - -This is the first CometBFT release with ABCI 1.0, which introduces the -`PrepareProposal` and `ProcessProposal` methods, with the aim of expanding the -range of use cases that application developers can address. This is the first -change to ABCI towards ABCI++, and the full range of ABCI++ functionality will -only become available in the next major release with ABCI 2.0. See the -[specification](./spec/abci/) for more details. - -In the v0.34.27 release, the CometBFT Go module is still -`github.com/tendermint/tendermint` to facilitate ease of upgrading for users, -but in this release we have changed this to `github.com/cometbft/cometbft`. - -Please also see our [upgrading guidelines](./UPGRADING.md) for more details on -upgrading from the v0.34 release series. - -Also see our [QA results](https://docs.cometbft.com/v0.37/qa/v037/cometbft) for -the v0.37 release. - -We'd love your feedback on this release! Please reach out to us via one of our -communication channels, such as [GitHub -Discussions](https://github.com/cometbft/cometbft/discussions), with any of your -questions, comments and/or concerns. - -See below for more details. diff --git a/.changelog/v0.38.0/breaking-changes/1057-bootstrap-state-api.md b/.changelog/v0.38.0/breaking-changes/1057-bootstrap-state-api.md deleted file mode 100644 index dec9de27bfa..00000000000 --- a/.changelog/v0.38.0/breaking-changes/1057-bootstrap-state-api.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[node/state]` Add Go API to bootstrap block store and state store to a height. Make sure block sync starts syncing from bootstrapped height. - ([\#1057](https://github.com/tendermint/tendermint/pull/#1057)) (@yihuang) -- `[state/store]` Added Go functions to save height at which offline state sync is performed. - ([\#1057](https://github.com/tendermint/tendermint/pull/#1057)) (@jmalicevic) diff --git a/.changelog/v0.38.0/breaking-changes/1113-rm-upnp.md b/.changelog/v0.38.0/breaking-changes/1113-rm-upnp.md deleted file mode 100644 index bb95f20c082..00000000000 --- a/.changelog/v0.38.0/breaking-changes/1113-rm-upnp.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[p2p]` Remove UPnP functionality - ([\#1113](https://github.com/cometbft/cometbft/issues/1113)) \ No newline at end of file diff --git a/.changelog/v0.38.0/breaking-changes/1120-node-api-cleanup.md b/.changelog/v0.38.0/breaking-changes/1120-node-api-cleanup.md deleted file mode 100644 index 8c049370997..00000000000 --- a/.changelog/v0.38.0/breaking-changes/1120-node-api-cleanup.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[node]` Removed `ConsensusState()` accessor from `Node` - struct - all access to consensus state should go via the reactor - ([\#1120](https://github.com/cometbft/cometbft/pull/1120)) diff --git a/.changelog/v0.38.0/breaking-changes/1270-executor_extend_vote.md b/.changelog/v0.38.0/breaking-changes/1270-executor_extend_vote.md deleted file mode 100644 index 975c8f8232e..00000000000 --- a/.changelog/v0.38.0/breaking-changes/1270-executor_extend_vote.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[state]` Signature of `ExtendVote` changed in `BlockExecutor`. - It now includes the block whose precommit will be extended, an the state object. - ([\#1270](https://github.com/cometbft/cometbft/pull/1270)) diff --git a/.changelog/v0.38.0/breaking-changes/260-remove-priority-mempool-config.md b/.changelog/v0.38.0/breaking-changes/260-remove-priority-mempool-config.md deleted file mode 100644 index c989879b9e4..00000000000 --- a/.changelog/v0.38.0/breaking-changes/260-remove-priority-mempool-config.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[config]` Remove `Version` field from `MempoolConfig`. - ([\#260](https://github.com/cometbft/cometbft/issues/260)) diff --git a/.changelog/v0.38.0/breaking-changes/260-remove-priority-mempool-proto.md b/.changelog/v0.38.0/breaking-changes/260-remove-priority-mempool-proto.md deleted file mode 100644 index 042001178b3..00000000000 --- a/.changelog/v0.38.0/breaking-changes/260-remove-priority-mempool-proto.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[protobuf]` Remove fields `sender`, `priority`, and `mempool_error` from - `ResponseCheckTx`. ([\#260](https://github.com/cometbft/cometbft/issues/260)) diff --git a/.changelog/v0.38.0/breaking-changes/260-remove-priority-mempool.md b/.changelog/v0.38.0/breaking-changes/260-remove-priority-mempool.md deleted file mode 100644 index e76a567afeb..00000000000 --- a/.changelog/v0.38.0/breaking-changes/260-remove-priority-mempool.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[mempool]` Remove priority mempool. - ([\#260](https://github.com/cometbft/cometbft/issues/260)) diff --git a/.changelog/v0.38.0/breaking-changes/558-tm10011.md b/.changelog/v0.38.0/breaking-changes/558-tm10011.md deleted file mode 100644 index d1b9fca4aba..00000000000 --- a/.changelog/v0.38.0/breaking-changes/558-tm10011.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[crypto/merkle]` Do not allow verification of Merkle Proofs against empty trees (`nil` root). `Proof.ComputeRootHash` now panics when it encounters an error, but `Proof.Verify` does not panic - ([\#558](https://github.com/cometbft/cometbft/issues/558)) diff --git a/.changelog/v0.38.0/breaking-changes/6541-state-move-pruneblocks-execution.md b/.changelog/v0.38.0/breaking-changes/6541-state-move-pruneblocks-execution.md deleted file mode 100644 index 2dacade96c3..00000000000 --- a/.changelog/v0.38.0/breaking-changes/6541-state-move-pruneblocks-execution.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[state]` Move pruneBlocks from node/state to state/execution. - ([\#6541](https://github.com/tendermint/tendermint/pull/6541)) \ No newline at end of file diff --git a/.changelog/v0.38.0/breaking-changes/774-state-indexerevent-remove-function-type copy.md b/.changelog/v0.38.0/breaking-changes/774-state-indexerevent-remove-function-type copy.md deleted file mode 100644 index 4e8fcb82295..00000000000 --- a/.changelog/v0.38.0/breaking-changes/774-state-indexerevent-remove-function-type copy.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[rpc]` Removed `begin_block_events` and `end_block_events` from `BlockResultsResponse`. - The events are merged into one field called `finalize_block_events`. - ([\#9427](https://github.com/tendermint/tendermint/issues/9427)) diff --git a/.changelog/v0.38.0/breaking-changes/774-state-indexerevent-remove-function-type.md b/.changelog/v0.38.0/breaking-changes/774-state-indexerevent-remove-function-type.md deleted file mode 100644 index 22a3b9fc5a3..00000000000 --- a/.changelog/v0.38.0/breaking-changes/774-state-indexerevent-remove-function-type.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[state/kvindexer]` Remove the function type from the event key stored in the database. This should be breaking only -for people who forked CometBFT and interact directly with the indexers kvstore. - ([\#774](https://github.com/cometbft/cometbft/pull/774)) \ No newline at end of file diff --git a/.changelog/v0.38.0/breaking-changes/797-kvindexer-support-for-big-numbers.md b/.changelog/v0.38.0/breaking-changes/797-kvindexer-support-for-big-numbers.md deleted file mode 100644 index e64e2775d34..00000000000 --- a/.changelog/v0.38.0/breaking-changes/797-kvindexer-support-for-big-numbers.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[kvindexer]` Added support for big integers and big floats in the kvindexer. - Breaking changes: function `Number` in package `libs/pubsub/query/syntax` changed its return value. - ([\#797](https://github.com/cometbft/cometbft/pull/797)) diff --git a/.changelog/v0.38.0/breaking-changes/797-pubsub-support-for-big-numbers.md b/.changelog/v0.38.0/breaking-changes/797-pubsub-support-for-big-numbers.md deleted file mode 100644 index 33778282eaf..00000000000 --- a/.changelog/v0.38.0/breaking-changes/797-pubsub-support-for-big-numbers.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[pubsub]` Added support for big integers and big floats in the pubsub event query system. - Breaking changes: function `Number` in package `libs/pubsub/query/syntax` changed its return value. - ([\#797](https://github.com/cometbft/cometbft/pull/797)) diff --git a/.changelog/v0.38.0/breaking-changes/8664-move-app-hash-to-commit.md b/.changelog/v0.38.0/breaking-changes/8664-move-app-hash-to-commit.md deleted file mode 100644 index a22b3926477..00000000000 --- a/.changelog/v0.38.0/breaking-changes/8664-move-app-hash-to-commit.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[abci]` Move `app_hash` parameter from `Commit` to `FinalizeBlock` - ([\#8664](https://github.com/tendermint/tendermint/pull/8664)) diff --git a/.changelog/v0.38.0/breaking-changes/9468-finalize-block.md b/.changelog/v0.38.0/breaking-changes/9468-finalize-block.md deleted file mode 100644 index e27f65e55e5..00000000000 --- a/.changelog/v0.38.0/breaking-changes/9468-finalize-block.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[abci]` Introduce `FinalizeBlock` which condenses `BeginBlock`, `DeliverTx` - and `EndBlock` into a single method call - ([\#9468](https://github.com/tendermint/tendermint/pull/9468)) diff --git a/.changelog/v0.38.0/breaking-changes/9625-p2p-remove-trust-package.md b/.changelog/v0.38.0/breaking-changes/9625-p2p-remove-trust-package.md deleted file mode 100644 index e5aa612fdda..00000000000 --- a/.changelog/v0.38.0/breaking-changes/9625-p2p-remove-trust-package.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[p2p]` Remove unused p2p/trust package - ([\#9625](https://github.com/tendermint/tendermint/pull/9625)) \ No newline at end of file diff --git a/.changelog/v0.38.0/breaking-changes/9655-inspect-add-command.md b/.changelog/v0.38.0/breaking-changes/9655-inspect-add-command.md deleted file mode 100644 index 29eedbe1124..00000000000 --- a/.changelog/v0.38.0/breaking-changes/9655-inspect-add-command.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[inspect]` Add a new `inspect` command for introspecting - the state and block store of a crashed tendermint node. - ([\#9655](https://github.com/tendermint/tendermint/pull/9655)) \ No newline at end of file diff --git a/.changelog/v0.38.0/breaking-changes/9655-node-move-DB-vars-config.md b/.changelog/v0.38.0/breaking-changes/9655-node-move-DB-vars-config.md deleted file mode 100644 index 86259b96a8b..00000000000 --- a/.changelog/v0.38.0/breaking-changes/9655-node-move-DB-vars-config.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[node]` Move DBContext and DBProvider from the node package to the config - package. ([\#9655](https://github.com/tendermint/tendermint/pull/9655)) \ No newline at end of file diff --git a/.changelog/v0.38.0/breaking-changes/9655-rpc-remove-environment-var.md b/.changelog/v0.38.0/breaking-changes/9655-rpc-remove-environment-var.md deleted file mode 100644 index b4113cb906e..00000000000 --- a/.changelog/v0.38.0/breaking-changes/9655-rpc-remove-environment-var.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[rpc]` Remove global environment and replace with constructor - ([\#9655](https://github.com/tendermint/tendermint/pull/9655)) \ No newline at end of file diff --git a/.changelog/v0.38.0/breaking-changes/9682-metrics-refactor-state-block-synching.md b/.changelog/v0.38.0/breaking-changes/9682-metrics-refactor-state-block-synching.md deleted file mode 100644 index 25205fc6108..00000000000 --- a/.changelog/v0.38.0/breaking-changes/9682-metrics-refactor-state-block-synching.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[metrics]` Move state-syncing and block-syncing metrics to - their respective packages. Move labels from block_syncing - -> blocksync_syncing and state_syncing -> statesync_syncing - ([\#9682](https://github.com/tendermint/tendermint/pull/9682)) \ No newline at end of file diff --git a/.changelog/v0.38.0/breaking-changes/980-max-size-more-control.md b/.changelog/v0.38.0/breaking-changes/980-max-size-more-control.md deleted file mode 100644 index e4354e3cb05..00000000000 --- a/.changelog/v0.38.0/breaking-changes/980-max-size-more-control.md +++ /dev/null @@ -1,9 +0,0 @@ -- `[mempool]` Application can now set `ConsensusParams.Block.MaxBytes` to -1 - to have visibility on all transactions in the - mempool at `PrepareProposal` time. - This means that the total size of transactions sent via `RequestPrepareProposal` - might exceed `RequestPrepareProposal.max_tx_bytes`. - If that is the case, the application MUST make sure that the total size of transactions - returned in `ResponsePrepareProposal.txs` does not exceed `RequestPrepareProposal.max_tx_bytes`, - otherwise CometBFT will panic. - ([\#980](https://github.com/cometbft/cometbft/issues/980)) \ No newline at end of file diff --git a/.changelog/v0.38.0/bug-fixes/423-forwardport-default-kvindexer-behaviour.md b/.changelog/v0.38.0/bug-fixes/423-forwardport-default-kvindexer-behaviour.md deleted file mode 100644 index 0563a981af6..00000000000 --- a/.changelog/v0.38.0/bug-fixes/423-forwardport-default-kvindexer-behaviour.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[kvindexer]` Forward porting the fixes done to the kvindexer in 0.37 in PR \#77 - ([\#423](https://github.com/cometbft/cometbft/pull/423)) \ No newline at end of file diff --git a/.changelog/v0.38.0/bug-fixes/496-error-on-applyblock-should-panic.md b/.changelog/v0.38.0/bug-fixes/496-error-on-applyblock-should-panic.md deleted file mode 100644 index 55e9c874f8c..00000000000 --- a/.changelog/v0.38.0/bug-fixes/496-error-on-applyblock-should-panic.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[consensus]` Unexpected error conditions in `ApplyBlock` are non-recoverable, so ignoring the error and carrying on is a bug. We replaced a `return` that disregarded the error by a `panic`. - ([\#496](https://github.com/cometbft/cometbft/pull/496)) \ No newline at end of file diff --git a/.changelog/v0.38.0/bug-fixes/524-rename-peerstate-tojson.md b/.changelog/v0.38.0/bug-fixes/524-rename-peerstate-tojson.md deleted file mode 100644 index b9a43b3ce4e..00000000000 --- a/.changelog/v0.38.0/bug-fixes/524-rename-peerstate-tojson.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[consensus]` Rename `(*PeerState).ToJSON` to `MarshalJSON` to fix a logging data race - ([\#524](https://github.com/cometbft/cometbft/pull/524)) diff --git a/.changelog/v0.38.0/bug-fixes/575-fix-light-client-panic.md b/.changelog/v0.38.0/bug-fixes/575-fix-light-client-panic.md deleted file mode 100644 index 0ec55b923fb..00000000000 --- a/.changelog/v0.38.0/bug-fixes/575-fix-light-client-panic.md +++ /dev/null @@ -1,6 +0,0 @@ -- `[light]` Fixed an edge case where a light client would panic when attempting - to query a node that (1) has started from a non-zero height and (2) does - not yet have any data. The light client will now, correctly, not panic - _and_ keep the node in its list of providers in the same way it would if - it queried a node starting from height zero that does not yet have data - ([\#575](https://github.com/cometbft/cometbft/issues/575)) \ No newline at end of file diff --git a/.changelog/v0.38.0/bug-fixes/855-snake-case-json-for-exec-tx-result-fields.md b/.changelog/v0.38.0/bug-fixes/855-snake-case-json-for-exec-tx-result-fields.md deleted file mode 100644 index 27f5fe53512..00000000000 --- a/.changelog/v0.38.0/bug-fixes/855-snake-case-json-for-exec-tx-result-fields.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[abci]` Restore the snake_case naming in JSON serialization of - `ExecTxResult` ([\#855](https://github.com/cometbft/cometbft/issues/855)). diff --git a/.changelog/v0.38.0/bug-fixes/865-fix-peerstate-marshaljson.md b/.changelog/v0.38.0/bug-fixes/865-fix-peerstate-marshaljson.md deleted file mode 100644 index 318bda315c5..00000000000 --- a/.changelog/v0.38.0/bug-fixes/865-fix-peerstate-marshaljson.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[consensus]` Avoid recursive call after rename to (*PeerState).MarshalJSON - ([\#863](https://github.com/cometbft/cometbft/pull/863)) diff --git a/.changelog/v0.38.0/bug-fixes/890-mempool-fix-cache.md b/.changelog/v0.38.0/bug-fixes/890-mempool-fix-cache.md deleted file mode 100644 index 78ade6f4c1c..00000000000 --- a/.changelog/v0.38.0/bug-fixes/890-mempool-fix-cache.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[mempool/clist_mempool]` Prevent a transaction to appear twice in the mempool - ([\#890](https://github.com/cometbft/cometbft/pull/890): @otrack) diff --git a/.changelog/v0.38.0/bug-fixes/9462-docker-go-use-consistent-version.md b/.changelog/v0.38.0/bug-fixes/9462-docker-go-use-consistent-version.md deleted file mode 100644 index ef92eb839de..00000000000 --- a/.changelog/v0.38.0/bug-fixes/9462-docker-go-use-consistent-version.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[docker]` Ensure Docker image uses consistent version of Go. - ([\#9462](https://github.com/tendermint/tendermint/pull/9462)) \ No newline at end of file diff --git a/.changelog/v0.38.0/bug-fixes/9717-abci-cli-fix-help.md b/.changelog/v0.38.0/bug-fixes/9717-abci-cli-fix-help.md deleted file mode 100644 index 808faa3ee73..00000000000 --- a/.changelog/v0.38.0/bug-fixes/9717-abci-cli-fix-help.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[abci-cli]` Fix broken abci-cli help command. - ([\#9717](https://github.com/tendermint/tendermint/pull/9717)) \ No newline at end of file diff --git a/.changelog/v0.38.0/deprecations/650-deprecate-grpc-broadcast-api.md b/.changelog/v0.38.0/deprecations/650-deprecate-grpc-broadcast-api.md deleted file mode 100644 index 7ab623a6998..00000000000 --- a/.changelog/v0.38.0/deprecations/650-deprecate-grpc-broadcast-api.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[rpc/grpc]` Mark the gRPC broadcast API as deprecated. - It will be superseded by a broader API as part of - [\#81](https://github.com/cometbft/cometbft/issues/81) - ([\#650](https://github.com/cometbft/cometbft/issues/650)) \ No newline at end of file diff --git a/.changelog/v0.38.0/features/1057-bootstrap-state-api.md b/.changelog/v0.38.0/features/1057-bootstrap-state-api.md deleted file mode 100644 index ff3dcb6820a..00000000000 --- a/.changelog/v0.38.0/features/1057-bootstrap-state-api.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[node/state]` Add Go API to bootstrap block store and state store to a height - ([\#1057](https://github.com/tendermint/tendermint/pull/#1057)) (@yihuang) \ No newline at end of file diff --git a/.changelog/v0.38.0/features/9830-proxy-introduce-newconnsynclocalclientcreator.md b/.changelog/v0.38.0/features/9830-proxy-introduce-newconnsynclocalclientcreator.md deleted file mode 100644 index a7c8a0f69fc..00000000000 --- a/.changelog/v0.38.0/features/9830-proxy-introduce-newconnsynclocalclientcreator.md +++ /dev/null @@ -1,5 +0,0 @@ -- `[proxy]` Introduce `NewConnSyncLocalClientCreator`, which allows local ABCI - clients to have the same concurrency model as remote clients (i.e. one mutex - per client "connection", for each of the four ABCI "connections"). - ([tendermint/tendermint\#9830](https://github.com/tendermint/tendermint/pull/9830) - and [\#1145](https://github.com/cometbft/cometbft/pull/1145)) diff --git a/.changelog/v0.38.0/features/9830-proxy-introduce-newunsynclocalclientcreator.md b/.changelog/v0.38.0/features/9830-proxy-introduce-newunsynclocalclientcreator.md deleted file mode 100644 index 73334710807..00000000000 --- a/.changelog/v0.38.0/features/9830-proxy-introduce-newunsynclocalclientcreator.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[proxy]` Introduce `NewUnsyncLocalClientCreator`, which allows local ABCI - clients to have the same concurrency model as remote clients (i.e. one - mutex per client "connection", for each of the four ABCI "connections"). - ([\#9830](https://github.com/tendermint/tendermint/pull/9830)) \ No newline at end of file diff --git a/.changelog/v0.38.0/features/9836-abci-add-vote-extension.md b/.changelog/v0.38.0/features/9836-abci-add-vote-extension.md deleted file mode 100644 index 4d8df79c720..00000000000 --- a/.changelog/v0.38.0/features/9836-abci-add-vote-extension.md +++ /dev/null @@ -1 +0,0 @@ -- `[abci]` New ABCI methods `VerifyVoteExtension` and `ExtendVote` allow validators to validate the vote extension data attached to a pre-commit message and allow applications to let their validators do more than just validate within consensus ([\#9836](https://github.com/tendermint/tendermint/pull/9836)) diff --git a/.changelog/v0.38.0/improvements/1210-close-evidence-db.md b/.changelog/v0.38.0/improvements/1210-close-evidence-db.md deleted file mode 100644 index e32bc87dbe1..00000000000 --- a/.changelog/v0.38.0/improvements/1210-close-evidence-db.md +++ /dev/null @@ -1 +0,0 @@ -- `[node]` Close evidence.db OnStop ([cometbft/cometbft\#1210](https://github.com/cometbft/cometbft/pull/1210): @chillyvee) diff --git a/.changelog/v0.38.0/improvements/1264-log-app-hash-as-hex.md b/.changelog/v0.38.0/improvements/1264-log-app-hash-as-hex.md deleted file mode 100644 index 2e530c73895..00000000000 --- a/.changelog/v0.38.0/improvements/1264-log-app-hash-as-hex.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[state]` Make logging `block_app_hash` and `app_hash` consistent by logging them both as hex. - ([\#1264](https://github.com/cometbft/cometbft/pull/1264)) diff --git a/.changelog/v0.38.0/improvements/543-metrics-for-blocksync.md b/.changelog/v0.38.0/improvements/543-metrics-for-blocksync.md deleted file mode 100644 index 824e20df9c1..00000000000 --- a/.changelog/v0.38.0/improvements/543-metrics-for-blocksync.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[blocksync]` Generate new metrics during BlockSync - ([\#543](https://github.com/cometbft/cometbft/pull/543)) \ No newline at end of file diff --git a/.changelog/v0.38.0/improvements/638-json-rpc-error-message.md b/.changelog/v0.38.0/improvements/638-json-rpc-error-message.md deleted file mode 100644 index 6922091fd25..00000000000 --- a/.changelog/v0.38.0/improvements/638-json-rpc-error-message.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[jsonrpc/client]` Improve the error message for client errors stemming from - bad HTTP responses. - ([cometbft/cometbft\#638](https://github.com/cometbft/cometbft/pull/638)) diff --git a/.changelog/v0.38.0/improvements/6443-merkle-hashalternatives-perf-improv-a.md b/.changelog/v0.38.0/improvements/6443-merkle-hashalternatives-perf-improv-a.md deleted file mode 100644 index 37050537e5e..00000000000 --- a/.changelog/v0.38.0/improvements/6443-merkle-hashalternatives-perf-improv-a.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[crypto/merkle]` Improve HashAlternatives performance - ([\#6443](https://github.com/tendermint/tendermint/pull/6443)) \ No newline at end of file diff --git a/.changelog/v0.38.0/improvements/6509-pex-addrbook-perf-improv.md b/.changelog/v0.38.0/improvements/6509-pex-addrbook-perf-improv.md deleted file mode 100644 index 00eef5aa332..00000000000 --- a/.changelog/v0.38.0/improvements/6509-pex-addrbook-perf-improv.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[p2p/pex]` Improve addrBook.hash performance - ([\#6509](https://github.com/tendermint/tendermint/pull/6509)) \ No newline at end of file diff --git a/.changelog/v0.38.0/improvements/6513-merkle-hashalternatives-perf-improv-b.md b/.changelog/v0.38.0/improvements/6513-merkle-hashalternatives-perf-improv-b.md deleted file mode 100644 index 925bfb30876..00000000000 --- a/.changelog/v0.38.0/improvements/6513-merkle-hashalternatives-perf-improv-b.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[crypto/merkle]` Improve HashAlternatives performance - ([\#6513](https://github.com/tendermint/tendermint/pull/6513)) \ No newline at end of file diff --git a/.changelog/v0.38.0/improvements/654-rpc-rm-response-data-logs.md b/.changelog/v0.38.0/improvements/654-rpc-rm-response-data-logs.md deleted file mode 100644 index 3fddfee8e71..00000000000 --- a/.changelog/v0.38.0/improvements/654-rpc-rm-response-data-logs.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[rpc]` Remove response data from response failure logs in order - to prevent large quantities of log data from being produced - ([\#654](https://github.com/cometbft/cometbft/issues/654)) \ No newline at end of file diff --git a/.changelog/v0.38.0/improvements/7319-pubsub-query-perf-improv.md b/.changelog/v0.38.0/improvements/7319-pubsub-query-perf-improv.md deleted file mode 100644 index 8751039d44b..00000000000 --- a/.changelog/v0.38.0/improvements/7319-pubsub-query-perf-improv.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[pubsub]` Performance improvements for the event query API - ([\#7319](https://github.com/tendermint/tendermint/pull/7319)) \ No newline at end of file diff --git a/.changelog/v0.38.0/improvements/797-pubsub-float.md b/.changelog/v0.38.0/improvements/797-pubsub-float.md deleted file mode 100644 index c3d1a878554..00000000000 --- a/.changelog/v0.38.0/improvements/797-pubsub-float.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[pubsub/kvindexer]` Numeric query conditions and event values are represented as big floats with default precision of 125. - Integers are read as "big ints" and represented with as many bits as they need when converting to floats. - ([\#797](https://github.com/cometbft/cometbft/pull/797)) diff --git a/.changelog/v0.38.0/improvements/857-make-handshake-cancelable.md b/.changelog/v0.38.0/improvements/857-make-handshake-cancelable.md deleted file mode 100644 index 16b447f6d23..00000000000 --- a/.changelog/v0.38.0/improvements/857-make-handshake-cancelable.md +++ /dev/null @@ -1 +0,0 @@ -- `[node]` Make handshake cancelable ([cometbft/cometbft\#857](https://github.com/cometbft/cometbft/pull/857)) diff --git a/.changelog/v0.38.0/improvements/896-consensus-metric-duplicates.md b/.changelog/v0.38.0/improvements/896-consensus-metric-duplicates.md deleted file mode 100644 index 5661da834a9..00000000000 --- a/.changelog/v0.38.0/improvements/896-consensus-metric-duplicates.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[consensus]` New metrics (counters) to track duplicate votes and block parts. - ([\#896](https://github.com/cometbft/cometbft/pull/896)) \ No newline at end of file diff --git a/.changelog/v0.38.0/improvements/980-max-size-more-control.md b/.changelog/v0.38.0/improvements/980-max-size-more-control.md deleted file mode 100644 index e319779984c..00000000000 --- a/.changelog/v0.38.0/improvements/980-max-size-more-control.md +++ /dev/null @@ -1,5 +0,0 @@ -- `[mempool]` Application can now set `ConsensusParams.Block.MaxBytes` to -1 - to gain more control on the max size of transactions in a block. - It also allows the application to have visibility on all transactions in the - mempool at `PrepareProposal` time. - ([\#980](https://github.com/cometbft/cometbft/pull/980)) \ No newline at end of file diff --git a/.changelog/v0.38.0/summary.md b/.changelog/v0.38.0/summary.md deleted file mode 100644 index f34c7c5f82b..00000000000 --- a/.changelog/v0.38.0/summary.md +++ /dev/null @@ -1,13 +0,0 @@ -*September 12, 2023* - -This release includes the second part of ABCI++, called ABCI 2.0. -ABCI 2.0 introduces ABCI methods `ExtendVote` and `VerifyVoteExtension`. -These new methods allow the application to add data (opaque to CometBFT), -called _vote extensions_ to precommit votes sent by validators. -These vote extensions are made available to the proposer(s) of the next height. -Additionally, ABCI 2.0 coalesces `BeginBlock`, `DeliverTx`, and `EndBlock` -into one method, `FinalizeBlock`, whose `Request*` and `Response*` -data structures contain the sum of all data previously contained -in the respective `Request*` and `Response*` data structures in -`BeginBlock`, `DeliverTx`, and `EndBlock`. -See the [specification](./spec/abci/) for more details on ABCI 2.0. diff --git a/.changelog/v0.38.1/bug-fixes/1529-indexer-respect-height-params-on-query.md b/.changelog/v0.38.1/bug-fixes/1529-indexer-respect-height-params-on-query.md deleted file mode 100644 index d12f3eda536..00000000000 --- a/.changelog/v0.38.1/bug-fixes/1529-indexer-respect-height-params-on-query.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[state/indexer]` Respect both height params while querying for events - ([\#1529](https://github.com/cometbft/cometbft/pull/1529)) diff --git a/.changelog/v0.38.1/features/1512-metric-mempool-size-bytes.md b/.changelog/v0.38.1/features/1512-metric-mempool-size-bytes.md deleted file mode 100644 index b935dc40842..00000000000 --- a/.changelog/v0.38.1/features/1512-metric-mempool-size-bytes.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[metrics]` Add metric for mempool size in bytes `SizeBytes`. - ([\#1512](https://github.com/cometbft/cometbft/pull/1512)) \ No newline at end of file diff --git a/.changelog/v0.38.1/improvements/1558-experimental-gossip-limiting.md b/.changelog/v0.38.1/improvements/1558-experimental-gossip-limiting.md deleted file mode 100644 index 6931cef8274..00000000000 --- a/.changelog/v0.38.1/improvements/1558-experimental-gossip-limiting.md +++ /dev/null @@ -1,9 +0,0 @@ -- `[mempool]` Add experimental feature to limit the number of persistent peers and non-persistent - peers to which the node gossip transactions. - ([\#1558](https://github.com/cometbft/cometbft/pull/1558)) - ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) -- `[config]` Add mempool parameters `experimental_max_gossip_connections_to_persistent_peers` and - `experimental_max_gossip_connections_to_non_persistent_peers` for limiting the number of peers to - which the node gossip transactions. - ([\#1558](https://github.com/cometbft/cometbft/pull/1558)) - ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) diff --git a/.changelog/v0.38.1/summary.md b/.changelog/v0.38.1/summary.md deleted file mode 100644 index f1e5c7f755c..00000000000 --- a/.changelog/v0.38.1/summary.md +++ /dev/null @@ -1,5 +0,0 @@ -*November 17, 2023* - -This release contains, among other things, an opt-in, experimental feature to -help reduce the bandwidth consumption associated with the mempool's transaction -gossip. diff --git a/.changelog/v0.38.10/bug-fixes/3002-invalid-txs-results.md b/.changelog/v0.38.10/bug-fixes/3002-invalid-txs-results.md deleted file mode 100644 index 67742d67ec0..00000000000 --- a/.changelog/v0.38.10/bug-fixes/3002-invalid-txs-results.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[rpc]` Fix an issue where a legacy ABCI response, created on `v0.37` or before, is not returned properly in `v0.38` and up - on the `/block_results` RPC endpoint. - ([\#3002](https://github.com/cometbft/cometbft/issues/3002)) diff --git a/.changelog/v0.38.10/bug-fixes/3406-blocksync-dont-stall-if-blocking-chain.md b/.changelog/v0.38.10/bug-fixes/3406-blocksync-dont-stall-if-blocking-chain.md deleted file mode 100644 index 909e6a56039..00000000000 --- a/.changelog/v0.38.10/bug-fixes/3406-blocksync-dont-stall-if-blocking-chain.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[blocksync]` Do not stay in blocksync if the node's validator voting power - is high enough to block the chain while it is not online - ([\#3406](https://github.com/cometbft/cometbft/pull/3406)) diff --git a/.changelog/v0.38.10/bug-fixes/486-p2p-max-outbound.md b/.changelog/v0.38.10/bug-fixes/486-p2p-max-outbound.md deleted file mode 100644 index f6507ed9671..00000000000 --- a/.changelog/v0.38.10/bug-fixes/486-p2p-max-outbound.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[p2p]` Node respects configured `max_num_outbound_peers` limit when dialing - peers provided by a seed node - ([\#486](https://github.com/cometbft/cometbft/issues/486)) diff --git a/.changelog/v0.38.10/improvements/3382-single-send-monitor-per-packet.md b/.changelog/v0.38.10/improvements/3382-single-send-monitor-per-packet.md deleted file mode 100644 index efa5e3cc27f..00000000000 --- a/.changelog/v0.38.10/improvements/3382-single-send-monitor-per-packet.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[p2p/conn]` Update send monitor, used for sending rate limiting, once per batch of packets sent - ([\#3382](https://github.com/cometbft/cometbft/pull/3382)) diff --git a/.changelog/v0.38.10/improvements/3401-allow-dash-in-event-tags.md b/.changelog/v0.38.10/improvements/3401-allow-dash-in-event-tags.md deleted file mode 100644 index 6de79f5e09a..00000000000 --- a/.changelog/v0.38.10/improvements/3401-allow-dash-in-event-tags.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[libs/pubsub]` Allow dash (`-`) in event tags - ([\#3401](https://github.com/cometbft/cometbft/issues/3401)) diff --git a/.changelog/v0.38.10/improvements/3403-remove-pool-buffer-usage-in-secretconn.md b/.changelog/v0.38.10/improvements/3403-remove-pool-buffer-usage-in-secretconn.md deleted file mode 100644 index 4069a79ef3b..00000000000 --- a/.changelog/v0.38.10/improvements/3403-remove-pool-buffer-usage-in-secretconn.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[p2p/conn]` Remove the usage of a synchronous pool of buffers in secret connection, storing instead the buffer in the connection struct. This reduces the synchronization primitive usage, speeding up the code. - ([\#3403](https://github.com/cometbft/cometbft/issues/3403)) diff --git a/.changelog/v0.38.10/summary.md b/.changelog/v0.38.10/summary.md deleted file mode 100644 index 16f1fb18acc..00000000000 --- a/.changelog/v0.38.10/summary.md +++ /dev/null @@ -1,5 +0,0 @@ -*July 16, 2024* - -This release fixes a bug in `v0.38.x` that prevented ABCI responses from being -correctly read when upgrading from `v0.37.x` or below. It also includes a few other -bug fixes and performance improvements. diff --git a/.changelog/v0.38.11/bug-fixes/3565-extension-iff-enabled.md b/.changelog/v0.38.11/bug-fixes/3565-extension-iff-enabled.md deleted file mode 100644 index 96f7859d35a..00000000000 --- a/.changelog/v0.38.11/bug-fixes/3565-extension-iff-enabled.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[types]` Only check IFF vote is a non-nil Precommit if extensionsEnabled - types ([\#3565](https://github.com/cometbft/cometbft/issues/3565)) diff --git a/.changelog/v0.38.11/improvements/3544-indexer-break-statement.md b/.changelog/v0.38.11/improvements/3544-indexer-break-statement.md deleted file mode 100644 index ef83bdd514e..00000000000 --- a/.changelog/v0.38.11/improvements/3544-indexer-break-statement.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[indexer]` Fixed ineffective select break statements; they now - point to their enclosing for loop label to exit - ([\#3544](https://github.com/cometbft/cometbft/issues/3544)) \ No newline at end of file diff --git a/.changelog/v0.38.11/summary.md b/.changelog/v0.38.11/summary.md deleted file mode 100644 index 532517f6af7..00000000000 --- a/.changelog/v0.38.11/summary.md +++ /dev/null @@ -1,7 +0,0 @@ -*August 12, 2024* - -This release fixes a panic in consensus where CometBFT would previously panic -if there's no extension signature in non-nil Precommit EVEN IF vote extensions -themselves are disabled. - -It also includes a few other bug fixes and performance improvements. diff --git a/.changelog/v0.38.12/bug-fixes/0016-abc-light-proposer-priorities.md b/.changelog/v0.38.12/bug-fixes/0016-abc-light-proposer-priorities.md deleted file mode 100644 index 6915b51db30..00000000000 --- a/.changelog/v0.38.12/bug-fixes/0016-abc-light-proposer-priorities.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[light]` Cross-check proposer priorities in retrieved validator sets - ([\#ASA-2024-009](https://github.com/cometbft/cometbft/security/advisories/GHSA-g5xx-c4hv-9ccc)) diff --git a/.changelog/v0.38.12/bug-fixes/3828-privval-drop-duplicate-listen.md b/.changelog/v0.38.12/bug-fixes/3828-privval-drop-duplicate-listen.md deleted file mode 100644 index 3c3ad1f4b66..00000000000 --- a/.changelog/v0.38.12/bug-fixes/3828-privval-drop-duplicate-listen.md +++ /dev/null @@ -1 +0,0 @@ -- `[privval]` Ignore duplicate privval listen when already connected ([\#3828](https://github.com/cometbft/cometbft/issues/3828) diff --git a/.changelog/v0.38.12/dependencies/3728-update-btcec-v2.md b/.changelog/v0.38.12/dependencies/3728-update-btcec-v2.md deleted file mode 100644 index 361592b2c9c..00000000000 --- a/.changelog/v0.38.12/dependencies/3728-update-btcec-v2.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[crypto/secp256k1]` Adjust to breaking interface changes in - `btcec/v2` latest release, while avoiding breaking changes to - local CometBFT functions - ([\#3728](https://github.com/cometbft/cometbft/pull/3728)) diff --git a/.changelog/v0.38.12/improvements/0016-abc-types-validator-set.md b/.changelog/v0.38.12/improvements/0016-abc-types-validator-set.md deleted file mode 100644 index b8eb2d6579e..00000000000 --- a/.changelog/v0.38.12/improvements/0016-abc-types-validator-set.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[types]` Check that proposer is one of the validators in `ValidateBasic` - ([\#ASA-2024-009](https://github.com/cometbft/cometbft/security/advisories/GHSA-g5xx-c4hv-9ccc)) diff --git a/.changelog/v0.38.12/improvements/3819-e2e-log-level.md b/.changelog/v0.38.12/improvements/3819-e2e-log-level.md deleted file mode 100644 index b0726fb319e..00000000000 --- a/.changelog/v0.38.12/improvements/3819-e2e-log-level.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[e2e]` Add `log_level` option to manifest file - ([#3819](https://github.com/cometbft/cometbft/pull/3819)). diff --git a/.changelog/v0.38.12/improvements/3836-e2e-log-format.md b/.changelog/v0.38.12/improvements/3836-e2e-log-format.md deleted file mode 100644 index 6e1e50a8c4d..00000000000 --- a/.changelog/v0.38.12/improvements/3836-e2e-log-format.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[e2e]` Add `log_format` option to manifest file - ([#3836](https://github.com/cometbft/cometbft/issues/3836)). diff --git a/.changelog/v0.38.12/summary.md b/.changelog/v0.38.12/summary.md deleted file mode 100644 index 0ed31926ac8..00000000000 --- a/.changelog/v0.38.12/summary.md +++ /dev/null @@ -1,4 +0,0 @@ -*September 3, 2024* - -This release includes a security fix for the light client and is recommended -for all users. diff --git a/.changelog/v0.38.2/bug-fixes/1654-semaphore-wait.md b/.changelog/v0.38.2/bug-fixes/1654-semaphore-wait.md deleted file mode 100644 index 9d0fb80adcc..00000000000 --- a/.changelog/v0.38.2/bug-fixes/1654-semaphore-wait.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[mempool]` Avoid infinite wait in transaction sending routine when - using experimental parameters to limiting transaction gossiping to peers - ([\#1654](https://github.com/cometbft/cometbft/pull/1654)) \ No newline at end of file diff --git a/.changelog/v0.38.2/features/1643-nop-mempool.md b/.changelog/v0.38.2/features/1643-nop-mempool.md deleted file mode 100644 index e12ec43fc1a..00000000000 --- a/.changelog/v0.38.2/features/1643-nop-mempool.md +++ /dev/null @@ -1,17 +0,0 @@ -- `[mempool]` Add `nop` mempool ([\#1643](https://github.com/cometbft/cometbft/pull/1643)) - - If you want to use it, change mempool's `type` to `nop`: - - ```toml - [mempool] - - # The type of mempool for this node to use. - # - # Possible types: - # - "flood" : concurrent linked list mempool with flooding gossip protocol - # (default) - # - "nop" : nop-mempool (short for no operation; the ABCI app is responsible - # for storing, disseminating and proposing txs). "create_empty_blocks=false" - # is not supported. - type = "nop" - ``` \ No newline at end of file diff --git a/.changelog/v0.38.2/summary.md b/.changelog/v0.38.2/summary.md deleted file mode 100644 index 97d902edcc7..00000000000 --- a/.changelog/v0.38.2/summary.md +++ /dev/null @@ -1,6 +0,0 @@ -*November 27, 2023* - -This release provides the **nop** mempool for applications that want to build their own mempool. -Using this mempool effectively disables all mempool functionality in CometBFT, including transaction dissemination and the `broadcast_tx_*` endpoints. - -Also fixes a small bug in the mempool for an experimental feature. diff --git a/.changelog/v0.38.3/bug-fixes/0000-asa-2024-001-fix-validate.md b/.changelog/v0.38.3/bug-fixes/0000-asa-2024-001-fix-validate.md deleted file mode 100644 index 35340fe71cf..00000000000 --- a/.changelog/v0.38.3/bug-fixes/0000-asa-2024-001-fix-validate.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[consensus]` Fix for "Validation of `VoteExtensionsEnableHeight` can cause chain halt" - ([ASA-2024-001](https://github.com/cometbft/cometbft/security/advisories/GHSA-qr8r-m495-7hc4)) diff --git a/.changelog/v0.38.3/bug-fixes/1687-consensus-fix-block-validation.md b/.changelog/v0.38.3/bug-fixes/1687-consensus-fix-block-validation.md deleted file mode 100644 index 778f0b538b4..00000000000 --- a/.changelog/v0.38.3/bug-fixes/1687-consensus-fix-block-validation.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[mempool]` The calculation method of tx size returned by calling proxyapp should be consistent with that of mempool - ([\#1687](https://github.com/cometbft/cometbft/pull/1687)) - diff --git a/.changelog/v0.38.3/bug-fixes/1749-light-client-attack-verify-all-sigs.md b/.changelog/v0.38.3/bug-fixes/1749-light-client-attack-verify-all-sigs.md deleted file mode 100644 index 1115c4d195a..00000000000 --- a/.changelog/v0.38.3/bug-fixes/1749-light-client-attack-verify-all-sigs.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[evidence]` When `VerifyCommitLight` & `VerifyCommitLightTrusting` are called as part - of evidence verification, all signatures present in the evidence must be verified - ([\#1749](https://github.com/cometbft/cometbft/pull/1749)) - diff --git a/.changelog/v0.38.3/bug-fixes/1825-false-on-nil-key.md b/.changelog/v0.38.3/bug-fixes/1825-false-on-nil-key.md deleted file mode 100644 index dcd466a39e7..00000000000 --- a/.changelog/v0.38.3/bug-fixes/1825-false-on-nil-key.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[crypto]` `SupportsBatchVerifier` returns false - if public key is nil instead of dereferencing nil. - ([\#1825](https://github.com/cometbft/cometbft/pull/1825)) \ No newline at end of file diff --git a/.changelog/v0.38.3/bug-fixes/1879-blocksync-wait-for-pool-routine.md b/.changelog/v0.38.3/bug-fixes/1879-blocksync-wait-for-pool-routine.md deleted file mode 100644 index e4122368287..00000000000 --- a/.changelog/v0.38.3/bug-fixes/1879-blocksync-wait-for-pool-routine.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[blocksync]` wait for `poolRoutine` to stop in `(*Reactor).OnStop` - ([\#1879](https://github.com/cometbft/cometbft/pull/1879)) diff --git a/.changelog/v0.38.3/bug-fixes/642-clist-mempool-data-races.md b/.changelog/v0.38.3/bug-fixes/642-clist-mempool-data-races.md deleted file mode 100644 index 037bbc9550f..00000000000 --- a/.changelog/v0.38.3/bug-fixes/642-clist-mempool-data-races.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[mempool]` Fix data races in `CListMempool` by making atomic the types of `height`, `txsBytes`, and - `notifiedTxsAvailable`. ([\#642](https://github.com/cometbft/cometbft/pull/642)) diff --git a/.changelog/v0.38.3/improvements/1715-validate-validator-address.md b/.changelog/v0.38.3/improvements/1715-validate-validator-address.md deleted file mode 100644 index ec7f2c7da6a..00000000000 --- a/.changelog/v0.38.3/improvements/1715-validate-validator-address.md +++ /dev/null @@ -1 +0,0 @@ -- `[types]` Validate `Validator#Address` in `ValidateBasic` ([\#1715](https://github.com/cometbft/cometbft/pull/1715)) diff --git a/.changelog/v0.38.3/improvements/1730-increase-abci-socket-message-size-limit.md b/.changelog/v0.38.3/improvements/1730-increase-abci-socket-message-size-limit.md deleted file mode 100644 index 5246eb57f08..00000000000 --- a/.changelog/v0.38.3/improvements/1730-increase-abci-socket-message-size-limit.md +++ /dev/null @@ -1 +0,0 @@ -- `[abci]` Increase ABCI socket message size limit to 2GB ([\#1730](https://github.com/cometbft/cometbft/pull/1730): @troykessler) diff --git a/.changelog/v0.38.3/improvements/1735-batch-save-state.md b/.changelog/v0.38.3/improvements/1735-batch-save-state.md deleted file mode 100644 index 721380f6041..00000000000 --- a/.changelog/v0.38.3/improvements/1735-batch-save-state.md +++ /dev/null @@ -1 +0,0 @@ -- `[state]` Save the state using a single DB batch ([\#1735](https://github.com/cometbft/cometbft/pull/1735)) diff --git a/.changelog/v0.38.3/improvements/1755-batch-save-block.md b/.changelog/v0.38.3/improvements/1755-batch-save-block.md deleted file mode 100644 index 22f15cdb423..00000000000 --- a/.changelog/v0.38.3/improvements/1755-batch-save-block.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[store]` Save block using a single DB batch if block is less than 640kB, otherwise each block part is saved individually - ([\#1755](https://github.com/cometbft/cometbft/pull/1755)) diff --git a/.changelog/v0.38.3/improvements/1900-httpproxy-from-env.md b/.changelog/v0.38.3/improvements/1900-httpproxy-from-env.md deleted file mode 100644 index fd654ef7ba0..00000000000 --- a/.changelog/v0.38.3/improvements/1900-httpproxy-from-env.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[rpc]` Support setting proxy from env to `DefaultHttpClient`. - ([\#1900](https://github.com/cometbft/cometbft/pull/1900)) diff --git a/.changelog/v0.38.3/improvements/1902-rpc-default-port.md b/.changelog/v0.38.3/improvements/1902-rpc-default-port.md deleted file mode 100644 index b321bed5394..00000000000 --- a/.changelog/v0.38.3/improvements/1902-rpc-default-port.md +++ /dev/null @@ -1 +0,0 @@ -- `[rpc]` Use default port for HTTP(S) URLs when there is no explicit port ([\#1903](https://github.com/cometbft/cometbft/pull/1903)) diff --git a/.changelog/v0.38.3/improvements/1921-crypto-merkle-innerHash.md b/.changelog/v0.38.3/improvements/1921-crypto-merkle-innerHash.md deleted file mode 100644 index d3c9dac2cba..00000000000 --- a/.changelog/v0.38.3/improvements/1921-crypto-merkle-innerHash.md +++ /dev/null @@ -1 +0,0 @@ -- `[crypto/merkle]` faster calculation of hashes ([#1921](https://github.com/cometbft/cometbft/pull/1921)) diff --git a/.changelog/v0.38.3/summary.md b/.changelog/v0.38.3/summary.md deleted file mode 100644 index 4282c85ad1d..00000000000 --- a/.changelog/v0.38.3/summary.md +++ /dev/null @@ -1,8 +0,0 @@ -*January 17, 2024* - -This release addresses a high impact security issue reported in advisory -([ASA-2024-001](https://github.com/cometbft/cometbft/security/advisories/GHSA-qr8r-m495-7hc4)). -There are other non-security bugs fixes that have been addressed since -`v0.38.2` was released, as well as some improvements. -Please check the list below for further details. - diff --git a/.changelog/v0.38.4/improvements/2065-e2e-vote-ext-activation.md b/.changelog/v0.38.4/improvements/2065-e2e-vote-ext-activation.md deleted file mode 100644 index 9ced3a5da72..00000000000 --- a/.changelog/v0.38.4/improvements/2065-e2e-vote-ext-activation.md +++ /dev/null @@ -1,5 +0,0 @@ -- `[e2e]` Add manifest option `VoteExtensionsUpdateHeight` to test - vote extension activation via `InitChain` and `FinalizeBlock`. - Also, extend the manifest generator to produce different values - of this new option - ([\#2065](https://github.com/cometbft/cometbft/pull/2065)) diff --git a/.changelog/v0.38.4/summary.md b/.changelog/v0.38.4/summary.md deleted file mode 100644 index 0a8b339c9e8..00000000000 --- a/.changelog/v0.38.4/summary.md +++ /dev/null @@ -1,8 +0,0 @@ -*January 22, 2024* - -This release is aimed at those projects that have a dependency on CometBFT, -release line `v0.38.x`, and make use of function `SaveBlockStoreState` in package -`github.com/cometbft/cometbft/store`. This function changed its signature in `v0.38.3`. -This new release reverts the signature change so that upgrading to the latest release -of CometBFT on `v0.38.x` does not require any change in the code depending on CometBFT. - diff --git a/.changelog/v0.38.5/improvements/2093-metric-chain-size-bytes.md b/.changelog/v0.38.5/improvements/2093-metric-chain-size-bytes.md deleted file mode 100644 index afba958e3b7..00000000000 --- a/.changelog/v0.38.5/improvements/2093-metric-chain-size-bytes.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[consensus]` Add `chain_size_bytes` metric for measuring the size of the blockchain in bytes - ([\#2093](https://github.com/cometbft/cometbft/pull/2093)) diff --git a/.changelog/v0.38.5/summary.md b/.changelog/v0.38.5/summary.md deleted file mode 100644 index 61a0a3d29cc..00000000000 --- a/.changelog/v0.38.5/summary.md +++ /dev/null @@ -1,10 +0,0 @@ -*January 24, 2024* - -This release fixes a problem introduced in `v0.38.3`: if an application -updates the value of ConsensusParam `VoteExtensionsEnableHeight` to the same value -(actually a "noop" update) this is accepted in `v0.38.2` but rejected under some -conditions in `v0.38.3` and `v0.38.4`. Even if rejecting a useless update would make sense -in general, in a point release we should not reject a set of inputs to -a function that was previuosly accepted (unless there is a good reason -for it). The goal of this release is to accept again all "noop" updates, like `v0.38.2` did. - diff --git a/.changelog/v0.38.6/bug-fixes/2047-privval-retry-accepting-conn.md b/.changelog/v0.38.6/bug-fixes/2047-privval-retry-accepting-conn.md deleted file mode 100644 index 45260721c8b..00000000000 --- a/.changelog/v0.38.6/bug-fixes/2047-privval-retry-accepting-conn.md +++ /dev/null @@ -1 +0,0 @@ -- `[privval]` Retry accepting a connection ([\#2047](https://github.com/cometbft/cometbft/pull/2047)) diff --git a/.changelog/v0.38.6/bug-fixes/2136-fix-state-rollback.md b/.changelog/v0.38.6/bug-fixes/2136-fix-state-rollback.md deleted file mode 100644 index 55cbfe51ed4..00000000000 --- a/.changelog/v0.38.6/bug-fixes/2136-fix-state-rollback.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[state]` Fix rollback to a specific height - ([\#2136](https://github.com/cometbft/cometbft/pull/2136)) diff --git a/.changelog/v0.38.6/features/2362-e2e-block-max-bytes.md b/.changelog/v0.38.6/features/2362-e2e-block-max-bytes.md deleted file mode 100644 index a3b007c3f96..00000000000 --- a/.changelog/v0.38.6/features/2362-e2e-block-max-bytes.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[e2e]` Add `block_max_bytes` option to the manifest file. - ([\#2362](https://github.com/cometbft/cometbft/pull/2362)) \ No newline at end of file diff --git a/.changelog/v0.38.6/improvements/2016-blocksync-avoid-double-calling-block-from-proto.md b/.changelog/v0.38.6/improvements/2016-blocksync-avoid-double-calling-block-from-proto.md deleted file mode 100644 index 7251221be18..00000000000 --- a/.changelog/v0.38.6/improvements/2016-blocksync-avoid-double-calling-block-from-proto.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[blocksync]` Avoid double-calling `types.BlockFromProto` for performance - reasons ([\#2016](https://github.com/cometbft/cometbft/pull/2016)) diff --git a/.changelog/v0.38.6/improvements/2094-e2e-load-max-txs.md b/.changelog/v0.38.6/improvements/2094-e2e-load-max-txs.md deleted file mode 100644 index 31ca79cfe3b..00000000000 --- a/.changelog/v0.38.6/improvements/2094-e2e-load-max-txs.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[e2e]` Add manifest option `load_max_txs` to limit the number of transactions generated by the - `load` command. ([\#2094](https://github.com/cometbft/cometbft/pull/2094)) diff --git a/.changelog/v0.38.6/improvements/2434-jsonrpc-websocket-basic-auth.md b/.changelog/v0.38.6/improvements/2434-jsonrpc-websocket-basic-auth.md deleted file mode 100644 index e4db7c06c7d..00000000000 --- a/.changelog/v0.38.6/improvements/2434-jsonrpc-websocket-basic-auth.md +++ /dev/null @@ -1 +0,0 @@ -- `[jsonrpc]` enable HTTP basic auth in websocket client ([#2434](https://github.com/cometbft/cometbft/pull/2434)) diff --git a/.changelog/v0.38.6/improvements/2467-decrease-n-of-requested-blocks.md b/.changelog/v0.38.6/improvements/2467-decrease-n-of-requested-blocks.md deleted file mode 100644 index 3b5ea17ce5a..00000000000 --- a/.changelog/v0.38.6/improvements/2467-decrease-n-of-requested-blocks.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[blocksync]` make the max number of downloaded blocks dynamic. - Previously it was a const 600. Now it's `peersCount * maxPendingRequestsPerPeer (20)` - [\#2467](https://github.com/cometbft/cometbft/pull/2467) diff --git a/.changelog/v0.38.6/improvements/2475-blocksync-2nd-request.md b/.changelog/v0.38.6/improvements/2475-blocksync-2nd-request.md deleted file mode 100644 index 67614a8e35f..00000000000 --- a/.changelog/v0.38.6/improvements/2475-blocksync-2nd-request.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[blocksync]` Request a block from peer B if we are approaching pool's height - (less than 50 blocks) and the current peer A is slow in sending us the - block [\#2475](https://github.com/cometbft/cometbft/pull/2475) diff --git a/.changelog/v0.38.6/improvements/2475-blocksync-no-block-response.md b/.changelog/v0.38.6/improvements/2475-blocksync-no-block-response.md deleted file mode 100644 index d01b3679866..00000000000 --- a/.changelog/v0.38.6/improvements/2475-blocksync-no-block-response.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[blocksync]` Request the block N from peer B immediately after getting - `NoBlockResponse` from peer A - [\#2475](https://github.com/cometbft/cometbft/pull/2475) diff --git a/.changelog/v0.38.6/improvements/2475-blocksync-sort-peers.md b/.changelog/v0.38.6/improvements/2475-blocksync-sort-peers.md deleted file mode 100644 index 5c544401ba6..00000000000 --- a/.changelog/v0.38.6/improvements/2475-blocksync-sort-peers.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[blocksync]` Sort peers by download rate (the fastest peer is picked first) - [\#2475](https://github.com/cometbft/cometbft/pull/2475) diff --git a/.changelog/v0.38.6/summary.md b/.changelog/v0.38.6/summary.md deleted file mode 100644 index 3e31f8c58c3..00000000000 --- a/.changelog/v0.38.6/summary.md +++ /dev/null @@ -1,5 +0,0 @@ -*March 12, 2024* - -This release fixes a security bug in the light client. It also introduces many -improvements to the block sync in collaboration with the -[Osmosis](https://osmosis.zone/) team. diff --git a/.changelog/v0.38.7/bug-fixes/2225-fix-checktx-request-returns-error.md b/.changelog/v0.38.7/bug-fixes/2225-fix-checktx-request-returns-error.md deleted file mode 100644 index cb0da42b54d..00000000000 --- a/.changelog/v0.38.7/bug-fixes/2225-fix-checktx-request-returns-error.md +++ /dev/null @@ -1,2 +0,0 @@ -- [`mempool`] Panic when a CheckTx request to the app returns an error - ([\#2225](https://github.com/cometbft/cometbft/pull/2225)) diff --git a/.changelog/v0.38.7/bug-fixes/2774-bitarray-unmarshal-json.md b/.changelog/v0.38.7/bug-fixes/2774-bitarray-unmarshal-json.md deleted file mode 100644 index 1c51af49d26..00000000000 --- a/.changelog/v0.38.7/bug-fixes/2774-bitarray-unmarshal-json.md +++ /dev/null @@ -1,2 +0,0 @@ -- [`bits`] prevent `BitArray.UnmarshalJSON` from crashing on 0 bits - ([\#2774](https://github.com/cometbft/cometbft/pull/2774)) diff --git a/.changelog/v0.38.7/features/2793-boostrap.md b/.changelog/v0.38.7/features/2793-boostrap.md deleted file mode 100644 index 407bac77e0b..00000000000 --- a/.changelog/v0.38.7/features/2793-boostrap.md +++ /dev/null @@ -1,2 +0,0 @@ -- [`node`] Add `BootstrapStateWithGenProvider` to boostrap state using a custom - genesis doc provider ([\#2793](https://github.com/cometbft/cometbft/pull/2793)) diff --git a/.changelog/v0.38.7/improvements/2839-tx_index-lower-heap-allocation.md b/.changelog/v0.38.7/improvements/2839-tx_index-lower-heap-allocation.md deleted file mode 100644 index 2c763654201..00000000000 --- a/.changelog/v0.38.7/improvements/2839-tx_index-lower-heap-allocation.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[state/indexer]` Lower the heap allocation of transaction searches - ([\#2839](https://github.com/cometbft/cometbft/pull/2839)) \ No newline at end of file diff --git a/.changelog/v0.38.7/improvements/2841-speedup-bits-pick-random.md b/.changelog/v0.38.7/improvements/2841-speedup-bits-pick-random.md deleted file mode 100644 index b7103be2629..00000000000 --- a/.changelog/v0.38.7/improvements/2841-speedup-bits-pick-random.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[internal/bits]` 10x speedup and remove heap overhead of bitArray.PickRandom (used extensively in consensus gossip) - ([\#2841](https://github.com/cometbft/cometbft/pull/2841)). diff --git a/.changelog/v0.38.7/improvements/2846-speedup-json-encoding.md b/.changelog/v0.38.7/improvements/2846-speedup-json-encoding.md deleted file mode 100644 index 026b5a43989..00000000000 --- a/.changelog/v0.38.7/improvements/2846-speedup-json-encoding.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[libs/json]` Lower the memory overhead of JSON encoding by using JSON encoders internally - ([\#2846](https://github.com/cometbft/cometbft/pull/2846)). diff --git a/.changelog/v0.38.7/summary.md b/.changelog/v0.38.7/summary.md deleted file mode 100644 index 6a84208dd26..00000000000 --- a/.changelog/v0.38.7/summary.md +++ /dev/null @@ -1,3 +0,0 @@ -*April 26, 2024* - -This release contains a few bug fixes and performance improvements. diff --git a/.changelog/v0.38.8/breaking-changes/3314-mempool-preupdate.md b/.changelog/v0.38.8/breaking-changes/3314-mempool-preupdate.md deleted file mode 100644 index 4c2528939f7..00000000000 --- a/.changelog/v0.38.8/breaking-changes/3314-mempool-preupdate.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[mempool]` Add to the `Mempool` interface a new method `PreUpdate()`. This method should be - called before acquiring the mempool lock, to signal that a new update is coming. Also add to - `ErrMempoolIsFull` a new field `RecheckFull`. - ([\#3314](https://github.com/cometbft/cometbft/pull/3314)) diff --git a/.changelog/v0.38.8/bug-fixes/14-abc.md b/.changelog/v0.38.8/bug-fixes/14-abc.md deleted file mode 100644 index 8d9d211609b..00000000000 --- a/.changelog/v0.38.8/bug-fixes/14-abc.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[blockstore]` Added peer banning in blockstore - ([\#ABC-0013](https://github.com/cometbft/cometbft/security/advisories/GHSA-hg58-rf2h-6rr7)) -- `[blockstore]` Send correct error message when vote extensions do not align with received packet - ([\#ABC-0014](https://github.com/cometbft/cometbft/security/advisories/GHSA-hg58-rf2h-6rr7)) diff --git a/.changelog/v0.38.8/bug-fixes/1827-fix-recheck-async.md b/.changelog/v0.38.8/bug-fixes/1827-fix-recheck-async.md deleted file mode 100644 index 40abe23c1af..00000000000 --- a/.changelog/v0.38.8/bug-fixes/1827-fix-recheck-async.md +++ /dev/null @@ -1,2 +0,0 @@ -- [`mempool`] Fix data race when rechecking with async ABCI client - ([\#1827](https://github.com/cometbft/cometbft/issues/1827)) diff --git a/.changelog/v0.38.8/bug-fixes/3092-consensus-timeout-ticker-data-race.md b/.changelog/v0.38.8/bug-fixes/3092-consensus-timeout-ticker-data-race.md deleted file mode 100644 index b27dddc4f02..00000000000 --- a/.changelog/v0.38.8/bug-fixes/3092-consensus-timeout-ticker-data-race.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[consensus]` Fix a race condition in the consensus timeout ticker. Race is caused by two timeouts being scheduled at the same time. - ([\#3092](https://github.com/cometbft/cometbft/pull/2136)) diff --git a/.changelog/v0.38.8/bug-fixes/3195-batch-verification.md b/.changelog/v0.38.8/bug-fixes/3195-batch-verification.md deleted file mode 100644 index 2e4104af394..00000000000 --- a/.changelog/v0.38.8/bug-fixes/3195-batch-verification.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[types]` Do not batch verify a commit if the validator set keys have different - types. ([\#3195](https://github.com/cometbft/cometbft/issues/3195) diff --git a/.changelog/v0.38.8/improvements/1827-config-mempool-recheck-timeout.md b/.changelog/v0.38.8/improvements/1827-config-mempool-recheck-timeout.md deleted file mode 100644 index 28bbb8a1d37..00000000000 --- a/.changelog/v0.38.8/improvements/1827-config-mempool-recheck-timeout.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[config]` Added `recheck_timeout` mempool parameter to set how much time to wait for recheck - responses from the app (only applies to non-local ABCI clients). - ([\#1827](https://github.com/cometbft/cometbft/issues/1827/)) diff --git a/.changelog/v0.38.8/improvements/2867-rpc-batch-size-config.md b/.changelog/v0.38.8/improvements/2867-rpc-batch-size-config.md deleted file mode 100644 index d353bed0474..00000000000 --- a/.changelog/v0.38.8/improvements/2867-rpc-batch-size-config.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[rpc]` Add a configurable maximum batch size for RPC requests. - ([\#2867](https://github.com/cometbft/cometbft/pull/2867)). diff --git a/.changelog/v0.38.8/improvements/2911-remove-event-bus-debug-logs.md b/.changelog/v0.38.8/improvements/2911-remove-event-bus-debug-logs.md deleted file mode 100644 index a008e2482a0..00000000000 --- a/.changelog/v0.38.8/improvements/2911-remove-event-bus-debug-logs.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[event-bus]` Remove the debug logs in PublishEventTx, which were noticed production slowdowns. - ([\#2911](https://github.com/cometbft/cometbft/pull/2911)) \ No newline at end of file diff --git a/.changelog/v0.38.8/improvements/2924-consensus-cache-block-hash.md b/.changelog/v0.38.8/improvements/2924-consensus-cache-block-hash.md deleted file mode 100644 index 4f9e5638c45..00000000000 --- a/.changelog/v0.38.8/improvements/2924-consensus-cache-block-hash.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[state/execution]` Cache the block hash computation inside of the Block Type, so we only compute it once. - ([\#2924](https://github.com/cometbft/cometbft/pull/2924)) \ No newline at end of file diff --git a/.changelog/v0.38.8/improvements/2928-remove-redundant-verifyblock-call-in-finalize-commit.md b/.changelog/v0.38.8/improvements/2928-remove-redundant-verifyblock-call-in-finalize-commit.md deleted file mode 100644 index ac975738453..00000000000 --- a/.changelog/v0.38.8/improvements/2928-remove-redundant-verifyblock-call-in-finalize-commit.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[consensus/state]` Remove a redundant `VerifyBlock` call in `FinalizeCommit` - ([\#2928](https://github.com/cometbft/cometbft/pull/2928)) \ No newline at end of file diff --git a/.changelog/v0.38.8/improvements/2949-reduce-protoio-writer-creation-time.md b/.changelog/v0.38.8/improvements/2949-reduce-protoio-writer-creation-time.md deleted file mode 100644 index 75838e24882..00000000000 --- a/.changelog/v0.38.8/improvements/2949-reduce-protoio-writer-creation-time.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[p2p/channel]` Speedup `ProtoIO` writer creation time, and thereby speedup channel writing by 5%. - ([\#2949](https://github.com/cometbft/cometbft/pull/2949)) \ No newline at end of file diff --git a/.changelog/v0.38.8/improvements/2952-lower-next-packet-msg-time.md b/.changelog/v0.38.8/improvements/2952-lower-next-packet-msg-time.md deleted file mode 100644 index 6a05588c0f6..00000000000 --- a/.changelog/v0.38.8/improvements/2952-lower-next-packet-msg-time.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[p2p/conn]` Minor speedup (3%) to connection.WritePacketMsgTo, by removing MinInt calls. - ([\#2952](https://github.com/cometbft/cometbft/pull/2952)) \ No newline at end of file diff --git a/.changelog/v0.38.8/improvements/2959-speedup-initialized-bitarray-construction.md b/.changelog/v0.38.8/improvements/2959-speedup-initialized-bitarray-construction.md deleted file mode 100644 index 7c1b2181d08..00000000000 --- a/.changelog/v0.38.8/improvements/2959-speedup-initialized-bitarray-construction.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[internal/bits]` 10x speedup creating initialized bitArrays, which speedsup extendedCommit.BitArray(). This is used in consensus vote gossip. - ([\#2959](https://github.com/cometbft/cometbft/pull/2841)). diff --git a/.changelog/v0.38.8/improvements/2964-skip-revalidation-of-blockstore-LoadBlockFromMeta-.md b/.changelog/v0.38.8/improvements/2964-skip-revalidation-of-blockstore-LoadBlockFromMeta-.md deleted file mode 100644 index 26fdb6c7ed2..00000000000 --- a/.changelog/v0.38.8/improvements/2964-skip-revalidation-of-blockstore-LoadBlockFromMeta-.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[blockstore]` Remove a redundant `Header.ValidateBasic` call in `LoadBlockMeta`, 75% reducing this time. - ([\#2964](https://github.com/cometbft/cometbft/pull/2964)) \ No newline at end of file diff --git a/.changelog/v0.38.8/improvements/2986-lower-memory-allocation-in-packet-writing.md b/.changelog/v0.38.8/improvements/2986-lower-memory-allocation-in-packet-writing.md deleted file mode 100644 index 9d262798808..00000000000 --- a/.changelog/v0.38.8/improvements/2986-lower-memory-allocation-in-packet-writing.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[p2p/conn]` Speedup connection.WritePacketMsgTo, by reusing internal buffers rather than re-allocating. - ([\#2986](https://github.com/cometbft/cometbft/pull/2986)) \ No newline at end of file diff --git a/.changelog/v0.38.8/improvements/3003-use-lru-caches-in-blockstore.md b/.changelog/v0.38.8/improvements/3003-use-lru-caches-in-blockstore.md deleted file mode 100644 index 14d4cf2abfb..00000000000 --- a/.changelog/v0.38.8/improvements/3003-use-lru-caches-in-blockstore.md +++ /dev/null @@ -1,2 +0,0 @@ -- [`blockstore`] Use LRU caches in blockstore, significiantly improving consensus gossip routine performance - ([\#3003](https://github.com/cometbft/cometbft/issues/3003) diff --git a/.changelog/v0.38.8/improvements/3017-speedup-consensus-metrics.md b/.changelog/v0.38.8/improvements/3017-speedup-consensus-metrics.md deleted file mode 100644 index 2d468990abf..00000000000 --- a/.changelog/v0.38.8/improvements/3017-speedup-consensus-metrics.md +++ /dev/null @@ -1,2 +0,0 @@ -- [`consensus`] Improve performance of consensus metrics by lowering string operations - ([\#3017](https://github.com/cometbft/cometbft/issues/3017) diff --git a/.changelog/v0.38.8/improvements/3019-reduce-allocations-in-packet-reads.md b/.changelog/v0.38.8/improvements/3019-reduce-allocations-in-packet-reads.md deleted file mode 100644 index 604002636a9..00000000000 --- a/.changelog/v0.38.8/improvements/3019-reduce-allocations-in-packet-reads.md +++ /dev/null @@ -1,3 +0,0 @@ -- [`protoio`] Remove one allocation and new object call from `ReadMsg`, - leading to a 4% p2p message reading performance gain. - ([\#3018](https://github.com/cometbft/cometbft/issues/3018) diff --git a/.changelog/v0.38.8/improvements/3314-mempool-update-consider-full-when-rechecking.md b/.changelog/v0.38.8/improvements/3314-mempool-update-consider-full-when-rechecking.md deleted file mode 100644 index 1e308ec6040..00000000000 --- a/.changelog/v0.38.8/improvements/3314-mempool-update-consider-full-when-rechecking.md +++ /dev/null @@ -1,3 +0,0 @@ -- `[mempool]` Before updating the mempool, consider it as full if rechecking is still in progress. - This will stop accepting transactions in the mempool if the node can't keep up with re-CheckTx. - ([\#3314](https://github.com/cometbft/cometbft/pull/3314)) diff --git a/.changelog/v0.38.8/summary.md b/.changelog/v0.38.8/summary.md deleted file mode 100644 index 9f857767e35..00000000000 --- a/.changelog/v0.38.8/summary.md +++ /dev/null @@ -1,3 +0,0 @@ -*June 27, 2024* - -This release contains a few bug fixes and performance improvements. diff --git a/.changelog/v0.38.9/breaking-changes/3361-mempool-preupdate.md b/.changelog/v0.38.9/breaking-changes/3361-mempool-preupdate.md deleted file mode 100644 index eb63d3b7e92..00000000000 --- a/.changelog/v0.38.9/breaking-changes/3361-mempool-preupdate.md +++ /dev/null @@ -1,4 +0,0 @@ -- `[mempool]` Revert adding the method `PreUpdate()` to the `Mempool` interface, recently introduced - in the previous patch release (v0.38.8). Its logic is now moved into the `Lock` method. With this change, - the `Mempool` interface is the same as in v0.38.7. - ([\#3361](https://github.com/cometbft/cometbft/pull/3361)) diff --git a/.changelog/v0.38.9/bug-fixes/3352-nil-pointer-tx-search.md b/.changelog/v0.38.9/bug-fixes/3352-nil-pointer-tx-search.md deleted file mode 100644 index 1d568e52b79..00000000000 --- a/.changelog/v0.38.9/bug-fixes/3352-nil-pointer-tx-search.md +++ /dev/null @@ -1,2 +0,0 @@ -- `[rpc]` Fix nil pointer error in `/tx` and `/tx_search` when block is - absent ([\#3352](https://github.com/cometbft/cometbft/issues/3352)) diff --git a/.changelog/v0.38.9/summary.md b/.changelog/v0.38.9/summary.md deleted file mode 100644 index 705ae83e568..00000000000 --- a/.changelog/v0.38.9/summary.md +++ /dev/null @@ -1,5 +0,0 @@ -*July 1, 2024* - -This release reverts the API-breaking change to the Mempool interface introduced in the last patch -release (v0.38.8) while still keeping the performance improvement added to the mempool. It also -includes a minor fix to the RPC endpoints /tx and /tx_search. diff --git a/.dockerignore b/.dockerignore index a7ae6a5b0c8..9eae13bb46b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,4 +2,4 @@ build test/e2e/build test/e2e/networks test/logs -test/p2p/data +test/p2p/data \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 87f93c4cdc3..5bc2f6965a7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -7,6 +7,6 @@ # global owners are only requested if there isn't a more specific # codeowner specified below. For this reason, the global codeowners # are often repeated in package-level definitions. -* @CometBFT/engineering +* @cometbft/engineering @cometbft/devrel @cometbft/interchain-inc -/spec @CometBFT/research @CometBFT/engineering +/spec @cometbft/research @cometbft/engineering @cometbft/interchain-inc diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 27a100685d8..3af96c5554f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -43,7 +43,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -65,7 +65,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index 8886ba107e8..a340cb179e1 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v4 @@ -44,7 +44,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v4 with: diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml deleted file mode 100644 index 1632e46201b..00000000000 --- a/.github/workflows/cometbft-docker.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Docker -# Rebuilds the CometBFT docker image on every push to v0.38.x and creation of tags -# and pushes the image to https://hub.docker.com/r/cometbft/cometbft -on: - push: - branches: - - v0.38.x - tags: - - "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10 - - "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" # e.g. v0.37.0-alpha.1, v0.38.0-alpha.10 - - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" # e.g. v0.37.0-beta.1, v0.38.0-beta.10 - - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" # e.g. v0.37.0-rc1, v0.38.0-rc10 - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Prepare - id: prep - run: | - DOCKER_IMAGE=cometbft/cometbft - VERSION=noop - if [[ $GITHUB_REF == refs/tags/* ]]; then - VERSION=${GITHUB_REF#refs/tags/} - elif [[ $GITHUB_REF == refs/heads/* ]]; then - VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g') - if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then - VERSION=latest - fi - fi - TAGS="${DOCKER_IMAGE}:${VERSION}" - if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then - TAGS="$TAGS,${DOCKER_IMAGE}:${VERSION}" - fi - echo "tags=${TAGS}" >> $GITHUB_OUTPUT - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Build - uses: docker/setup-buildx-action@v3.6.1 - - - name: Login to DockerHub - if: ${{ github.event_name != 'pull_request' }} - uses: docker/login-action@v3.3.0 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Publish to Docker Hub - uses: docker/build-push-action@v6.7.0 - with: - context: . - file: ./DOCKER/Dockerfile - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.prep.outputs.tags }} diff --git a/.github/workflows/docker-build-cometbft.yml b/.github/workflows/docker-build-cometbft.yml new file mode 100644 index 00000000000..2e5a21288a1 --- /dev/null +++ b/.github/workflows/docker-build-cometbft.yml @@ -0,0 +1,98 @@ +name: docker-build-cometbft + +on: + workflow_dispatch: + push: + branches: + - main + - v0.38.x + - v1.x + - v2.x + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + DOCKER_ORG: cometbft + DOCKER_IMAGE: cometbft + +jobs: + vars: + runs-on: ubuntu-latest + outputs: + repo: ${{ steps.set.outputs.repo }} + tags: ${{ steps.set.outputs.tags }} + steps: + - id: set + run: | + REPO="${DOCKER_ORG}/${DOCKER_IMAGE}" + VERSION="${GITHUB_REF_NAME}" + + TAGS="${REPO}:${VERSION}" + if [ "$VERSION" = "main" ]; then + TAGS="${TAGS:+$TAGS,}$REPO:latest" + fi + + echo "repo=${REPO}" >> $GITHUB_OUTPUT + echo "tags=${TAGS}" >> $GITHUB_OUTPUT + + build-images: + needs: vars + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-24.04 + arch: amd64 + - os: ubuntu-24.04-arm + arch: arm64 + runs-on: ${{ matrix.os }} + outputs: + digest-amd64: ${{ steps.digest.outputs.digest-amd64 }} + digest-arm64: ${{ steps.digest.outputs.digest-arm64 }} + steps: + - id: tags + run: | + TAGS=$(echo "${{ needs.vars.outputs.tags }}" | sed "s/[^,]*/&-${{ matrix.arch }}/g") + echo "tags=${TAGS}" >> $GITHUB_OUTPUT + + - uses: actions/checkout@v4 + - uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - uses: docker/setup-buildx-action@v3 + - uses: docker/build-push-action@v6 + id: build + with: + platforms: linux/${{ matrix.arch }} + context: . + file: ./DOCKER/Dockerfile + push: true + tags: ${{ steps.tags.outputs.tags }} + + - id: digest + run: echo "digest-${{ matrix.arch }}=${{ steps.build.outputs.digest }}" >> $GITHUB_OUTPUT + + merge-images: + runs-on: ubuntu-latest + needs: + - vars + - build-images + steps: + - uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - run: | + TAGS="${{ needs.vars.outputs.tags }}" + docker buildx imagetools create \ + $(printf -- '--tag %s ' ${TAGS//,/ }) \ + ${{ needs.vars.outputs.repo }}@${{ needs.build-images.outputs.digest-amd64 }} \ + ${{ needs.vars.outputs.repo }}@${{ needs.build-images.outputs.digest-arm64 }} diff --git a/.github/workflows/docker-build-e2e-node.yml b/.github/workflows/docker-build-e2e-node.yml new file mode 100644 index 00000000000..28b0fa952ee --- /dev/null +++ b/.github/workflows/docker-build-e2e-node.yml @@ -0,0 +1,98 @@ +name: docker-build-e2e-node + +on: + workflow_dispatch: + push: + branches: + - main + - v0.38.x + - v1.x + - v2.x + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + DOCKER_ORG: cometbft + DOCKER_IMAGE: e2e-node + +jobs: + vars: + runs-on: ubuntu-latest + outputs: + repo: ${{ steps.set.outputs.repo }} + tags: ${{ steps.set.outputs.tags }} + steps: + - id: set + run: | + REPO="${DOCKER_ORG}/${DOCKER_IMAGE}" + VERSION="${GITHUB_REF_NAME}" + + TAGS="${REPO}:${VERSION}" + if [ "$VERSION" = "main" ]; then + TAGS="${TAGS:+$TAGS,}$REPO:latest" + fi + + echo "repo=${REPO}" >> $GITHUB_OUTPUT + echo "tags=${TAGS}" >> $GITHUB_OUTPUT + + build-images: + needs: vars + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-24.04 + arch: amd64 + - os: ubuntu-24.04-arm + arch: arm64 + runs-on: ${{ matrix.os }} + outputs: + digest-amd64: ${{ steps.digest.outputs.digest-amd64 }} + digest-arm64: ${{ steps.digest.outputs.digest-arm64 }} + steps: + - id: tags + run: | + TAGS=$(echo "${{ needs.vars.outputs.tags }}" | sed "s/[^,]*/&-${{ matrix.arch }}/g") + echo "tags=${TAGS}" >> $GITHUB_OUTPUT + + - uses: actions/checkout@v4 + - uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - uses: docker/setup-buildx-action@v3 + - uses: docker/build-push-action@v6 + id: build + with: + platforms: linux/${{ matrix.arch }} + context: . + file: ./test/e2e/docker/Dockerfile + push: true + tags: ${{ steps.tags.outputs.tags }} + + - id: digest + run: echo "digest-${{ matrix.arch }}=${{ steps.build.outputs.digest }}" >> $GITHUB_OUTPUT + + merge-images: + runs-on: ubuntu-latest + needs: + - vars + - build-images + steps: + - uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - run: | + TAGS="${{ needs.vars.outputs.tags }}" + docker buildx imagetools create \ + $(printf -- '--tag %s ' ${TAGS//,/ }) \ + ${{ needs.vars.outputs.repo }}@${{ needs.build-images.outputs.digest-amd64 }} \ + ${{ needs.vars.outputs.repo }}@${{ needs.build-images.outputs.digest-arm64 }} diff --git a/.github/workflows/e2e-manual-multiversion.yml b/.github/workflows/e2e-manual-multiversion.yml index 485728dd4a0..cdd97b63aa4 100644 --- a/.github/workflows/e2e-manual-multiversion.yml +++ b/.github/workflows/e2e-manual-multiversion.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' - uses: actions/checkout@v4 diff --git a/.github/workflows/e2e-manual.yml b/.github/workflows/e2e-manual.yml index 86e03c66e2d..c769f2b8ac6 100644 --- a/.github/workflows/e2e-manual.yml +++ b/.github/workflows/e2e-manual.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' - uses: actions/checkout@v4 diff --git a/.github/workflows/e2e-nightly-34x.yml b/.github/workflows/e2e-nightly-34x.yml deleted file mode 100644 index 4858bab5dc4..00000000000 --- a/.github/workflows/e2e-nightly-34x.yml +++ /dev/null @@ -1,77 +0,0 @@ -# Runs randomly generated E2E testnets nightly on the 0.34.x branch. - -# !! This file should be kept in sync with the e2e-nightly-main.yml file, -# modulo changes to the version labels. - -name: e2e-nightly-34x -on: - schedule: - - cron: '0 2 * * *' - -jobs: - e2e-nightly-test: - # Run parallel jobs for the listed testnet groups (must match the - # ./build/generator -g flag) - strategy: - fail-fast: false - matrix: - group: ['00', '01'] - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - uses: actions/setup-go@v5 - with: - go-version: '1.18' - - - uses: actions/checkout@v4 - with: - ref: 'v0.34.x' - - - name: Capture git repo info - id: git-info - run: | - echo "branch=`git branch --show-current`" >> $GITHUB_OUTPUT - - - name: Build - working-directory: test/e2e - # Run make jobs in parallel, since we can't run steps in parallel. - run: make -j2 docker generator runner - - - name: Generate testnets - working-directory: test/e2e - # When changing -g, also change the matrix groups above - run: ./build/generator -g 2 -d networks/nightly -p - - - name: Run testnets in group ${{ matrix.group }} - working-directory: test/e2e - run: ./run-multiple.sh networks/nightly/*-group${{ matrix.group }}-*.toml - - outputs: - git-branch: ${{ steps.git-info.outputs.branch }} - - e2e-nightly-fail: - needs: e2e-nightly-test - if: ${{ failure() }} - runs-on: ubuntu-latest - steps: - - name: Notify Slack on failure - uses: slackapi/slack-github-action@v1.26.0 - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - BRANCH: ${{ needs.e2e-nightly-test.outputs.git-branch }} - RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - COMMITS_URL: "${{ github.server_url }}/${{ github.repository }}/commits/${{ needs.e2e-nightly-test.outputs.git-branch }}" - with: - payload: | - { - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": ":skull: Nightly E2E tests for `${{ env.BRANCH }}` failed. See the <${{ env.RUN_URL }}|run details> and the <${{ env.COMMITS_URL }}|latest commits> possibly related to the failure." - } - } - ] - } diff --git a/.github/workflows/e2e-nightly-37x.yml b/.github/workflows/e2e-nightly-37x.yml deleted file mode 100644 index f3f906a3783..00000000000 --- a/.github/workflows/e2e-nightly-37x.yml +++ /dev/null @@ -1,77 +0,0 @@ -# Runs randomly generated E2E testnets nightly on the v0.37.x branch. - -# !! This file should be kept in sync with the e2e-nightly-main.yml file, -# modulo changes to the version labels. - -name: e2e-nightly-37x -on: - schedule: - - cron: '0 2 * * *' - -jobs: - e2e-nightly-test: - # Run parallel jobs for the listed testnet groups (must match the - # ./build/generator -g flag) - strategy: - fail-fast: false - matrix: - group: ['00', '01', '02', '03', "04"] - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - uses: actions/setup-go@v5 - with: - go-version: '1.21' - - - uses: actions/checkout@v4 - with: - ref: 'v0.37.x' - - - name: Capture git repo info - id: git-info - run: | - echo "branch=`git branch --show-current`" >> $GITHUB_OUTPUT - - - name: Build - working-directory: test/e2e - # Run make jobs in parallel, since we can't run steps in parallel. - run: make -j2 docker generator runner tests - - - name: Generate testnets - working-directory: test/e2e - # When changing -g, also change the matrix groups above - run: ./build/generator -g 5 -d networks/nightly/ -p - - - name: Run ${{ matrix.p2p }} p2p testnets - working-directory: test/e2e - run: ./run-multiple.sh networks/nightly/*-group${{ matrix.group }}-*.toml - - outputs: - git-branch: ${{ steps.git-info.outputs.branch }} - - e2e-nightly-fail: - needs: e2e-nightly-test - if: ${{ failure() }} - runs-on: ubuntu-latest - steps: - - name: Notify Slack on failure - uses: slackapi/slack-github-action@v1.26.0 - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - BRANCH: ${{ needs.e2e-nightly-test.outputs.git-branch }} - RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - COMMITS_URL: "${{ github.server_url }}/${{ github.repository }}/commits/${{ needs.e2e-nightly-test.outputs.git-branch }}" - with: - payload: | - { - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": ":skull: Nightly E2E tests for `${{ env.BRANCH }}` failed. See the <${{ env.RUN_URL }}|run details> and the <${{ env.COMMITS_URL }}|latest commits> possibly related to the failure." - } - } - ] - } diff --git a/.github/workflows/e2e-nightly-main.yml b/.github/workflows/e2e-nightly-main.yml deleted file mode 100644 index 8cab10fd5ba..00000000000 --- a/.github/workflows/e2e-nightly-main.yml +++ /dev/null @@ -1,75 +0,0 @@ -# Runs randomly generated E2E testnets nightly on main - -# !! Relevant changes to this file should be propagated to the e2e-nightly-x -# files for the supported backport branches, when appropriate, modulo version -# markers. - -name: e2e-nightly-main -on: - schedule: - - cron: '0 2 * * *' - -jobs: - e2e-nightly-test: - # Run parallel jobs for the listed testnet groups (must match the - # ./build/generator -g flag) - strategy: - fail-fast: false - matrix: - group: ['00', '01', '02', '03', '04', '05'] - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - uses: actions/setup-go@v5 - with: - go-version: '1.21' - - - uses: actions/checkout@v4 - - - name: Build - working-directory: test/e2e - # Run make jobs in parallel, since we can't run steps in parallel. - run: make -j2 docker generator runner tests - - - name: Generate testnets - if: matrix.group != 5 - working-directory: test/e2e - # When changing -g, also change the matrix groups above - run: ./build/generator -g 5 -d networks/nightly/ -p - - - name: Run p2p testnets (${{ matrix.group }}) - if: matrix.group != 5 - working-directory: test/e2e - run: ./run-multiple.sh networks/nightly/*-group${{ matrix.group }}-*.toml - - - name: Run p2p testnets (regression) - if: matrix.group == 5 - working-directory: test/e2e - run: ./run-multiple.sh networks_regressions/*.toml - - e2e-nightly-fail: - needs: e2e-nightly-test - if: ${{ failure() }} - runs-on: ubuntu-latest - steps: - - name: Notify Slack on failure - uses: slackapi/slack-github-action@v1.26.0 - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - BRANCH: ${{ github.ref_name }} - RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - COMMITS_URL: "${{ github.server_url }}/${{ github.repository }}/commits/${{ github.ref_name }}" - with: - payload: | - { - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": ":skull: Nightly E2E tests for `${{ env.BRANCH }}` failed. See the <${{ env.RUN_URL }}|run details> and the <${{ env.COMMITS_URL }}|latest commits> possibly related to the failure." - } - } - ] - } diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index abf7dfc72f4..ef5a8060c1f 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: diff --git a/.github/workflows/fuzz-nightly.yml b/.github/workflows/fuzz-nightly.yml index 082264ded6c..6b3fd85538e 100644 --- a/.github/workflows/fuzz-nightly.yml +++ b/.github/workflows/fuzz-nightly.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' - uses: actions/checkout@v4 @@ -77,23 +77,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Notify Slack on failure - uses: slackapi/slack-github-action@v1.26.0 + uses: slackapi/slack-github-action@v2.0.0 env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK BRANCH: ${{ github.ref_name }} CRASHERS: ${{ needs.fuzz-nightly-test.outputs.crashers-count }} RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" with: + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: incoming-webhook payload: | - { - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": ":skull: Nightly fuzz tests for `${{ env.BRANCH }}` failed with ${{ env.CRASHERS }} crasher(s). See the <${{ env.RUN_URL }}|run details>." - } - } - ] - } + blocks: + - type: "section" + text: + type: "mrkdwn" + text: ":skull: Nightly fuzz tests for `${{ env.BRANCH }}` failed with ${{ env.CRASHERS }} crasher(s). See the <${{ env.RUN_URL }}|run details>." diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml deleted file mode 100644 index 48b18d89250..00000000000 --- a/.github/workflows/govulncheck.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Check for Go vulnerabilities -# Runs https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck to proactively -# check for vulnerabilities in code packages if there were any changes made to -# any Go code or dependencies. -# -# Run `make vulncheck` from the root of the repo to run this workflow locally. -on: - pull_request: - push: - branches: - - v0.38.x - -jobs: - govulncheck: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v5 - with: - go-version: "1.21" - check-latest: true - - uses: actions/checkout@v4 - - uses: technote-space/get-diff-action@v6 - with: - PATTERNS: | - **/*.go - go.mod - go.sum - Makefile - - name: govulncheck - run: make vulncheck - if: "env.GIT_DIFF != ''" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 75a031a2085..1de75498941 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,16 +22,14 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.23' - uses: technote-space/get-diff-action@v6 with: PATTERNS: | **/**.go go.mod go.sum - - uses: golangci/golangci-lint-action@v6 - with: - version: latest - args: --timeout 10m - github-token: ${{ secrets.github_token }} + - name: Run linting if: env.GIT_DIFF + run: | + make lint diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 0e5190323ee..f2fad844b7f 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' # Similar check to ./release-version.yml, but enforces this when pushing # tags. The ./release-version.yml check can be bypassed and is mainly @@ -57,21 +57,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Notify Slack upon pre-release - uses: slackapi/slack-github-action@v1.26.0 + uses: slackapi/slack-github-action@v2.0.0 env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK RELEASE_URL: "${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}" with: + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: incoming-webhook payload: | - { - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": ":sparkles: New CometBFT pre-release: <${{ env.RELEASE_URL }}|${{ github.ref_name }}>" - } - } - ] - } + blocks: + - type: "section" + text: + type: "mrkdwn" + text: ":sparkles: New CometBFT pre-release: <${{ env.RELEASE_URL }}|${{ github.ref_name }}>" diff --git a/.github/workflows/proto-lint.yml b/.github/workflows/proto-lint.yml index 4c45a9923f4..53906b20877 100644 --- a/.github/workflows/proto-lint.yml +++ b/.github/workflows/proto-lint.yml @@ -15,7 +15,7 @@ jobs: timeout-minutes: 5 steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1.38.0 + - uses: bufbuild/buf-setup-action@v1.50.0 - uses: bufbuild/buf-lint-action@v1 with: input: 'proto' diff --git a/.github/workflows/release-version.yml b/.github/workflows/release-version.yml index 96cc598edba..ec27668d4e2 100644 --- a/.github/workflows/release-version.yml +++ b/.github/workflows/release-version.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' - name: Check version run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13fcc467946..1c8fc2a8b5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' # Similar check to ./release-version.yml, but enforces this when pushing # tags. The ./release-version.yml check can be bypassed and is mainly @@ -56,21 +56,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Notify Slack upon release - uses: slackapi/slack-github-action@v1.26.0 + uses: slackapi/slack-github-action@v2.0.0 env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK RELEASE_URL: "${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}" with: + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: incoming-webhook payload: | - { - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": ":rocket: New CometBFT release: <${{ env.RELEASE_URL }}|${{ github.ref_name }}>" - } - } - ] - } + blocks: + - type: "section" + text: + type: "mrkdwn" + text: ":rocket: New CometBFT release: <${{ env.RELEASE_URL }}|${{ github.ref_name }}>" diff --git a/.github/workflows/testapp-docker.yml b/.github/workflows/testapp-docker.yml deleted file mode 100644 index 6458e27d19e..00000000000 --- a/.github/workflows/testapp-docker.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Docker E2E Node -# Rebuilds the e2e Testapp docker image on every push to v0.38.x and creation of tags -# and pushes the image to https://hub.docker.com/r/cometbft/e2e-node -on: - push: - branches: - - v0.38.x - tags: - - "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10 - - "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" # e.g. v0.37.0-alpha.1, v0.38.0-alpha.10 - - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" # e.g. v0.37.0-beta.1, v0.38.0-beta.10 - - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" # e.g. v0.37.0-rc1, v0.38.0-rc10 - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Prepare - id: prep - run: | - DOCKER_IMAGE=cometbft/e2e-node - VERSION=noop - if [[ $GITHUB_REF == refs/tags/* ]]; then - VERSION=${GITHUB_REF#refs/tags/} - elif [[ $GITHUB_REF == refs/heads/* ]]; then - VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g') - if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then - VERSION=latest - fi - fi - TAGS="${DOCKER_IMAGE}:${VERSION}" - if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then - TAGS="$TAGS,${DOCKER_IMAGE}:${VERSION}" - fi - echo "tags=${TAGS}" >> $GITHUB_OUTPUT - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Build - uses: docker/setup-buildx-action@v3.6.1 - - - name: Login to DockerHub - if: ${{ github.event_name != 'pull_request' }} - uses: docker/login-action@v3.3.0 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Publish to Docker Hub - uses: docker/build-push-action@v6.7.0 - with: - context: . - file: ./test/e2e/docker/Dockerfile - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.prep.outputs.tags }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6625180a6c1..84742390fce 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: diff --git a/.golangci.yml b/.golangci.yml index 24116994dae..ba780ca7551 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,3 +1,4 @@ +version: "2" linters: enable: - asciicheck @@ -5,94 +6,162 @@ linters: - depguard - dogsled - dupl - - errcheck - # - copyloopvar - goconst - - gofmt - - goimports - # - gosec - - gosimple - - govet - - ineffassign - misspell - nakedret - nolintlint - prealloc - staticcheck - # - structcheck // to be fixed by golangci-lint - - stylecheck - - typecheck - unconvert - - unused - + settings: + depguard: + rules: + main: + files: + - $all + - '!$test' + allow: + - $gostd + - github.com/cometbft + - github.com/cosmos + - github.com/btcsuite/btcd/btcec/v2 + - github.com/BurntSushi/toml + - github.com/go-git/go-git/v5 + - github.com/go-kit + - github.com/go-logfmt/logfmt + - github.com/gofrs/uuid + - github.com/google + - github.com/gorilla/websocket + - github.com/informalsystems/tm-load-test/pkg/loadtest + - github.com/hashicorp/golang-lru/v2 + - github.com/lib/pq + - github.com/libp2p/go-buffer-pool + - github.com/Masterminds/semver/v3 + - github.com/minio/highwayhash + - github.com/oasisprotocol/curve25519-voi + - github.com/pkg/errors + - github.com/prometheus + - github.com/rcrowley/go-metrics + - github.com/rs/cors + - github.com/snikch/goodman + - github.com/spf13 + - github.com/stretchr/testify/require + - github.com/syndtr/goleveldb + - github.com/decred/dcrd/dcrec/secp256k1/v4 + - google.golang.org/grpc + - google.golang.org/protobuf/proto + - golang.org/x/sync + - golang.org/x/crypto + - golang.org/x/net + - gonum.org/v1/gonum/stat + - google.golang.org/protobuf/types/known/timestampp + test: + files: + - $test + allow: + - $gostd + - github.com/cosmos + - github.com/cometbft + - github.com/adlio/schema + - github.com/btcsuite/btcd + - github.com/fortytw2/leaktest + - github.com/go-kit + - github.com/google/uuid + - github.com/gorilla/websocket + - github.com/lib/pq + - github.com/oasisprotocol/curve25519-voi/primitives/merlin + - github.com/ory/dockertest + - github.com/pkg/errors + - github.com/prometheus/client_golang/prometheus/promhttp + - github.com/spf13 + - github.com/stretchr/testify + - github.com/decred/dcrd/dcrec/secp256k1/v4 + - google.golang.org/grpc + - google.golang.org/protobuf/proto + - google.golang.org/protobuf/types/known/timestampp + - gonum.org/v1/gonum/stat + - golang.org/x/sync + - golang.org/x/crypto + - golang.org/x/net + dogsled: + max-blank-identifiers: 3 + gosec: + excludes: + - G115 + misspell: + locale: US + revive: + enable-all-rules: true + rules: + - name: comment-spacings + disabled: true + - name: max-public-structs + disabled: true + - name: cognitive-complexity + disabled: true + - name: argument-limit + disabled: true + - name: cyclomatic + disabled: true + - name: deep-exit + disabled: true + - name: file-header + disabled: true + - name: function-length + disabled: true + - name: function-result-limit + disabled: true + - name: line-length-limit + disabled: true + - name: flag-parameter + disabled: true + - name: add-constant + disabled: true + - name: empty-lines + disabled: true + - name: import-shadowing + disabled: true + - name: modifies-value-receiver + disabled: true + - name: confusing-naming + disabled: true + - name: defer + disabled: true + - name: unchecked-type-assertion + disabled: true + - name: unhandled-error + arguments: + - fmt.Printf + - fmt.Print + - fmt.Println + disabled: true + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: + - gosec + path: _test\.go + - linters: + - goconst + path: (.+)_test\.go + paths: + - third_party$ + - builtin$ + - examples$ issues: - exclude-rules: - - path: _test\.go - linters: - - gosec max-same-issues: 50 - -linters-settings: - dogsled: - max-blank-identifiers: 3 - golint: - min-confidence: 0 - goconst: - ignore-tests: true - maligned: - suggest-new: true - misspell: - locale: US - depguard: - rules: - main: - files: - - $all - - "!$test" - allow: - - $gostd - - github.com/cometbft - - github.com/cosmos - - github.com/btcsuite/btcd/btcec/v2 - - github.com/BurntSushi/toml - - github.com/go-git/go-git/v5 - - github.com/go-kit - - github.com/go-logfmt/logfmt - - github.com/gofrs/uuid - - github.com/google - - github.com/gorilla/websocket - - github.com/informalsystems/tm-load-test/pkg/loadtest - - github.com/hashicorp/golang-lru/v2 - - github.com/lib/pq - - github.com/libp2p/go-buffer-pool - - github.com/Masterminds/semver/v3 - - github.com/minio/highwayhash - - github.com/oasisprotocol/curve25519-voi - - github.com/pkg/errors - - github.com/prometheus - - github.com/rcrowley/go-metrics - - github.com/rs/cors - - github.com/snikch/goodman - - github.com/spf13 - - github.com/stretchr/testify/require - - github.com/syndtr/goleveldb - test: - files: - - "$test" - allow: - - $gostd - - github.com/cosmos - - github.com/cometbft - - github.com/adlio/schema - - github.com/btcsuite/btcd - - github.com/fortytw2/leaktest - - github.com/go-kit - - github.com/google/uuid - - github.com/gorilla/websocket - - github.com/lib/pq - - github.com/oasisprotocol/curve25519-voi/primitives/merlin - - github.com/ory/dockertest - - github.com/pkg/errors - - github.com/prometheus/client_golang/prometheus/promhttp - - github.com/spf13 - - github.com/stretchr/testify +formatters: + enable: + - gofmt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/.mockery.yml b/.mockery.yml new file mode 100644 index 00000000000..b361a96eee3 --- /dev/null +++ b/.mockery.yml @@ -0,0 +1,4 @@ +issue-845-fix: True +resolve-type-alias: False +case: underscore # deprecated +replace-type: github.com/cometbft/cometbft/p2p/internal/nodekey.ID=github.com/cometbft/cometbft/p2p.ID diff --git a/CHANGELOG.md b/CHANGELOG.md index e620b6586ef..8b8687d67ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,160 @@ # CHANGELOG +## UNRELEASED + +### DEPENDENCIES + +### BUG FIXES + +### IMPROVEMENTS +- `[statesync]` Add configurable `max-snapshot-chunks` parameter to validate max amount of chunks in a `SnapshotResponse`. + ([\#5548](https://github.com/cometbft/cometbft/pull/5548)) + +### FEATURES + +### BUG-FIXES + +### STATE-BREAKING + +### API-BREAKING + +## v0.38.19 + +*October 14, 2025* + +This release fixes two security issues, including ([ASA-2025-003](https://github.com/cometbft/cometbft/security/advisories/GHSA-hrhf-2vcr-ghch)). +Users are encouraged to upgrade as soon as possible. + +Additionally included is a bug fix to properly prune extended commits (with +vote extensions). + +### BUG-FIXES + +- `[consensus]` Reject oversized proposals + ([\#5324](https://github.com/cometbft/cometbft/pull/5324)) +- `[store]` Prune extended commits properly + ([5275](https://github.com/cometbft/cometbft/issues/5275)) +- `[bits]` Validate BitArray mismatched Bits and Elems length + ([ASA-2025-003](https://github.com/cometbft/cometbft/security/advisories/GHSA-hrhf-2vcr-ghch)) + +## v0.38.18 + +*July 3, 2025* + +Adds precommit metrics and reindex CLI command. + +### IMPROVEMENTS + +- Adds metrics that emit precommit data; precommit quorum delay from proposal, and precommit vote count and stake weight within timeout commit period. + ([\#5251](https://github.com/cometbft/cometbft/issues/5251)) + +## v0.38.17 + +*February 3, 2025* + +This release fixes two security issues (ASA-2025-001, ASA-2025-002). Users are +encouraged to upgrade as soon as possible. + +### BUG FIXES + +- `[blocksync]` Ban peer if it reports height lower than what was previously reported + ([ASA-2025-001](https://github.com/cometbft/cometbft/security/advisories/GHSA-22qq-3xwm-r5x4)) +- `[types]` Check that `Part.Index` equals `Part.Proof.Index` + ([ASA-2025-001](https://github.com/cometbft/cometbft/security/advisories/GHSA-r3r4-g7hq-pq4f)) + +### DEPENDENCIES + +- `[go/runtime]` Bump minimum Go version to 1.22.11 + ([\#4891](https://github.com/cometbft/cometbft/pull/4891)) + +## v0.38.16 + +*December 20 2024* + +This release: +- fixes a bug that caused a node produce errors caused by the sending of next PEX requests too soon. +As a consequence of this incorrect behavior a node would be marked as BAD. +- Adds a proper description of `ExtendedVoteInfo` and `VoteInfo` in the spec. + +### BUG FIXES + +- `[mocks]` Mockery `v2.49.0` broke the mocks. We had to add a `.mockery.yaml` to +properly handle this change. + ([\#4521](https://github.com/cometbft/cometbft/pull/4521)) + +## v0.38.15 + +*November 6, 2024* + +This release supersedes [`v0.38.14`](#v03814), which mistakenly updated the Go version to +`1.23`, introducing an unintended breaking change. It sets the Go version back +to `1.22.7` by reverting [\#4297](https://github.com/cometbft/cometbft/pull/4297). + +The release includes the bug fixes, performance improvements, and importantly, +the fix for the security vulnerability in the vote extensions (VE) validation +logic that were part of `v0.38.14`. For more details, please refer to [ASA-2024-011](https://github.com/cometbft/cometbft/security/advisories/GHSA-p7mv-53f2-4cwj). + +## v0.38.14 + +*November 6, 2024* + +This release fixes a security vulnerability in the vote extensions (VE) +validation logic. For more details, please refer to +[ASA-2024-011](https://github.com/cometbft/cometbft/security/advisories/GHSA-p7mv-53f2-4cwj). + +We recommend upgrading ASAP if you’re using vote extensions (VE). + +### BUG FIXES + +- `[consensus]` Do not panic if the validator index of a `Vote` message is out + of bounds, when vote extensions are enabled + ([\#ABC-0021](https://github.com/cometbft/cometbft/security/advisories/GHSA-p7mv-53f2-4cwj)) + +### DEPENDENCIES + +- Bump cometbft-db version to v0.15.0 + ([\#4297](https://github.com/cometbft/cometbft/pull/4297)) +- `[go/runtime]` Bump Go version to 1.23 + ([\#4297](https://github.com/cometbft/cometbft/pull/4297)) + +### IMPROVEMENTS + +- `[p2p]` fix exponential backoff logic to increase reconnect retries close to 24 hours + ([\#3519](https://github.com/cometbft/cometbft/issues/3519)) + +## v0.38.13 + +*October 24, 2024* + +This patch release addresses the issue where tx_search was not returning all results, which only arises when upgrading +to CometBFT-DB version 0.13 or later. It includes a fix in the state indexer to resolve this problem. We recommend +upgrading to this patch release if you are affected by this issue. + +### BUG FIXES + +- `[metrics]` Call unused `rejected_txs` metric in mempool + ([\#4019](https://github.com/cometbft/cometbft/pull/4019)) +- `[state/indexer]` Fix the tx_search results not returning all results by changing the logic in the indexer to copy the key and values instead of reusing an iterator. This issue only arises when upgrading to cometbft-db v0.13 or later. + ([\#4295](https://github.com/cometbft/cometbft/issues/4295)). Special thanks to @faddat for reporting the issue. + +### DEPENDENCIES + +- `[go/runtime]` Bump Go version to 1.22 + ([\#4073](https://github.com/cometbft/cometbft/pull/4073)) +- Bump cometbft-db version to v0.14.1 + ([\#4321](https://github.com/cometbft/cometbft/pull/4321)) + +### FEATURES + +- `[crypto]` use decred secp256k1 directly ([#4294](https://github.com/cometbft/cometbft/pull/4294)) + +### IMPROVEMENTS + +- `[metrics]` Add `evicted_txs` metric to mempool + ([\#4019](https://github.com/cometbft/cometbft/pull/4019)) +- `[log]` Change "mempool is full" log to debug level + ([\#4123](https://github.com/cometbft/cometbft/pull/4123)) Special thanks to @yihuang. + ## v0.38.12 *September 3, 2024* @@ -19,6 +174,9 @@ for all users. `btcec/v2` latest release, while avoiding breaking changes to local CometBFT functions ([\#3728](https://github.com/cometbft/cometbft/pull/3728)) +- pinned mockery's version to v2.49.2 to prevent potential + changes in mocks after each new release of mockery + ([\#4605](https://github.com/cometbft/cometbft/pull/4605)) ### IMPROVEMENTS @@ -359,7 +517,7 @@ gossip. ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) - `[config]` Add mempool parameters `experimental_max_gossip_connections_to_persistent_peers` and `experimental_max_gossip_connections_to_non_persistent_peers` for limiting the number of peers to - which the node gossip transactions. + which the node gossip transactions. ([\#1558](https://github.com/cometbft/cometbft/pull/1558)) ([\#1584](https://github.com/cometbft/cometbft/pull/1584)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 812e329e679..898b6eaa4b6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -148,20 +148,11 @@ If you are a VS Code user, you may want to add the following to your `.vscode/se ## Changelog -To manage and generate our changelog, we currently use [unclog](https://github.com/informalsystems/unclog). - -Every fix, improvement, feature, or breaking change should be made in a -pull-request that includes a file -`.changelog/unreleased/${category}/${issue-or-pr-number}-${description}.md`, -where: -- `category` is one of `improvements`, `breaking-changes`, `bug-fixes`, - `features` and if multiple apply, create multiple files; -- `description` is a short (4 to 6 word), hyphen separated description of the - fix, starting the component changed; and, -- `issue or PR number` is the CometBFT issue number, if one exists, or the PR - number, otherwise. - -For examples, see the [.changelog](.changelog) folder. +Every PR with types `fix`, `feat`, `deps`, and `refactor` should include an entry in `CHANGELOG.md`. Commits on the +`main` branch should be placed under `UNRELEASED` within the correct category. +The categories include `DEPENDENCIES`, `IMPROVEMENTS`, `FEATURES`, `BUG-FIXES`, `STATE-BREAKING`, `API-BREAKING`. + +For examples, see the [CHANGELOG.md](CHANGELOG.md) file. A feature can also be worked on a feature branch, if its size and/or risk justifies it (see [below](#branching-model-and-release)). diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 3649cc5a0b3..55931c348d0 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -1,6 +1,6 @@ # Use a build arg to ensure that both stages use the same, # hopefully current, go version. -ARG GOLANG_BASE_IMAGE=golang:1.21-alpine +ARG GOLANG_BASE_IMAGE=golang:1.22-alpine # stage 1 Generate CometBFT Binary FROM --platform=$BUILDPLATFORM $GOLANG_BASE_IMAGE as builder diff --git a/Makefile b/Makefile index 49c437baf38..667987020c8 100644 --- a/Makefile +++ b/Makefile @@ -252,20 +252,14 @@ format: #? lint: Run latest golangci-lint linter lint: @echo "--> Running linter" - @go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run + @go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest run .PHONY: lint -# https://github.com/cometbft/cometbft/pull/1925#issuecomment-1875127862 -# Revisit using lint-format after CometBFT v1 release and/or after 2024-06-01. -#lint-format: -# @go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run --fix -# @go run mvdan.cc/gofumpt -l -w ./.. -#.PHONY: lint-format - -#? vulncheck: Run latest govulncheck -vulncheck: - @go run golang.org/x/vuln/cmd/govulncheck@latest ./... -.PHONY: vulncheck +#? lint: Run latest golangci-lint linter and apply fixes +lint-fix: + @echo "--> Running linter" + @go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest run --fix +.PHONY: lint-fix #? lint-typo: Run codespell to check typos lint-typo: diff --git a/NOTICE b/NOTICE new file mode 100644 index 00000000000..332778b3e1e --- /dev/null +++ b/NOTICE @@ -0,0 +1,13 @@ +NOTICE + +About Cosmos Labs + +Cosmos Labs is the development and growth organization behind the Cosmos stack of technologies and ecosystem, the world leading blockchain platform powering more than 200 production chains in finance, payments, and real-world assets. Cosmos Labs leads the development of the Cosmos technology stack, including the Cosmos SDK, CometBFT, and IBC protocols that enable sovereign, interoperable blockchains, in tandem with the Interchain Foundation. Cosmos Labs offers blockchain solutions for enterprises and finance, learn more by visiting: https://cosmos.network/, https://cosmoslabs.io/ + +Licence + +This product This product includes software developed by Cosmos Labs and is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + +Attribution + +If you distribute this software or derivative works, you must include a copy of this NOTICE file (or equivalent attribution) in your distribution, as required by Section 4(d) of the Apache License, Version 2.0. diff --git a/README.md b/README.md index a42388d0021..ca1b4462ad3 100644 --- a/README.md +++ b/README.md @@ -62,10 +62,10 @@ looking for, see [our security policy](SECURITY.md). | CometBFT version | Requirement | Notes | |------------------|-------------|-------------------| -| main | Go version | Go 1.20 or higher | -| v0.38.x | Go version | Go 1.20 or higher | -| v0.37.x | Go version | Go 1.20 or higher | -| v0.34.x | Go version | Go 1.19 or higher | +| main | Go version | Go 1.22 or higher | +| v0.38.x | Go version | Go 1.22 or higher | +| v0.37.x | Go version | Go 1.22 or higher | +| v0.34.x | Go version | Go 1.12 or higher | ### Install @@ -173,7 +173,7 @@ maintains [cometbft.com](https://cometbft.com). [version-url]: https://github.com/cometbft/cometbft/releases/latest [api-badge]: https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667 [api-url]: https://pkg.go.dev/github.com/cometbft/cometbft -[go-badge]: https://img.shields.io/badge/go-1.20-blue.svg +[go-badge]: https://img.shields.io/badge/go-1.22-blue.svg [go-url]: https://github.com/moovweb/gvm [discord-badge]: https://img.shields.io/discord/669268347736686612.svg [discord-url]: https://discord.gg/interchain diff --git a/UPGRADING.md b/UPGRADING.md index 4f1e4cb3d15..dfec44f8deb 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -2,6 +2,11 @@ This guide provides instructions for upgrading to specific versions of CometBFT. +## v0.38.13 + +It is recommended that CometBFT be built with Go v1.22+ since v1.21 is no longer +supported. + ## v0.38.0 This release introduces state machine-breaking changes, as well as substantial changes diff --git a/abci/client/grpc_client.go b/abci/client/grpc_client.go index bb8ad4819bd..65aa3d54346 100644 --- a/abci/client/grpc_client.go +++ b/abci/client/grpc_client.go @@ -87,7 +87,7 @@ func (cli *grpcClient) OnStart() error { RETRY_LOOP: for { - conn, err := grpc.Dial(cli.addr, + conn, err := grpc.NewClient(cli.addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(dialerFunc), ) diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index c92766971ab..afd8730cd54 100644 --- a/abci/client/mocks/client.go +++ b/abci/client/mocks/client.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -23,6 +23,10 @@ type Client struct { func (_m *Client) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ApplySnapshotChunk") + } + var r0 *types.ResponseApplySnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)); ok { @@ -49,6 +53,10 @@ func (_m *Client) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestAppl func (_m *Client) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 *types.ResponseCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)); ok { @@ -75,6 +83,10 @@ func (_m *Client) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*type func (_m *Client) CheckTxAsync(_a0 context.Context, _a1 *types.RequestCheckTx) (*abcicli.ReqRes, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTxAsync") + } + var r0 *abcicli.ReqRes var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*abcicli.ReqRes, error)); ok { @@ -101,6 +113,10 @@ func (_m *Client) CheckTxAsync(_a0 context.Context, _a1 *types.RequestCheckTx) ( func (_m *Client) Commit(_a0 context.Context, _a1 *types.RequestCommit) (*types.ResponseCommit, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 *types.ResponseCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCommit) (*types.ResponseCommit, error)); ok { @@ -205,6 +221,10 @@ func (_m *Client) DoesSubAccountBelongToVal(_a0 context.Context, _a1 *types.Requ func (_m *Client) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Echo") + } + var r0 *types.ResponseEcho var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*types.ResponseEcho, error)); ok { @@ -227,10 +247,14 @@ func (_m *Client) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, er return r0, r1 } -// Error provides a mock function with given fields: +// Error provides a mock function with no fields func (_m *Client) Error() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Error") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -245,6 +269,10 @@ func (_m *Client) Error() error { func (_m *Client) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ExtendVote") + } + var r0 *types.ResponseExtendVote var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestExtendVote) (*types.ResponseExtendVote, error)); ok { @@ -297,6 +325,10 @@ func (_m *Client) FetchOracleVotes(_a0 context.Context, _a1 *types.RequestFetchO func (_m *Client) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for FinalizeBlock") + } + var r0 *types.ResponseFinalizeBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error)); ok { @@ -323,6 +355,10 @@ func (_m *Client) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeB func (_m *Client) Flush(_a0 context.Context) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Flush") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(_a0) @@ -337,6 +373,10 @@ func (_m *Client) Flush(_a0 context.Context) error { func (_m *Client) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.ResponseInfo, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Info") + } + var r0 *types.ResponseInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInfo) (*types.ResponseInfo, error)); ok { @@ -363,6 +403,10 @@ func (_m *Client) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.Resp func (_m *Client) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for InitChain") + } + var r0 *types.ResponseInitChain var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInitChain) (*types.ResponseInitChain, error)); ok { @@ -385,10 +429,14 @@ func (_m *Client) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (* return r0, r1 } -// IsRunning provides a mock function with given fields: +// IsRunning provides a mock function with no fields func (_m *Client) IsRunning() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsRunning") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -403,6 +451,10 @@ func (_m *Client) IsRunning() bool { func (_m *Client) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListSnapshots") + } + var r0 *types.ResponseListSnapshots var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestListSnapshots) (*types.ResponseListSnapshots, error)); ok { @@ -429,6 +481,10 @@ func (_m *Client) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnaps func (_m *Client) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for LoadSnapshotChunk") + } + var r0 *types.ResponseLoadSnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)); ok { @@ -455,6 +511,10 @@ func (_m *Client) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadS func (_m *Client) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for OfferSnapshot") + } + var r0 *types.ResponseOfferSnapshot var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)); ok { @@ -477,10 +537,14 @@ func (_m *Client) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnap return r0, r1 } -// OnReset provides a mock function with given fields: +// OnReset provides a mock function with no fields func (_m *Client) OnReset() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OnReset") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -491,10 +555,14 @@ func (_m *Client) OnReset() error { return r0 } -// OnStart provides a mock function with given fields: +// OnStart provides a mock function with no fields func (_m *Client) OnStart() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OnStart") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -505,7 +573,7 @@ func (_m *Client) OnStart() error { return r0 } -// OnStop provides a mock function with given fields: +// OnStop provides a mock function with no fields func (_m *Client) OnStop() { _m.Called() } @@ -514,6 +582,10 @@ func (_m *Client) OnStop() { func (_m *Client) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for PrepareProposal") + } + var r0 *types.ResponsePrepareProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error)); ok { @@ -540,6 +612,10 @@ func (_m *Client) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepare func (_m *Client) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ProcessProposal") + } + var r0 *types.ResponseProcessProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestProcessProposal) (*types.ResponseProcessProposal, error)); ok { @@ -566,6 +642,10 @@ func (_m *Client) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcess func (_m *Client) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.ResponseQuery, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 *types.ResponseQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestQuery) (*types.ResponseQuery, error)); ok { @@ -588,10 +668,14 @@ func (_m *Client) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.Re return r0, r1 } -// Quit provides a mock function with given fields: +// Quit provides a mock function with no fields func (_m *Client) Quit() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Quit") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -604,10 +688,14 @@ func (_m *Client) Quit() <-chan struct{} { return r0 } -// Reset provides a mock function with given fields: +// Reset provides a mock function with no fields func (_m *Client) Reset() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Reset") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -628,10 +716,14 @@ func (_m *Client) SetResponseCallback(_a0 abcicli.Callback) { _m.Called(_a0) } -// Start provides a mock function with given fields: +// Start provides a mock function with no fields func (_m *Client) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -642,10 +734,14 @@ func (_m *Client) Start() error { return r0 } -// Stop provides a mock function with given fields: +// Stop provides a mock function with no fields func (_m *Client) Stop() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Stop") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -656,10 +752,14 @@ func (_m *Client) Stop() error { return r0 } -// String provides a mock function with given fields: +// String provides a mock function with no fields func (_m *Client) String() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for String") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -700,6 +800,10 @@ func (_m *Client) ValidateOracleVotes(_a0 context.Context, _a1 *types.RequestVal func (_m *Client) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for VerifyVoteExtension") + } + var r0 *types.ResponseVerifyVoteExtension var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error)); ok { @@ -722,13 +826,12 @@ func (_m *Client) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVer return r0, r1 } -type mockConstructorTestingTNewClient interface { +// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewClient(t mockConstructorTestingTNewClient) *Client { +}) *Client { mock := &Client{} mock.Mock.Test(t) diff --git a/abci/client/socket_client_test.go b/abci/client/socket_client_test.go index f4bade22934..48ebc37e936 100644 --- a/abci/client/socket_client_test.go +++ b/abci/client/socket_client_test.go @@ -202,7 +202,7 @@ type blockedABCIApplication struct { func (b blockedABCIApplication) CheckTxAsync(ctx context.Context, r *types.RequestCheckTx) (*types.ResponseCheckTx, error) { b.wg.Wait() - return b.BaseApplication.CheckTx(ctx, r) + return b.CheckTx(ctx, r) } // TestCallbackInvokedWhenSetEarly ensures that the callback is invoked when diff --git a/abci/types/mocks/application.go b/abci/types/mocks/application.go index d8cb07ae4f4..5ca33af8764 100644 --- a/abci/types/mocks/application.go +++ b/abci/types/mocks/application.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type Application struct { func (_m *Application) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ApplySnapshotChunk") + } + var r0 *types.ResponseApplySnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)); ok { @@ -44,6 +48,10 @@ func (_m *Application) ApplySnapshotChunk(_a0 context.Context, _a1 *types.Reques func (_m *Application) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 *types.ResponseCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)); ok { @@ -70,6 +78,10 @@ func (_m *Application) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) ( func (_m *Application) Commit(_a0 context.Context, _a1 *types.RequestCommit) (*types.ResponseCommit, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 *types.ResponseCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCommit) (*types.ResponseCommit, error)); ok { @@ -174,6 +186,10 @@ func (_m *Application) DoesSubAccountBelongToVal(_a0 context.Context, _a1 *types func (_m *Application) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ExtendVote") + } + var r0 *types.ResponseExtendVote var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestExtendVote) (*types.ResponseExtendVote, error)); ok { @@ -226,6 +242,10 @@ func (_m *Application) FetchOracleVotes(_a0 context.Context, _a1 *types.RequestF func (_m *Application) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for FinalizeBlock") + } + var r0 *types.ResponseFinalizeBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error)); ok { @@ -252,6 +272,10 @@ func (_m *Application) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFina func (_m *Application) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.ResponseInfo, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Info") + } + var r0 *types.ResponseInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInfo) (*types.ResponseInfo, error)); ok { @@ -278,6 +302,10 @@ func (_m *Application) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types func (_m *Application) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for InitChain") + } + var r0 *types.ResponseInitChain var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInitChain) (*types.ResponseInitChain, error)); ok { @@ -304,6 +332,10 @@ func (_m *Application) InitChain(_a0 context.Context, _a1 *types.RequestInitChai func (_m *Application) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListSnapshots") + } + var r0 *types.ResponseListSnapshots var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestListSnapshots) (*types.ResponseListSnapshots, error)); ok { @@ -330,6 +362,10 @@ func (_m *Application) ListSnapshots(_a0 context.Context, _a1 *types.RequestList func (_m *Application) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for LoadSnapshotChunk") + } + var r0 *types.ResponseLoadSnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)); ok { @@ -356,6 +392,10 @@ func (_m *Application) LoadSnapshotChunk(_a0 context.Context, _a1 *types.Request func (_m *Application) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for OfferSnapshot") + } + var r0 *types.ResponseOfferSnapshot var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)); ok { @@ -382,6 +422,10 @@ func (_m *Application) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOffe func (_m *Application) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for PrepareProposal") + } + var r0 *types.ResponsePrepareProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error)); ok { @@ -408,6 +452,10 @@ func (_m *Application) PrepareProposal(_a0 context.Context, _a1 *types.RequestPr func (_m *Application) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ProcessProposal") + } + var r0 *types.ResponseProcessProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestProcessProposal) (*types.ResponseProcessProposal, error)); ok { @@ -434,6 +482,10 @@ func (_m *Application) ProcessProposal(_a0 context.Context, _a1 *types.RequestPr func (_m *Application) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.ResponseQuery, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 *types.ResponseQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestQuery) (*types.ResponseQuery, error)); ok { @@ -486,6 +538,10 @@ func (_m *Application) ValidateOracleVotes(_a0 context.Context, _a1 *types.Reque func (_m *Application) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for VerifyVoteExtension") + } + var r0 *types.ResponseVerifyVoteExtension var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error)); ok { @@ -508,13 +564,12 @@ func (_m *Application) VerifyVoteExtension(_a0 context.Context, _a1 *types.Reque return r0, r1 } -type mockConstructorTestingTNewApplication interface { +// NewApplication creates a new instance of Application. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewApplication(t interface { mock.TestingT Cleanup(func()) -} - -// NewApplication creates a new instance of Application. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewApplication(t mockConstructorTestingTNewApplication) *Application { +}) *Application { mock := &Application{} mock.Mock.Test(t) diff --git a/blocksync/metrics.go b/blocksync/metrics.go index f120b4f7c44..84f2823db8b 100644 --- a/blocksync/metrics.go +++ b/blocksync/metrics.go @@ -28,8 +28,8 @@ type Metrics struct { } func (m *Metrics) recordBlockMetrics(block *types.Block) { - m.NumTxs.Set(float64(len(block.Data.Txs))) - m.TotalTxs.Add(float64(len(block.Data.Txs))) + m.NumTxs.Set(float64(len(block.Txs))) + m.TotalTxs.Add(float64(len(block.Txs))) m.BlockSizeBytes.Set(float64(block.Size())) m.LatestBlockHeight.Set(float64(block.Height)) } diff --git a/blocksync/pool.go b/blocksync/pool.go index 49ddf4809ef..50180d342b8 100644 --- a/blocksync/pool.go +++ b/blocksync/pool.go @@ -371,11 +371,21 @@ func (pool *BlockPool) SetPeerRange(peerID p2p.ID, base int64, height int64) { peer := pool.peers[peerID] if peer != nil { + if base < peer.base || height < peer.height { + pool.Logger.Info("Peer is reporting height/base that is lower than what it previously reported", + "peer", peerID, + "height", height, "base", base, + "prevHeight", peer.height, "prevBase", peer.base) + // RemovePeer will redo all requesters associated with this peer. + pool.removePeer(peerID) + pool.banPeer(peerID) + return + } peer.base = base peer.height = height } else { if pool.isPeerBanned(peerID) { - pool.Logger.Debug("Ignoring banned peer", peerID) + pool.Logger.Debug("Ignoring banned peer", "peer", peerID) return } peer = newBPPeer(pool, peerID, base, height) @@ -400,6 +410,7 @@ func (pool *BlockPool) RemovePeer(peerID p2p.ID) { pool.removePeer(peerID) } +// CONTRACT: pool.mtx must be locked. func (pool *BlockPool) removePeer(peerID p2p.ID) { for _, requester := range pool.requesters { if requester.didRequestFrom(peerID) { @@ -440,11 +451,20 @@ func (pool *BlockPool) updateMaxPeerHeight() { pool.maxPeerHeight = max } +// IsPeerBanned returns true if the peer is banned. +func (pool *BlockPool) IsPeerBanned(peerID p2p.ID) bool { + pool.mtx.Lock() + defer pool.mtx.Unlock() + return pool.isPeerBanned(peerID) +} + +// CONTRACT: pool.mtx must be locked. func (pool *BlockPool) isPeerBanned(peerID p2p.ID) bool { // Todo: replace with cmttime.Since in future versions return time.Since(pool.bannedPeers[peerID]) < time.Second*60 } +// CONTRACT: pool.mtx must be locked. func (pool *BlockPool) banPeer(peerID p2p.ID) { pool.Logger.Debug("Banning peer", peerID) pool.bannedPeers[peerID] = cmttime.Now() diff --git a/blocksync/pool_test.go b/blocksync/pool_test.go index 0952e6ab69e..aa37dbd7157 100644 --- a/blocksync/pool_test.go +++ b/blocksync/pool_test.go @@ -2,6 +2,7 @@ package blocksync import ( "fmt" + "math" "testing" "time" @@ -319,29 +320,39 @@ func TestBlockPoolMaliciousNode(t *testing.T) { for _, peer := range peers { pool.SetPeerRange(peer.id, peer.base, peer.height) } + + ticker := time.NewTicker(1 * time.Second) // Speed of new block creation + defer ticker.Stop() for { - time.Sleep(1 * time.Second) // Speed of new block creation - for _, peer := range peers { - peer.height += 1 // Network height increases on all peers - pool.SetPeerRange(peer.id, peer.base, peer.height) // Tell the pool that a new height is available + select { + case <-pool.Quit(): + return + case <-ticker.C: + for _, peer := range peers { + peer.height++ // Network height increases on all peers + pool.SetPeerRange(peer.id, peer.base, peer.height) // Tell the pool that a new height is available + } } } }() // Start a goroutine to verify blocks go func() { + ticker := time.NewTicker(500 * time.Millisecond) // Speed of new block creation + defer ticker.Stop() for { - time.Sleep(500 * time.Millisecond) // Speed of block verification - if !pool.IsRunning() { + select { + case <-pool.Quit(): return - } - first, second, _ := pool.PeekTwoBlocks() - if first != nil && second != nil { - if second.LastCommit == nil { - // Second block is fake - pool.RemovePeerAndRedoAllPeerRequests(second.Height) - } else { - pool.PopRequest() + case <-ticker.C: + first, second, _ := pool.PeekTwoBlocks() + if first != nil && second != nil { + if second.LastCommit == nil { + // Second block is fake + pool.RemovePeerAndRedoAllPeerRequests(second.Height) + } else { + pool.PopRequest() + } } } } @@ -362,7 +373,126 @@ func TestBlockPoolMaliciousNode(t *testing.T) { // Process request peers[request.PeerID].inputChan <- inputData{t, pool, request} case <-testTicker.C: - banned := pool.isPeerBanned("bad") + banned := pool.IsPeerBanned("bad") + bannedOnce = bannedOnce || banned // Keep bannedOnce true, even if the malicious peer gets unbanned + caughtUp := pool.IsCaughtUp() + // Success: pool caught up and malicious peer was banned at least once + if caughtUp && bannedOnce { + t.Logf("Pool caught up, malicious peer was banned at least once, start consensus.") + return + } + // Failure: the pool caught up without banning the bad peer at least once + require.False(t, caughtUp, "Network caught up without banning the malicious peer at least once.") + // Failure: the network could not catch up in the allotted time + require.True(t, time.Since(startTime) < MaliciousTestMaximumLength, "Network ran too long, stopping test.") + } + } +} + +func TestBlockPoolMaliciousNodeMaxInt64(t *testing.T) { + // Setup: + // * each peer has blocks 1..N but the malicious peer reports 1..max(int64) (blocks N+1... do not exist) + // * The malicious peer then reports 1..N this time + // * Afterwards, it can choose to disconnect or stay connected to serve blocks that it has + // * The node ends up stuck in blocksync forever because max height is never reached (as of 63a2a6458) + // Additional notes: + // * When a peer is removed, we only update max height if it equals peer's + // height. The aforementioned scenario where peer reports its height twice + // lowering the height was not accounted for. + const initialHeight = 7 + peers := testPeers{ + p2p.ID("good"): &testPeer{p2p.ID("good"), 1, initialHeight, make(chan inputData), false}, + p2p.ID("bad"): &testPeer{p2p.ID("bad"), 1, math.MaxInt64, make(chan inputData), true}, + p2p.ID("good1"): &testPeer{p2p.ID("good1"), 1, initialHeight, make(chan inputData), false}, + } + errorsCh := make(chan peerError, 3) + requestsCh := make(chan BlockRequest) + + pool := NewBlockPool(1, requestsCh, errorsCh) + pool.SetLogger(log.TestingLogger()) + + err := pool.Start() + if err != nil { + t.Error(err) + } + + t.Cleanup(func() { + if err := pool.Stop(); err != nil { + t.Error(err) + } + }) + + peers.start() + t.Cleanup(func() { peers.stop() }) + + // Simulate blocks created on each peer regularly and update pool max height. + go func() { + // Introduce each peer + for _, peer := range peers { + pool.SetPeerRange(peer.id, peer.base, peer.height) + } + + // Report the lower height + peers["bad"].height = initialHeight + pool.SetPeerRange(p2p.ID("bad"), 1, initialHeight) + + ticker := time.NewTicker(1 * time.Second) // Speed of new block creation + defer ticker.Stop() + for { + select { + case <-pool.Quit(): + return + case <-ticker.C: + for _, peer := range peers { + peer.height++ // Network height increases on all peers + pool.SetPeerRange(peer.id, peer.base, peer.height) // Tell the pool that a new height is available + } + } + } + }() + + // Start a goroutine to verify blocks + go func() { + ticker := time.NewTicker(500 * time.Millisecond) // Speed of new block creation + defer ticker.Stop() + for { + select { + case <-pool.Quit(): + return + case <-ticker.C: + first, second, _ := pool.PeekTwoBlocks() + if first != nil && second != nil { + if second.LastCommit == nil { + // Second block is fake + pool.RemovePeerAndRedoAllPeerRequests(second.Height) + } else { + pool.PopRequest() + } + } + } + } + }() + + testTicker := time.NewTicker(200 * time.Millisecond) // speed of test execution + t.Cleanup(func() { testTicker.Stop() }) + + bannedOnce := false // true when the malicious peer was banned at least once + startTime := time.Now() + + // Pull from channels + for { + select { + case err := <-errorsCh: + if err.peerID == "bad" { // ignore errors from the malicious peer + t.Log(err) + } else { + t.Error(err) + } + case request := <-requestsCh: + // Process request + peers[request.PeerID].inputChan <- inputData{t, pool, request} + case <-testTicker.C: + banned := pool.IsPeerBanned("bad") bannedOnce = bannedOnce || banned // Keep bannedOnce true, even if the malicious peer gets unbanned caughtUp := pool.IsCaughtUp() // Success: pool caught up and malicious peer was banned at least once diff --git a/blocksync/reactor.go b/blocksync/reactor.go index 745f227663d..0f4c31cbd1c 100644 --- a/blocksync/reactor.go +++ b/blocksync/reactor.go @@ -125,7 +125,7 @@ func NewReactorWithAddr(state sm.State, blockExec *sm.BlockExecutor, store *stor // SetLogger implements service.Service by setting the logger on reactor and pool. func (bcR *Reactor) SetLogger(l log.Logger) { - bcR.BaseService.Logger = l + bcR.Logger = l bcR.pool.Logger = l } diff --git a/blocksync/reactor_test.go b/blocksync/reactor_test.go index 69bb3a70789..e68a3c60066 100644 --- a/blocksync/reactor_test.go +++ b/blocksync/reactor_test.go @@ -141,7 +141,8 @@ func newReactor( lastExtCommit := seenExtCommit.Clone() - thisBlock := state.MakeBlock(blockHeight, nil, lastExtCommit.ToCommit(), nil, state.Validators.Proposer.Address) + thisBlock, err := state.MakeBlock(blockHeight, nil, lastExtCommit.ToCommit(), nil, state.Validators.Proposer.Address) + require.NoError(t, err) thisParts, err := thisBlock.MakePartSet(types.BlockPartSizeBytes) require.NoError(t, err) @@ -150,9 +151,9 @@ func newReactor( // Simulate a commit for the current height vote, err := types.MakeVote( privVals[0], - thisBlock.Header.ChainID, + thisBlock.ChainID, idx, - thisBlock.Header.Height, + thisBlock.Height, 0, cmtproto.PrecommitType, blockID, @@ -223,10 +224,7 @@ func TestNoBlockResponse(t *testing.T) { {100, false}, } - for { - if reactorPairs[1].reactor.pool.IsCaughtUp() { - break - } + for !reactorPairs[1].reactor.pool.IsCaughtUp() { time.Sleep(10 * time.Millisecond) } @@ -320,10 +318,7 @@ func TestBadBlockStopsPeer(t *testing.T) { p2p.Connect2Switches(switches, i, len(reactorPairs)-1) } - for { - if lastReactorPair.reactor.pool.IsCaughtUp() || lastReactorPair.reactor.Switch.Peers().Size() == 0 { - break - } + for !lastReactorPair.reactor.pool.IsCaughtUp() && lastReactorPair.reactor.Switch.Peers().Size() != 0 { time.Sleep(1 * time.Second) } diff --git a/cmd/cometbft/commands/testnet.go b/cmd/cometbft/commands/testnet.go index 6870876d101..1e29caab5b9 100644 --- a/cmd/cometbft/commands/testnet.go +++ b/cmd/cometbft/commands/testnet.go @@ -140,8 +140,8 @@ func testnetFiles(*cobra.Command, []string) error { return err } - pvKeyFile := filepath.Join(nodeDir, config.BaseConfig.PrivValidatorKey) - pvStateFile := filepath.Join(nodeDir, config.BaseConfig.PrivValidatorState) + pvKeyFile := filepath.Join(nodeDir, config.PrivValidatorKey) + pvStateFile := filepath.Join(nodeDir, config.PrivValidatorState) pv := privval.LoadFilePV(pvKeyFile, pvStateFile) pubKey, err := pv.GetPubKey() @@ -189,7 +189,7 @@ func testnetFiles(*cobra.Command, []string) error { // Write genesis file. for i := 0; i < nValidators+nNonValidators; i++ { nodeDir := filepath.Join(outputDir, fmt.Sprintf("%s%d", nodeDirPrefix, i)) - if err := genDoc.SaveAs(filepath.Join(nodeDir, config.BaseConfig.Genesis)); err != nil { + if err := genDoc.SaveAs(filepath.Join(nodeDir, config.Genesis)); err != nil { _ = os.RemoveAll(outputDir) return err } diff --git a/cmd/cometbft/main.go b/cmd/cometbft/main.go index 438e2af3463..4df9b01173f 100644 --- a/cmd/cometbft/main.go +++ b/cmd/cometbft/main.go @@ -25,6 +25,7 @@ func main() { cmd.ShowValidatorCmd, cmd.TestnetFilesCmd, cmd.ShowNodeIDCmd, + cmd.ReIndexEventCmd, cmd.GenNodeKeyCmd, cmd.VersionCmd, cmd.RollbackStateCmd, diff --git a/config/config.go b/config/config.go index cfaaf0a9f0b..10fe30b1b62 100644 --- a/config/config.go +++ b/config/config.go @@ -120,7 +120,7 @@ func TestConfig() *Config { // SetRoot sets the RootDir for all Config structs func (cfg *Config) SetRoot(root string) *Config { - cfg.BaseConfig.RootDir = root + cfg.RootDir = root cfg.RPC.RootDir = root cfg.P2P.RootDir = root cfg.Mempool.RootDir = root @@ -949,6 +949,7 @@ type StateSyncConfig struct { DiscoveryTime time.Duration `mapstructure:"discovery_time"` ChunkRequestTimeout time.Duration `mapstructure:"chunk_request_timeout"` ChunkFetchers int32 `mapstructure:"chunk_fetchers"` + MaxSnapshotChunks uint32 `mapstructure:"max_snapshot_chunks"` } func (cfg *StateSyncConfig) TrustHashBytes() []byte { @@ -967,6 +968,7 @@ func DefaultStateSyncConfig() *StateSyncConfig { DiscoveryTime: 15 * time.Second, ChunkRequestTimeout: 10 * time.Second, ChunkFetchers: 4, + MaxSnapshotChunks: 100000, } } @@ -1020,6 +1022,10 @@ func (cfg *StateSyncConfig) ValidateBasic() error { if cfg.ChunkFetchers <= 0 { return errors.New("chunk_fetchers is required") } + + if cfg.MaxSnapshotChunks == 0 { + return errors.New("max_snapshot_chunks is required") + } } return nil diff --git a/config/toml.go b/config/toml.go index 0a7ef31edc9..d3a1b61750a 100644 --- a/config/toml.go +++ b/config/toml.go @@ -485,6 +485,9 @@ chunk_request_timeout = "{{ .StateSync.ChunkRequestTimeout }}" # The number of concurrent chunk fetchers to run (default: 1). chunk_fetchers = "{{ .StateSync.ChunkFetchers }}" +# Maximum number of chunks allowed in a snapshot (default: 100000). +max_snapshot_chunks = {{ .StateSync.MaxSnapshotChunks }} + ####################################################### ### Block Sync Configuration Options ### ####################################################### diff --git a/consensus/byzantine_test.go b/consensus/byzantine_test.go index eb13ed37a56..171f50a534c 100644 --- a/consensus/byzantine_test.go +++ b/consensus/byzantine_test.go @@ -597,4 +597,88 @@ func (br *ByzantineReactor) RemovePeer(peer p2p.Peer, reason interface{}) { func (br *ByzantineReactor) Receive(e p2p.Envelope) { br.reactor.Receive(e) } + func (br *ByzantineReactor) InitPeer(peer p2p.Peer) p2p.Peer { return peer } + +// Large/oversized proposals should be rejected +func TestRejectOversizedProposals(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + n := 2 + css, cleanup := randConsensusNet(t, n, "consensus_reactor_test", newMockTickerFunc(false), newKVStore) + defer cleanup() + + switches := make([]*p2p.Switch, n) + p2pLogger := consensusLogger().With("module", "p2p") + for i := 0; i < n; i++ { + switches[i] = p2p.MakeSwitch( + config.P2P, + i, + func(_ int, sw *p2p.Switch) *p2p.Switch { + return sw + }) + switches[i].SetLogger(p2pLogger.With("validator", i)) + } + + reactors := make([]p2p.Reactor, n) + for i := 0; i < n; i++ { + conR := NewReactor(css[i], false) + defer func() { require.NoError(t, conR.Stop()) }() + + conR.SetLogger(consensusLogger().With("validator", i)) + reactors[i] = conR + } + + p2p.MakeConnectedSwitches(config.P2P, n, func(i int, _ *p2p.Switch) *p2p.Switch { + switches[i].AddReactor("CONSENSUS", reactors[i]) + return switches[i] + }, p2p.Connect2Switches) + + peers := switches[0].Peers().List() + targetPeer := peers[0] + + height := int64(1) + round := int32(0) + cs := css[0] + + block, err := cs.createProposalBlock(ctx) + require.NoError(t, err) + + blockParts, err := block.MakePartSet(types.BlockPartSizeBytes) + require.NoError(t, err) + + // create oversized proposal + propBlockID := types.BlockID{Hash: block.Hash(), PartSetHeader: blockParts.Header()} + propBlockID.PartSetHeader.Total = 4294967295 + + proposal := types.NewProposal(height, round, -1, propBlockID) + p := proposal.ToProto() + if err := cs.privValidator.SignProposal(cs.state.ChainID, p); err != nil { + t.Error(err) + } + proposal.Signature = p.Signature + + success := targetPeer.Send(p2p.Envelope{ + ChannelID: DataChannel, + Message: &cmtcons.Proposal{Proposal: *proposal.ToProto()}, + }) + require.True(t, success) + + select { + case e := <-css[1].peerMsgQueue: + // if we receive a message here, the peer incorrectly accepted the + // oversized proposal + if _, receivedProposal := e.Msg.(*ProposalMessage); receivedProposal { + assert.Fail(t, "peer incorrectly accepted oversized proposal") + return + } + // invalid state, we received some other unexpected message type, fail + // the test + assert.Fail(t, "received unexpected message type on peer msg queue, expected *ProposalMessage") + case <-ctx.Done(): + case <-time.After(500 * time.Millisecond): + // timeout after 500ms if nothing has happened and assume peer rejected + // the proposal + } +} diff --git a/consensus/common_test.go b/consensus/common_test.go index 8060c46f71e..a38d34fccc0 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -96,7 +96,7 @@ func (vs *validatorStub) signVote( voteExtension []byte, extEnabled bool, ) (*types.Vote, error) { - pubKey, err := vs.PrivValidator.GetPubKey() + pubKey, err := vs.GetPubKey() if err != nil { return nil, fmt.Errorf("can't get pubkey: %w", err) } @@ -111,7 +111,7 @@ func (vs *validatorStub) signVote( Extension: voteExtension, } v := vote.ToProto() - if err = vs.PrivValidator.SignVote(test.DefaultTestChainID, v); err != nil { + if err = vs.SignVote(test.DefaultTestChainID, v); err != nil { return nil, fmt.Errorf("sign vote failed: %w", err) } diff --git a/consensus/errors.go b/consensus/errors.go new file mode 100644 index 00000000000..2c151ac0037 --- /dev/null +++ b/consensus/errors.go @@ -0,0 +1,9 @@ +package consensus + +type ErrInvalidVote struct { + Reason string +} + +func (e ErrInvalidVote) Error() string { + return "invalid vote: " + e.Reason +} diff --git a/consensus/metrics.gen.go b/consensus/metrics.gen.go index aea9322cde8..45e29d87010 100644 --- a/consensus/metrics.gen.go +++ b/consensus/metrics.gen.go @@ -162,12 +162,30 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics { Name: "quorum_prevote_delay", Help: "Interval in seconds between the proposal timestamp and the timestamp of the earliest prevote that achieved a quorum.", }, append(labels, "proposer_address")).With(labelsAndValues...), + QuorumPrecommitDelay: prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{ + Namespace: namespace, + Subsystem: MetricsSubsystem, + Name: "quorum_precommit_delay", + Help: "Interval in seconds between the proposal timestamp and the timestamp of the earliest precommit that achieved a quorum.", + }, append(labels, "proposer_address")).With(labelsAndValues...), FullPrevoteDelay: prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{ Namespace: namespace, Subsystem: MetricsSubsystem, Name: "full_prevote_delay", Help: "Interval in seconds between the proposal timestamp and the timestamp of the latest prevote in a round where all validators voted.", }, append(labels, "proposer_address")).With(labelsAndValues...), + PrecommitsCounted: prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{ + Namespace: namespace, + Subsystem: MetricsSubsystem, + Name: "precommits_counted", + Help: "PrecommitsCounted is the number of precommit votes counted after the timeout commit period has ended.", + }, labels).With(labelsAndValues...), + PrecommitsStakingPercentage: prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{ + Namespace: namespace, + Subsystem: MetricsSubsystem, + Name: "precommits_staking_percentage", + Help: "PrecommitsStakingPercentage is the voting power percentage of precommit votes once the timeout commit period has ended.", + }, labels).With(labelsAndValues...), VoteExtensionReceiveCount: prometheus.NewCounterFrom(stdprometheus.CounterOpts{ Namespace: namespace, Subsystem: MetricsSubsystem, @@ -203,35 +221,38 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics { func NopMetrics() *Metrics { return &Metrics{ - Height: discard.NewGauge(), - ValidatorLastSignedHeight: discard.NewGauge(), - Rounds: discard.NewGauge(), - RoundDurationSeconds: discard.NewHistogram(), - Validators: discard.NewGauge(), - ValidatorsPower: discard.NewGauge(), - ValidatorPower: discard.NewGauge(), - ValidatorMissedBlocks: discard.NewGauge(), - MissingValidators: discard.NewGauge(), - MissingValidatorsPower: discard.NewGauge(), - ByzantineValidators: discard.NewGauge(), - ByzantineValidatorsPower: discard.NewGauge(), - BlockIntervalSeconds: discard.NewHistogram(), - NumTxs: discard.NewGauge(), - BlockSizeBytes: discard.NewGauge(), - ChainSizeBytes: discard.NewCounter(), - TotalTxs: discard.NewGauge(), - CommittedHeight: discard.NewGauge(), - BlockParts: discard.NewCounter(), - DuplicateBlockPart: discard.NewCounter(), - DuplicateVote: discard.NewCounter(), - StepDurationSeconds: discard.NewHistogram(), - BlockGossipPartsReceived: discard.NewCounter(), - QuorumPrevoteDelay: discard.NewGauge(), - FullPrevoteDelay: discard.NewGauge(), - VoteExtensionReceiveCount: discard.NewCounter(), - ProposalReceiveCount: discard.NewCounter(), - ProposalCreateCount: discard.NewCounter(), - RoundVotingPowerPercent: discard.NewGauge(), - LateVotes: discard.NewCounter(), + Height: discard.NewGauge(), + ValidatorLastSignedHeight: discard.NewGauge(), + Rounds: discard.NewGauge(), + RoundDurationSeconds: discard.NewHistogram(), + Validators: discard.NewGauge(), + ValidatorsPower: discard.NewGauge(), + ValidatorPower: discard.NewGauge(), + ValidatorMissedBlocks: discard.NewGauge(), + MissingValidators: discard.NewGauge(), + MissingValidatorsPower: discard.NewGauge(), + ByzantineValidators: discard.NewGauge(), + ByzantineValidatorsPower: discard.NewGauge(), + BlockIntervalSeconds: discard.NewHistogram(), + NumTxs: discard.NewGauge(), + BlockSizeBytes: discard.NewGauge(), + ChainSizeBytes: discard.NewCounter(), + TotalTxs: discard.NewGauge(), + CommittedHeight: discard.NewGauge(), + BlockParts: discard.NewCounter(), + DuplicateBlockPart: discard.NewCounter(), + DuplicateVote: discard.NewCounter(), + StepDurationSeconds: discard.NewHistogram(), + BlockGossipPartsReceived: discard.NewCounter(), + QuorumPrevoteDelay: discard.NewGauge(), + QuorumPrecommitDelay: discard.NewGauge(), + FullPrevoteDelay: discard.NewGauge(), + PrecommitsCounted: discard.NewGauge(), + PrecommitsStakingPercentage: discard.NewGauge(), + VoteExtensionReceiveCount: discard.NewCounter(), + ProposalReceiveCount: discard.NewCounter(), + ProposalCreateCount: discard.NewCounter(), + RoundVotingPowerPercent: discard.NewGauge(), + LateVotes: discard.NewCounter(), } } diff --git a/consensus/metrics.go b/consensus/metrics.go index 6e89d6b483f..58aea268cc9 100644 --- a/consensus/metrics.go +++ b/consensus/metrics.go @@ -93,12 +93,30 @@ type Metrics struct { //metrics:Interval in seconds between the proposal timestamp and the timestamp of the earliest prevote that achieved a quorum. QuorumPrevoteDelay metrics.Gauge `metrics_labels:"proposer_address"` + // QuorumPrecommitDelay is the interval in seconds between the proposal + // timestamp and the timestamp of the earliest precommit that achieved a quorum + // during the precommit step. + // + // To compute it, sum the voting power over each precommit received, in increasing + // order of timestamp. The timestamp of the first precommit to increase the sum to + // be above 2/3 of the total voting power of the network defines the endpoint + // the endpoint of the interval. Subtract the proposal timestamp from this endpoint + // to obtain the quorum delay. + //metrics:Interval in seconds between the proposal timestamp and the timestamp of the earliest precommit that achieved a quorum. + QuorumPrecommitDelay metrics.Gauge `metrics_labels:"proposer_address"` + // FullPrevoteDelay is the interval in seconds between the proposal // timestamp and the timestamp of the latest prevote in a round where 100% // of the voting power on the network issued prevotes. //metrics:Interval in seconds between the proposal timestamp and the timestamp of the latest prevote in a round where all validators voted. FullPrevoteDelay metrics.Gauge `metrics_labels:"proposer_address"` + // PrecommitsCounted is the number of precommit votes counted after the timeout commit period has ended. + PrecommitsCounted metrics.Gauge + + // PrecommitsStakingPercentage is the voting power percentage of precommit votes once the timeout commit period has ended. + PrecommitsStakingPercentage metrics.Gauge + // VoteExtensionReceiveCount is the number of vote extensions received by this // node. The metric is annotated by the status of the vote extension from the // application, either 'accepted' or 'rejected'. diff --git a/consensus/reactor.go b/consensus/reactor.go index ee87b7ba637..bfac35856c7 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -320,6 +320,15 @@ func (conR *Reactor) Receive(e p2p.Envelope) { } switch msg := msg.(type) { case *ProposalMessage: + conR.conS.mtx.RLock() + maxBytes := conR.conS.state.ConsensusParams.Block.MaxBytes + conR.conS.mtx.RUnlock() + if err := msg.Proposal.ValidateBlockSize(maxBytes); err != nil { + conR.Logger.Error("Rejecting oversized proposal", "peer", e.Src, "height", msg.Proposal.Height) + conR.Switch.StopPeerForError(e.Src, ErrProposalTooManyParts) + return + } + ps.SetHasProposal(msg.Proposal) conR.conS.peerMsgQueue <- msgInfo{msg, e.Src.ID()} case *ProposalPOLMessage: @@ -768,13 +777,14 @@ OUTER_LOOP: } } - if sleeping == 0 { + switch sleeping { + case 0: // We sent nothing. Sleep... sleeping = 1 logger.Debug("No votes to send, sleeping", "rs.Height", rs.Height, "prs.Height", prs.Height, "localPV", rs.Votes.Prevotes(rs.Round).BitArray(), "peerPV", prs.Prevotes, "localPC", rs.Votes.Precommits(rs.Round).BitArray(), "peerPC", prs.Precommits) - } else if sleeping == 2 { + case 2: // Continued sleep... sleeping = 1 } @@ -1276,7 +1286,8 @@ func (ps *PeerState) EnsureVoteBitArrays(height int64, numValidators int) { } func (ps *PeerState) ensureVoteBitArrays(height int64, numValidators int) { - if ps.PRS.Height == height { + switch ps.PRS.Height { + case height: if ps.PRS.Prevotes == nil { ps.PRS.Prevotes = bits.NewBitArray(numValidators) } @@ -1289,7 +1300,7 @@ func (ps *PeerState) ensureVoteBitArrays(height int64, numValidators int) { if ps.PRS.ProposalPOL == nil { ps.PRS.ProposalPOL = bits.NewBitArray(numValidators) } - } else if ps.PRS.Height == height+1 { + case height + 1: if ps.PRS.LastCommit == nil { ps.PRS.LastCommit = bits.NewBitArray(numValidators) } @@ -1601,6 +1612,9 @@ func (m *NewValidBlockMessage) ValidateBasic() error { if err := m.BlockPartSetHeader.ValidateBasic(); err != nil { return fmt.Errorf("wrong BlockPartSetHeader: %v", err) } + if err := m.BlockParts.ValidateBasic(); err != nil { + return fmt.Errorf("validating BlockParts: %w", err) + } if m.BlockParts.Size() == 0 { return errors.New("empty blockParts") } @@ -1633,6 +1647,12 @@ func (m *ProposalMessage) ValidateBasic() error { return m.Proposal.ValidateBasic() } +// ValidateBlockSize validates the proposals block size against a maximum. If +// -1 is passed, types.MaxBlockSizeBytes will be used as the maximum. +func (m *ProposalMessage) ValidateBlockSize(maxBlockSizeBytes int64) error { + return m.Proposal.ValidateBlockSize(maxBlockSizeBytes) +} + // String returns a string representation. func (m *ProposalMessage) String() string { return fmt.Sprintf("[Proposal %v]", m.Proposal) @@ -1655,6 +1675,9 @@ func (m *ProposalPOLMessage) ValidateBasic() error { if m.ProposalPOLRound < 0 { return errors.New("negative ProposalPOLRound") } + if err := m.ProposalPOL.ValidateBasic(); err != nil { + return fmt.Errorf("validating ProposalPOL: %w", err) + } if m.ProposalPOL.Size() == 0 { return errors.New("empty ProposalPOL bit array") } @@ -1800,6 +1823,9 @@ func (m *VoteSetBitsMessage) ValidateBasic() error { if err := m.BlockID.ValidateBasic(); err != nil { return fmt.Errorf("wrong BlockID: %v", err) } + if err := m.Votes.ValidateBasic(); err != nil { + return fmt.Errorf("validating Votes: %w", err) + } // NOTE: Votes.Size() can be zero if the node does not have any if m.Votes.Size() > types.MaxVotesCount { return fmt.Errorf("votes bit array is too big: %d, max: %d", m.Votes.Size(), types.MaxVotesCount) diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index abd1d5199a1..158f2dddb70 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -26,6 +26,7 @@ import ( "github.com/cometbft/cometbft/libs/bytes" "github.com/cometbft/cometbft/libs/json" "github.com/cometbft/cometbft/libs/log" + cmtrand "github.com/cometbft/cometbft/libs/rand" cmtsync "github.com/cometbft/cometbft/libs/sync" mempl "github.com/cometbft/cometbft/mempool" "github.com/cometbft/cometbft/p2p" @@ -703,7 +704,7 @@ func waitForAndValidateBlockWithTx( // check that txs match the txs we're waiting for. // note they could be spread over multiple blocks, // but they should be in order. - for _, tx := range newBlock.Data.Txs { + for _, tx := range newBlock.Txs { assert.EqualValues(t, txs[ntxs], tx) ntxs++ } @@ -887,6 +888,14 @@ func TestNewValidBlockMessageValidateBasic(t *testing.T) { func(msg *NewValidBlockMessage) { msg.BlockParts = bits.NewBitArray(int(types.MaxBlockPartsCount) + 1) }, "blockParts bit array size 1602 not equal to BlockPartSetHeader.Total 1", }, + { + func(msg *NewValidBlockMessage) { msg.BlockParts.Elems = nil }, + "mismatch between specified number of bits 1, and number of elements 0, expected 1 elements", + }, + { + func(msg *NewValidBlockMessage) { msg.BlockParts.Bits = 500 }, + "mismatch between specified number of bits 500, and number of elements 1, expected 8 elements", + }, } for i, tc := range testCases { @@ -923,6 +932,14 @@ func TestProposalPOLMessageValidateBasic(t *testing.T) { func(msg *ProposalPOLMessage) { msg.ProposalPOL = bits.NewBitArray(types.MaxVotesCount + 1) }, "proposalPOL bit array is too big: 10001, max: 10000", }, + { + func(msg *ProposalPOLMessage) { msg.ProposalPOL.Elems = nil }, + "mismatch between specified number of bits 1, and number of elements 0, expected 1 elements", + }, + { + func(msg *ProposalPOLMessage) { msg.ProposalPOL.Bits = 500 }, + "mismatch between specified number of bits 500, and number of elements 1, expected 8 elements", + }, } for i, tc := range testCases { @@ -1079,6 +1096,14 @@ func TestVoteSetBitsMessageValidateBasic(t *testing.T) { func(msg *VoteSetBitsMessage) { msg.Votes = bits.NewBitArray(types.MaxVotesCount + 1) }, "votes bit array is too big: 10001, max: 10000", }, + { + func(msg *VoteSetBitsMessage) { msg.Votes.Elems = nil }, + "mismatch between specified number of bits 1, and number of elements 0, expected 1 elements", + }, + { + func(msg *VoteSetBitsMessage) { msg.Votes.Bits = 500 }, + "mismatch between specified number of bits 500, and number of elements 1, expected 8 elements", + }, } for i, tc := range testCases { @@ -1129,3 +1154,39 @@ func TestMarshalJSONPeerState(t *testing.T) { "block_parts":"0"} }`, string(data)) } + +func TestVoteMessageValidateBasic(t *testing.T) { + _, vss := randState(2) + + randBytes := cmtrand.Bytes(tmhash.Size) + blockID := types.BlockID{ + Hash: randBytes, + PartSetHeader: types.PartSetHeader{ + Total: 1, + Hash: randBytes, + }, + } + vote := signVote(vss[1], cmtproto.PrecommitType, randBytes, blockID.PartSetHeader, true) + + testCases := []struct { + malleateFn func(*VoteMessage) + expErr string + }{ + {func(_ *VoteMessage) {}, ""}, + {func(msg *VoteMessage) { msg.Vote.ValidatorIndex = -1 }, "negative ValidatorIndex"}, + // INVALID, but passes ValidateBasic, since the method does not know the number of active validators + {func(msg *VoteMessage) { msg.Vote.ValidatorIndex = 1000 }, ""}, + } + + for i, tc := range testCases { + t.Run(fmt.Sprintf("#%d", i), func(t *testing.T) { + msg := &VoteMessage{vote} + + tc.malleateFn(msg) + err := msg.ValidateBasic() + if tc.expErr != "" && assert.Error(t, err) { //nolint:testifylint // require.Error doesn't work with the conditional here + assert.Contains(t, err.Error(), tc.expErr) + } + }) + } +} diff --git a/consensus/replay.go b/consensus/replay.go index c210458cf4c..64888564314 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -404,7 +404,8 @@ func (h *Handshaker) ReplayBlocksWithContext( var err error // Now either store is equal to state, or one ahead. // For each, consider all cases of where the app could be, given app <= store - if storeBlockHeight == stateBlockHeight { + switch storeBlockHeight { + case stateBlockHeight: // CometBFT ran Commit and saved the state. // Either the app is asking for replay, or we're all synced up. if appBlockHeight < storeBlockHeight { @@ -417,7 +418,7 @@ func (h *Handshaker) ReplayBlocksWithContext( return appHash, nil } - } else if storeBlockHeight == stateBlockHeight+1 { + case stateBlockHeight + 1: // We saved the block in the store but haven't updated the state, // so we'll need to replay a block using the WAL. switch { diff --git a/consensus/replay_test.go b/consensus/replay_test.go index 021ff87c775..e2ccc93a5c8 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -901,7 +901,10 @@ func makeBlocks(n int, state sm.State, privVals []types.PrivValidator) ([]*types if err != nil { return nil, err } - block := state.MakeBlock(height, test.MakeNTxs(height, 10), lastCommit, nil, state.LastValidators.Proposer.Address) + block, err := state.MakeBlock(height, test.MakeNTxs(height, 10), lastCommit, nil, state.LastValidators.Proposer.Address) + if err != nil { + return nil, err + } blocks[i] = block state.LastBlockID = blockID state.LastBlockHeight = height diff --git a/consensus/state.go b/consensus/state.go index 51ed4c3a0d1..e4fd033f66f 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -209,7 +209,7 @@ func NewState( // SetLogger implements Service. func (cs *State) SetLogger(l log.Logger) { - cs.BaseService.Logger = l + cs.Logger = l cs.timeoutTicker.SetLogger(l) } @@ -265,7 +265,7 @@ func (cs *State) GetStateWithTimeout(timeout time.Duration) (sm.State, error) { func (cs *State) GetLastHeight() int64 { cs.mtx.RLock() defer cs.mtx.RUnlock() - return cs.RoundState.Height - 1 + return cs.Height - 1 } // GetRoundState returns a shallow copy of the internal consensus state. @@ -287,7 +287,7 @@ func (cs *State) GetRoundStateJSON() ([]byte, error) { func (cs *State) GetRoundStateSimpleJSON() ([]byte, error) { cs.mtx.RLock() defer cs.mtx.RUnlock() - return cmtjson.Marshal(cs.RoundState.RoundStateSimple()) + return cmtjson.Marshal(cs.RoundStateSimple()) } // GetValidators returns a copy of the current validators. @@ -1021,6 +1021,7 @@ func (cs *State) handleTimeout(ti timeoutInfo, rs cstypes.RoundState) { cs.Logger.Error("failed publishing timeout wait", "err", err) } + cs.emitPrecommitTimeoutMetrics(ti.Round) cs.enterPrecommit(ti.Height, ti.Round) cs.enterNewRound(ti.Height, ti.Round+1) @@ -1730,6 +1731,8 @@ func (cs *State) finalizeCommit(height int64) { panic(fmt.Errorf("+2/3 committed an invalid block: %w", err)) } + cs.calculatePrecommitMessageDelayMetrics() + logger.Info( "finalizing commit of block", "hash", log.NewLazyBlockHash(block), @@ -1905,8 +1908,8 @@ func (cs *State) recordMetrics(height int64, block *types.Block) { } } - cs.metrics.NumTxs.Set(float64(len(block.Data.Txs))) - cs.metrics.TotalTxs.Add(float64(len(block.Data.Txs))) + cs.metrics.NumTxs.Set(float64(len(block.Txs))) + cs.metrics.TotalTxs.Add(float64(len(block.Txs))) cs.metrics.BlockSizeBytes.Set(float64(block.Size())) cs.metrics.ChainSizeBytes.Add(float64(block.Size())) cs.metrics.CommittedHeight.Set(float64(block.Height)) @@ -2209,6 +2212,14 @@ func (cs *State) addVote(vote *types.Vote, peerID p2p.ID) (added bool, err error // Here, we verify the signature of the vote extension included in the vote // message. _, val := cs.state.Validators.GetByIndex(vote.ValidatorIndex) + if val == nil { // TODO: we should disconnect from this malicious peer + valsCount := cs.state.Validators.Size() + cs.Logger.Info("Peer sent us vote with invalid ValidatorIndex", + "peer", peerID, + "validator_index", vote.ValidatorIndex, + "len_validators", valsCount) + return added, ErrInvalidVote{Reason: fmt.Sprintf("ValidatorIndex %d is out of bounds [0, %d)", vote.ValidatorIndex, valsCount)} + } if err := vote.VerifyExtension(cs.state.ChainID, val.PubKey); err != nil { return false, err } @@ -2520,6 +2531,61 @@ func (cs *State) checkDoubleSigningRisk(height int64) error { return nil } +// emitPrecommitTimeoutMetrics calculates and emits metrics for votes collected +// during the TimeoutCommit period. +func (cs *State) emitPrecommitTimeoutMetrics(round int32) { + // Count votes and accumulate voting power from LastCommit + // (these are the votes collected during TimeoutCommit for the previous height) + totalVotesCollected := 0 + totalVotingPowerCollected := int64(0) + + for _, vote := range cs.Votes.Precommits(round).List() { + totalVotesCollected++ + _, val := cs.Validators.GetByAddress(vote.ValidatorAddress) + if val != nil { + totalVotingPowerCollected += val.VotingPower + } + } + + // Calculate stake percentage of votes collected during TimeoutCommit + totalPossibleVotingPower := cs.Validators.TotalVotingPower() + var stakePercentage float64 + if totalPossibleVotingPower > 0 { + stakePercentage = float64(totalVotingPowerCollected) / float64(totalPossibleVotingPower) + } + + // Emit metrics showing what was collected during TimeoutCommit + cs.metrics.PrecommitsCounted.Set(float64(totalVotesCollected)) + cs.metrics.PrecommitsStakingPercentage.Set(stakePercentage) + + cs.Logger.Debug("emitted post-quorum precommit metrics", + "votes_collected", totalVotesCollected, + "stake_percentage", stakePercentage) +} + +func (cs *State) calculatePrecommitMessageDelayMetrics() { + if cs.Proposal == nil { + return + } + + ps := cs.Votes.Precommits(cs.Round) + pl := ps.List() + + sort.Slice(pl, func(i, j int) bool { + return pl[i].Timestamp.Before(pl[j].Timestamp) + }) + + var votingPowerSeen int64 + for _, v := range pl { + _, val := cs.Validators.GetByAddress(v.ValidatorAddress) + votingPowerSeen += val.VotingPower + if votingPowerSeen >= cs.Validators.TotalVotingPower()*2/3+1 { + cs.metrics.QuorumPrecommitDelay.With("proposer_address", cs.Validators.GetProposer().Address.String()).Set(v.Timestamp.Sub(cs.Proposal.Timestamp).Seconds()) + break + } + } +} + func (cs *State) calculatePrevoteMessageDelayMetrics() { if cs.Proposal == nil { return diff --git a/consensus/state_test.go b/consensus/state_test.go index 66169bb3b3d..eb2749827f3 100644 --- a/consensus/state_test.go +++ b/consensus/state_test.go @@ -1738,7 +1738,7 @@ func TestPrepareProposalReceivesVoteExtensions(t *testing.T) { } extSignBytes, err := protoio.MarshalDelimited(&cve) require.NoError(t, err) - pubKey, err := vss[i].PrivValidator.GetPubKey() + pubKey, err := vss[i].GetPubKey() require.NoError(t, err) require.True(t, pubKey.VerifySignature(extSignBytes, vote.ExtensionSignature)) } @@ -1938,6 +1938,38 @@ func TestVoteExtensionEnableHeight(t *testing.T) { } } +// TestStateDoesntCrashOnInvalidVote tests that the state does not crash when +// receiving an invalid vote. In particular, one with the incorrect +// ValidatorIndex. +func TestStateDoesntCrashOnInvalidVote(t *testing.T) { + cs, vss := randState(2) + height, round := cs.Height, cs.Round + // create dummy peer + peer := p2pmock.NewPeer(nil) + + startTestRound(cs, height, round) + + _, propBlock := decideProposal(context.Background(), t, cs, vss[0], height, round) + propBlockParts, err := propBlock.MakePartSet(types.BlockPartSizeBytes) + assert.NoError(t, err) + + vote := signVote(vss[1], cmtproto.PrecommitType, propBlock.Hash(), propBlockParts.Header(), true) + + // Non-existent validator index + vote.ValidatorIndex = int32(len(vss)) + + voteMessage := &VoteMessage{vote} + assert.NotPanics(t, func() { + cs.handleMsg(msgInfo{voteMessage, peer.ID()}) + }) + + added, err := cs.AddVote(vote, peer.ID()) + assert.False(t, added) + assert.NoError(t, err) + // TODO: uncomment once we punish peer and return an error + // assert.Equal(t, ErrInvalidVote{Reason: "ValidatorIndex 2 is out of bounds [0, 2)"}, err) +} + // 4 vals, 3 Nil Precommits at P0 // What we want: // P0 waits for timeoutPrecommit before starting next round @@ -2564,13 +2596,14 @@ func findBlockSizeLimit(t *testing.T, height, maxBytes int64, cs *State, partSiz } softMaxDataBytes := int(types.MaxDataBytes(maxBytes, 0, 0)) for i := softMaxDataBytes; i < softMaxDataBytes*2; i++ { - propBlock := cs.state.MakeBlock( + propBlock, err := cs.state.MakeBlock( height, []types.Tx{[]byte("a=" + strings.Repeat("o", i-2))}, &types.Commit{}, nil, cs.privValidatorPubKey.Address(), ) + require.NoError(t, err) propBlockParts, err := propBlock.MakePartSet(partSize) require.NoError(t, err) diff --git a/consensus/wal.go b/consensus/wal.go index 2a17da1d441..8dbb6806e68 100644 --- a/consensus/wal.go +++ b/consensus/wal.go @@ -117,7 +117,7 @@ func (wal *BaseWAL) Group() *auto.Group { } func (wal *BaseWAL) SetLogger(l log.Logger) { - wal.BaseService.Logger = l + wal.Logger = l wal.group.SetLogger(l) } diff --git a/crypto/secp256k1/secp256k1.go b/crypto/secp256k1/secp256k1.go index 51d462c0bed..fdf5727c722 100644 --- a/crypto/secp256k1/secp256k1.go +++ b/crypto/secp256k1/secp256k1.go @@ -8,9 +8,9 @@ import ( "io" "math/big" - secp256k1 "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcec/v2/ecdsa" - "golang.org/x/crypto/ripemd160" //nolint: staticcheck // necessary for Bitcoin address format + "github.com/decred/dcrd/dcrec/secp256k1/v4" + "github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa" + "golang.org/x/crypto/ripemd160" //nolint: gosec,staticcheck // necessary for Bitcoin address format "github.com/cometbft/cometbft/crypto" cmtjson "github.com/cometbft/cometbft/libs/json" @@ -43,9 +43,9 @@ func (privKey PrivKey) Bytes() []byte { // PubKey performs the point-scalar multiplication from the privKey on the // generator point to get the pubkey. func (privKey PrivKey) PubKey() crypto.PubKey { - _, pubkeyObject := secp256k1.PrivKeyFromBytes(privKey) + secpPrivKey := secp256k1.PrivKeyFromBytes(privKey) - pk := pubkeyObject.SerializeCompressed() + pk := secpPrivKey.PubKey().SerializeCompressed() return PubKey(pk) } @@ -126,7 +126,7 @@ func GenPrivKeySecp256k1(secret []byte) PrivKey { // Sign creates an ECDSA signature on curve Secp256k1, using SHA256 on the msg. // The returned signature will be of the form R || S (in lower-S form). func (privKey PrivKey) Sign(msg []byte) ([]byte, error) { - priv, _ := secp256k1.PrivKeyFromBytes(privKey) + priv := secp256k1.PrivKeyFromBytes(privKey) sum := sha256.Sum256(msg) sig := ecdsa.SignCompact(priv, sum[:], false) @@ -199,7 +199,7 @@ func (pubKey PubKey) VerifySignature(msg []byte, sigStr []byte) bool { // parse the signature: signature := signatureFromBytes(sigStr) - // Reject malleable signatures. libsecp256k1 does this check but btcec doesn't. + // Reject malleable signatures. libsecp256k1 does this check but decred doesn't. // see: https://github.com/ethereum/go-ethereum/blob/f9401ae011ddf7f8d2d95020b7446c17f8d98dc1/crypto/signature_nocgo.go#L90-L93 // Serialize() would negate S value if it is over half order. // Hence, if the signature is different after Serialize() if should be rejected. diff --git a/crypto/secp256k1/secp256k1_internal_test.go b/crypto/secp256k1/secp256k1_internal_test.go index ae1f55e4926..c2f77412d6b 100644 --- a/crypto/secp256k1/secp256k1_internal_test.go +++ b/crypto/secp256k1/secp256k1_internal_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - secp256k1 "github.com/btcsuite/btcd/btcec/v2" + "github.com/decred/dcrd/dcrec/secp256k1/v4" ) func Test_genPrivKey(t *testing.T) { diff --git a/crypto/secp256k1/secp256k1_test.go b/crypto/secp256k1/secp256k1_test.go index 195d9dde709..18de0d29682 100644 --- a/crypto/secp256k1/secp256k1_test.go +++ b/crypto/secp256k1/secp256k1_test.go @@ -6,13 +6,12 @@ import ( "testing" "github.com/btcsuite/btcd/btcutil/base58" + underlyingsecp256k1 "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/crypto/secp256k1" - - underlyingSecp256k1 "github.com/btcsuite/btcd/btcec/v2" ) type keyData struct { @@ -75,7 +74,7 @@ func TestSecp256k1LoadPrivkeyAndSerializeIsIdentity(t *testing.T) { // This function creates a private and public key in the underlying libraries format. // The private key is basically calling new(big.Int).SetBytes(pk), which removes leading zero bytes - priv, _ := underlyingSecp256k1.PrivKeyFromBytes(privKeyBytes[:]) + priv := underlyingsecp256k1.PrivKeyFromBytes(privKeyBytes[:]) // this takes the bytes returned by `(big int).Bytes()`, and if the length is less than 32 bytes, // pads the bytes from the left with zero bytes. Therefore these two functions composed // result in the identity function on privKeyBytes, hence the following equality check @@ -87,7 +86,7 @@ func TestSecp256k1LoadPrivkeyAndSerializeIsIdentity(t *testing.T) { func TestGenPrivKeySecp256k1(t *testing.T) { // curve oder N - N := underlyingSecp256k1.S256().N + N := underlyingsecp256k1.S256().N tests := []struct { name string secret []byte diff --git a/docs/core/configuration.md b/docs/core/configuration.md index 8f5c6e04f90..6996e9ba51d 100644 --- a/docs/core/configuration.md +++ b/docs/core/configuration.md @@ -388,6 +388,9 @@ chunk_request_timeout = "10s" # The number of concurrent chunk fetchers to run (default: 1). chunk_fetchers = "4" +# Maximum number of chunks allowed in a snapshot (default: 100000). +max_snapshot_chunks = 100000 + ####################################################### ### Block Sync Configuration Options ### ####################################################### diff --git a/docs/explanation/core/metrics.md b/docs/explanation/core/metrics.md new file mode 100644 index 00000000000..90bc8a867d3 --- /dev/null +++ b/docs/explanation/core/metrics.md @@ -0,0 +1,92 @@ +--- +order: 5 +--- + +# Metrics + +CometBFT can report and serve the Prometheus metrics, which in their turn can +be consumed by Prometheus collector(s). + +This functionality is disabled by default. + +To enable the Prometheus metrics, set `instrumentation.prometheus=true` in your +config file. Metrics will be served under `/metrics` on 26660 port by default. +Listen address can be changed in the config file (see +`instrumentation.prometheus\_listen\_addr`). + +## List of available metrics + +The following metrics are available: + +| **Name** | **Type** | **Tags** | **Description** | +| ------------------------------------------------------- | --------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------- | +| abci\_connection\_method\_timing\_seconds | Histogram | method, type | Timings for each of the ABCI methods | +| blocksync\_syncing | Gauge | | Either 0 (not block syncing) or 1 (syncing) | +| consensus\_height | Gauge | | Height of the chain | +| consensus\_validators | Gauge | | Number of validators | +| consensus\_validators\_power | Gauge | validator\_address | Total voting power of all validators | +| consensus\_validator\_power | Gauge | validator\_address | Voting power of the node if in the validator set | +| consensus\_validator\_last\_signed\_height | Gauge | validator\_address | Last height the node signed a block, if the node is a validator | +| consensus\_validator\_missed\_blocks | Gauge | | Total amount of blocks missed for the node, if the node is a validator | +| consensus\_missing\_validators | Gauge | | Number of validators who did not sign | +| consensus\_missing\_validators\_power | Gauge | | Total voting power of the missing validators | +| consensus\_byzantine\_validators | Gauge | | Number of validators who tried to double sign | +| consensus\_byzantine\_validators\_power | Gauge | | Total voting power of the byzantine validators | +| consensus\_block\_interval\_seconds | Histogram | | Time between this and last block (Block.Header.Time) in seconds | +| consensus\_rounds | Gauge | | Number of rounds | +| consensus\_num\_txs | Gauge | | Number of transactions | +| consensus\_total\_txs | Gauge | | Total number of transactions committed | +| consensus\_block\_parts | Counter | peer\_id | Number of blockparts transmitted by peer | +| consensus\_latest\_block\_height | Gauge | | /status sync\_info number | +| consensus\_block\_size\_bytes | Gauge | | Block size in bytes | +| consensus\_step\_duration\_seconds | Histogram | step | Histogram of durations for each step in the consensus protocol | +| consensus\_round\_duration\_seconds | Histogram | | Histogram of durations for all the rounds that have occurred since the process started | +| consensus\_block\_gossip\_parts\_received | Counter | matches\_current | Number of block parts received by the node | +| consensus\_quorum\_prevote\_delay | Gauge | proposer\_address | Interval in seconds between the proposal timestamp and the timestamp of the earliest prevote that achieved a quorum | +| consensus\_full\_prevote\_delay | Gauge | proposer\_address | Interval in seconds between the proposal timestamp and the timestamp of the latest prevote in a round where all validators voted | +| consensus\_vote\_extension\_receive\_count | Counter | status | Number of vote extensions received | +| consensus\_proposal\_receive\_count | Counter | status | Total number of proposals received by the node since process start | +| consensus\_proposal\_create\_count | Counter | | Total number of proposals created by the node since process start | +| consensus\_round\_voting\_power\_percent | Gauge | vote\_type | A value between 0 and 1.0 representing the percentage of the total voting power per vote type received within a round | +| consensus\_late\_votes | Counter | vote\_type | Number of votes received by the node since process start that correspond to earlier heights and rounds than this node is currently in. | +| consensus\_duplicate\_vote | Counter | | Number of times we received a duplicate vote. | +| consensus\_duplicate\_block\_part | Counter | | Number of times we received a duplicate block part. | +| consensus\_proposal\_timestamp\_difference | Histogram | is\_timely | Difference between the timestamp in the proposal message and the local time of the validator at the time it received the message. | +| p2p\_message\_send\_bytes\_total | Counter | message\_type | Number of bytes sent to all peers per message type | +| p2p\_message\_receive\_bytes\_total | Counter | message\_type | Number of bytes received from all peers per message type | +| p2p\_peers | Gauge | | Number of peers node's connected to | +| p2p\_peer\_pending\_send\_bytes | Gauge | peer\_id | Number of pending bytes to be sent to a given peer | +| p2p\_recv\_rate\_limiter\_delay | Counter | peer\_id | Time in seconds spent sleeping by the receive rate limiter, in seconds. | +| p2p\_send\_rate\_limiter\_delay | Counter | peer\_id | Time in seconds spent sleeping by the send rate limiter, in seconds. | +| mempool\_size | Gauge | | Number of uncommitted transactions in the mempool | +| mempool\_size\_bytes | Gauge | | Total size of the mempool in bytes | +| mempool\_tx\_size\_bytes | Histogram | | Histogram of transaction sizes in bytes | +| mempool\_evicted\_txs | Counter | | Number of transactions that make it into the mempool and were later evicted for being invalid | +| mempool\_failed\_txs | Counter | | Number of transactions that failed to make it into the mempool for being invalid | +| mempool\_rejected\_txs | Counter | | Number of transactions that failed to make it into the mempool due to resource limits | +| mempool\_recheck\_times | Counter | | Number of times transactions are rechecked in the mempool | +| mempool\_already\_received\_txs | Counter | | Number of times transactions were received more than once | +| mempool\_active\_outbound\_connections | Gauge | | Number of connections being actively used for gossiping transaction (experimental) | +| mempool\_recheck\_duration\_seconds | Gauge | | Cumulative time spent rechecking transactions | +| state\_consensus\_param\_updates | Counter | | Number of consensus parameter updates returned by the application since process start | +| state\_validator\_set\_updates | Counter | | Number of validator set updates returned by the application since process start | +| state\_pruning\_service\_block\_retain\_height | Gauge | | Accepted block retain height set by the data companion | +| state\_pruning\_service\_block\_results\_retain\_height | Gauge | | Accepted block results retain height set by the data companion | +| state\_pruning\_service\_tx\_indexer\_retain\_height | Gauge | | Accepted transactions indices retain height set by the data companion | +| state\_pruning\_service\_block\_indexer\_retain\_height | Gauge | | Accepted blocks indices retain height set by the data companion | +| state\_application\_block\_retain\_height | Gauge | | Accepted block retain height set by the application | +| state\_block\_store\_base\_height | Gauge | | First height at which a block is available | +| state\_abciresults\_base\_height | Gauge | | First height at which ABCI results are available | +| state\_tx\_indexer\_base\_height | Gauge | | First height at which tx indices are available | +| state\_block\_indexer\_base\_height | Gauge | | First height at which block indices are available | +| state\_store\_access\_duration\_seconds | Histogram | method | Duration of accesses to the state store labeled by which method was called on the store | +| state\_fire\_block\_events\_delay\_seconds | Gauge | | Duration of event firing related to a new block | +| statesync\_syncing | Gauge | | Either 0 (not state syncing) or 1 (syncing) | + +## Useful queries + +Percentage of missing + byzantine validators: + +```md +((consensus\_byzantine\_validators\_power + consensus\_missing\_validators\_power) / consensus\_validators\_power) * 100 +``` diff --git a/docs/guides/go-built-in.md b/docs/guides/go-built-in.md index b545a06ad4a..d07618fdfb1 100644 --- a/docs/guides/go-built-in.md +++ b/docs/guides/go-built-in.md @@ -46,7 +46,7 @@ Verify that you have the latest version of Go installed (refer to the [official ```bash $ go version -go version go1.21.1 darwin/amd64 +go version go1.22.11 darwin/amd64 ``` ## 1.2 Creating a new Go project @@ -94,7 +94,7 @@ The go.mod file should look similar to: ```go module kvstore -go 1.21.1 +go 1.22 require ( github.com/cometbft/cometbft v0.38.0 diff --git a/docs/guides/go.md b/docs/guides/go.md index 0e5cdc79873..5da93607046 100644 --- a/docs/guides/go.md +++ b/docs/guides/go.md @@ -46,7 +46,7 @@ Verify that you have the latest version of Go installed (refer to the [official ```bash $ go version -go version go1.21.1 darwin/amd64 +go version go1.22.11 darwin/amd64 ``` ## 1.2 Creating a new Go project @@ -94,7 +94,7 @@ The go.mod file should look similar to: ```go module kvstore -go 1.21.1 +go 1.22 require ( github.com/cometbft/cometbft v0.38.0 diff --git a/evidence/mocks/block_store.go b/evidence/mocks/block_store.go index 566fdcec8c4..05ed2d1d42e 100644 --- a/evidence/mocks/block_store.go +++ b/evidence/mocks/block_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -12,10 +12,14 @@ type BlockStore struct { mock.Mock } -// Height provides a mock function with given fields: +// Height provides a mock function with no fields func (_m *BlockStore) Height() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Height") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -30,6 +34,10 @@ func (_m *BlockStore) Height() int64 { func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlockCommit") + } + var r0 *types.Commit if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { r0 = rf(height) @@ -46,6 +54,10 @@ func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlockMeta") + } + var r0 *types.BlockMeta if rf, ok := ret.Get(0).(func(int64) *types.BlockMeta); ok { r0 = rf(height) @@ -58,13 +70,12 @@ func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { return r0 } -type mockConstructorTestingTNewBlockStore interface { +// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewBlockStore(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlockStore(t mockConstructorTestingTNewBlockStore) *BlockStore { +}) *BlockStore { mock := &BlockStore{} mock.Mock.Test(t) diff --git a/evidence/pool_test.go b/evidence/pool_test.go index 2b8a8e886ad..425965d1152 100644 --- a/evidence/pool_test.go +++ b/evidence/pool_test.go @@ -413,9 +413,12 @@ func initializeBlockStore(db dbm.DB, state sm.State, valAddr []byte) (*store.Blo for i := int64(1); i <= state.LastBlockHeight; i++ { lastCommit := makeExtCommit(i-1, valAddr) - block := state.MakeBlock(i, test.MakeNTxs(i, 1), lastCommit.ToCommit(), nil, state.Validators.Proposer.Address) - block.Header.Time = defaultEvidenceTime.Add(time.Duration(i) * time.Minute) - block.Header.Version = cmtversion.Consensus{Block: version.BlockProtocol, App: 1} + block, err := state.MakeBlock(i, test.MakeNTxs(i, 1), lastCommit.ToCommit(), nil, state.Validators.Proposer.Address) + if err != nil { + return nil, err + } + block.Time = defaultEvidenceTime.Add(time.Duration(i) * time.Minute) + block.Version = cmtversion.Consensus{Block: version.BlockProtocol, App: 1} partSet, err := block.MakePartSet(types.BlockPartSizeBytes) if err != nil { return nil, err diff --git a/evidence/verify_test.go b/evidence/verify_test.go index 57c3c4f8b8c..81a0001d607 100644 --- a/evidence/verify_test.go +++ b/evidence/verify_test.go @@ -155,8 +155,8 @@ func TestVerify_ForwardLunaticAttack(t *testing.T) { } // modify trusted light block so that it is of a height less than the conflicting one - trusted.Header.Height = state.LastBlockHeight - trusted.Header.Time = state.LastBlockTime + trusted.Height = state.LastBlockHeight + trusted.Time = state.LastBlockTime stateStore := &smmocks.Store{} stateStore.On("LoadValidators", commonHeight).Return(common.ValidatorSet, nil) @@ -245,12 +245,12 @@ func TestVerifyLightClientAttack_Equivocation(t *testing.T) { // conflicting header has different next validators hash which should have been correctly derived from // the previous round - ev.ConflictingBlock.Header.NextValidatorsHash = crypto.CRandBytes(tmhash.Size) + ev.ConflictingBlock.NextValidatorsHash = crypto.CRandBytes(tmhash.Size) err = evidence.VerifyLightClientAttack(ev, trustedSignedHeader, trustedSignedHeader, nil, defaultEvidenceTime.Add(1*time.Minute), 2*time.Hour) assert.Error(t, err) // revert next validators hash - ev.ConflictingBlock.Header.NextValidatorsHash = trustedHeader.NextValidatorsHash + ev.ConflictingBlock.NextValidatorsHash = trustedHeader.NextValidatorsHash state := sm.State{ LastBlockTime: defaultEvidenceTime.Add(1 * time.Minute), diff --git a/go.mod b/go.mod index 87a65eeb548..145c75b64ce 100644 --- a/go.mod +++ b/go.mod @@ -1,98 +1,63 @@ module github.com/cometbft/cometbft -go 1.21 - -toolchain go1.22.6 +go 1.22.11 require ( github.com/BurntSushi/toml v1.4.0 - github.com/adlio/schema v1.3.3 + github.com/Masterminds/semver/v3 v3.3.1 + github.com/adlio/schema v1.3.6 + github.com/btcsuite/btcd/btcutil v1.1.6 github.com/cenkalti/backoff v2.2.1+incompatible // indirect + github.com/cometbft/cometbft-db v0.14.1 + github.com/cosmos/gogoproto v1.7.0 + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 github.com/fortytw2/leaktest v1.3.0 - github.com/go-kit/kit v0.12.0 + github.com/go-git/go-git/v5 v5.13.2 + github.com/go-kit/kit v0.13.0 github.com/go-kit/log v0.2.1 github.com/go-logfmt/logfmt v0.6.0 + github.com/gofrs/uuid v4.4.0+incompatible github.com/golang/protobuf v1.5.4 - github.com/golangci/golangci-lint v1.52.0 github.com/google/orderedcode v0.0.1 + github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 + github.com/hashicorp/golang-lru/v2 v2.0.7 github.com/informalsystems/tm-load-test v1.3.0 - github.com/lib/pq v1.10.7 - github.com/minio/highwayhash v1.0.2 + github.com/lib/pq v1.10.9 + github.com/minio/highwayhash v1.0.3 + github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae github.com/ory/dockertest v3.3.5+incompatible github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.20.1 + github.com/prometheus/client_golang v1.21.0 github.com/prometheus/client_model v0.6.1 - github.com/prometheus/common v0.55.0 + github.com/prometheus/common v0.62.0 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 github.com/rs/cors v1.11.1 - github.com/sasha-s/go-deadlock v0.3.1 + github.com/sasha-s/go-deadlock v0.3.5 github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa - github.com/spf13/cobra v1.8.1 + github.com/spf13/cobra v1.9.1 github.com/spf13/viper v1.19.0 - github.com/stretchr/testify v1.9.0 - golang.org/x/crypto v0.26.0 - golang.org/x/net v0.28.0 - google.golang.org/grpc v1.62.1 -) - -require ( - github.com/bufbuild/buf v1.15.1 + github.com/stretchr/testify v1.10.0 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 + golang.org/x/crypto v0.33.0 + golang.org/x/net v0.35.0 + golang.org/x/sync v0.11.0 + gonum.org/v1/gonum v0.15.1 + google.golang.org/grpc v1.70.0 + google.golang.org/protobuf v1.36.5 ) -require ( - github.com/Masterminds/semver/v3 v3.3.0 - github.com/btcsuite/btcd/btcec/v2 v2.3.4 - github.com/btcsuite/btcd/btcutil v1.1.6 - github.com/cometbft/cometbft-db v0.11.0 - github.com/cosmos/gogoproto v1.7.0 - github.com/go-git/go-git/v5 v5.11.0 - github.com/gofrs/uuid v4.4.0+incompatible - github.com/google/uuid v1.6.0 - github.com/hashicorp/golang-lru/v2 v2.0.7 - github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae - github.com/sirupsen/logrus v1.9.0 - github.com/vektra/mockery/v2 v2.23.1 - golang.org/x/sync v0.8.0 - gonum.org/v1/gonum v0.12.0 - google.golang.org/protobuf v1.34.2 -) +require github.com/sirupsen/logrus v1.9.0 require ( - 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect - 4d63.com/gochecknoglobals v0.2.1 // indirect dario.cat/mergo v1.0.0 // indirect - github.com/Abirdcfly/dupword v0.0.11 // indirect - github.com/Antonboom/errname v0.1.9 // indirect - github.com/Antonboom/nilnil v0.1.3 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/DataDog/zstd v1.4.5 // indirect - github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect - github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect - github.com/Masterminds/semver v1.5.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect - github.com/OpenPeeDeeP/depguard v1.1.1 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect - github.com/alexkohler/prealloc v1.0.0 // indirect - github.com/alingse/asasalint v0.0.11 // indirect - github.com/ashanbrown/forbidigo v1.5.1 // indirect - github.com/ashanbrown/makezero v1.1.1 // indirect + github.com/ProtonMail/go-crypto v1.1.5 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bkielbasa/cyclop v1.2.0 // indirect - github.com/blizzy78/varnamelen v0.8.0 // indirect - github.com/bombsimon/wsl/v3 v3.4.0 // indirect - github.com/breml/bidichk v0.2.4 // indirect - github.com/breml/errchkjson v0.3.1 // indirect - github.com/bufbuild/connect-go v1.5.2 // indirect - github.com/bufbuild/protocompile v0.5.1 // indirect - github.com/butuzov/ireturn v0.1.1 // indirect - github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/charithe/durationcheck v0.0.10 // indirect - github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect - github.com/chigopher/pathlib v0.12.0 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect @@ -101,212 +66,79 @@ require ( github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/containerd/continuity v0.3.0 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect - github.com/curioswitch/go-reassign v0.2.0 // indirect - github.com/cyphar/filepath-securejoin v0.2.4 // indirect - github.com/daixiang0/gci v0.10.1 // indirect + github.com/cyphar/filepath-securejoin v0.3.6 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect - github.com/denis-tingaikin/go-header v0.4.3 // indirect - github.com/dgraph-io/badger/v2 v2.2007.4 // indirect + github.com/dgraph-io/badger/v4 v4.2.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect - github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/docker/cli v23.0.1+incompatible // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v23.0.1+incompatible // indirect - github.com/docker/docker-credential-helpers v0.7.0 // indirect + github.com/docker/cli v24.0.7+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/esimonov/ifshort v1.0.4 // indirect - github.com/ettle/strcase v0.1.1 // indirect - github.com/fatih/color v1.15.0 // indirect - github.com/fatih/structtag v1.2.0 // indirect - github.com/felixge/fgprof v0.9.3 // indirect - github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/fzipp/gocyclo v0.6.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect - github.com/go-chi/chi/v5 v5.0.8 // indirect - github.com/go-critic/go-critic v0.7.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-toolsmith/astcast v1.1.0 // indirect - github.com/go-toolsmith/astcopy v1.1.0 // indirect - github.com/go-toolsmith/astequal v1.1.0 // indirect - github.com/go-toolsmith/astfmt v1.1.0 // indirect - github.com/go-toolsmith/astp v1.1.0 // indirect - github.com/go-toolsmith/strparse v1.1.0 // indirect - github.com/go-toolsmith/typep v1.1.0 // indirect - github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect - github.com/gobwas/glob v0.2.3 // indirect - github.com/gofrs/flock v0.8.1 // indirect - github.com/gofrs/uuid/v5 v5.0.0 // indirect + github.com/go-git/go-billy/v5 v5.6.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.2.0 // indirect + github.com/golang/glog v1.2.3 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect - github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect - github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect - github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 // indirect - github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect - github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect - github.com/golangci/misspell v0.4.0 // indirect - github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect - github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect - github.com/google/btree v1.1.2 // indirect + github.com/google/btree v1.1.3 // indirect + github.com/google/flatbuffers v1.12.1 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/go-containerregistry v0.13.0 // indirect - github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 // indirect - github.com/gordonklaus/ineffassign v0.0.0-20230107090616-13ace0543b28 // indirect - github.com/gostaticanalysis/analysisutil v0.7.1 // indirect - github.com/gostaticanalysis/comment v1.4.2 // indirect - github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect - github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hexops/gotextdiff v1.0.3 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 // indirect - github.com/jgautheron/goconst v1.5.1 // indirect - github.com/jingyugao/rowserrcheck v1.1.1 // indirect - github.com/jinzhu/copier v0.3.5 // indirect - github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/julz/importas v0.1.0 // indirect - github.com/junk1tm/musttag v0.5.0 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/kisielk/errcheck v1.6.3 // indirect - github.com/kisielk/gotool v1.0.0 // indirect - github.com/kkHAIKE/contextcheck v1.1.4 // indirect - github.com/klauspost/compress v1.17.9 // indirect - github.com/klauspost/pgzip v1.2.5 // indirect + github.com/klauspost/compress v1.17.11 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/kulti/thelper v0.6.3 // indirect - github.com/kunwardeep/paralleltest v1.0.6 // indirect - github.com/kyoh86/exportloopref v0.1.11 // indirect - github.com/ldez/gomoddirectives v0.2.3 // indirect - github.com/ldez/tagliatelle v0.4.0 // indirect - github.com/leonklingele/grouper v1.1.1 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect - github.com/lufeee/execinquery v1.2.1 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect - github.com/maratori/testableexamples v1.0.0 // indirect - github.com/maratori/testpackage v1.1.1 // indirect - github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/mbilski/exhaustivestruct v1.2.0 // indirect - github.com/mgechev/revive v1.3.1 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect - github.com/moricho/tparallel v0.3.0 // indirect - github.com/morikuni/aec v1.0.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/nakabonne/nestif v0.3.1 // indirect - github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect - github.com/nishanths/exhaustive v0.9.5 // indirect - github.com/nishanths/predeclared v0.2.2 // indirect - github.com/nunnatsa/ginkgolinter v0.9.0 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect - github.com/opencontainers/runc v1.1.3 // indirect + github.com/opencontainers/runc v1.1.12 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect - github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect - github.com/pjbgf/sha1cd v0.3.0 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - github.com/pkg/profile v1.7.0 // indirect + github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect + github.com/pjbgf/sha1cd v0.3.2 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/polyfloyd/go-errorlint v1.4.5 // indirect github.com/prometheus/procfs v0.15.1 // indirect - github.com/quasilyte/go-ruleguard v0.4.0 // indirect - github.com/quasilyte/gogrep v0.5.0 // indirect - github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect - github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/rs/zerolog v1.29.0 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/ryancurrah/gomodguard v1.3.0 // indirect - github.com/ryanrolds/sqlclosecheck v0.4.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect - github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect - github.com/sashamelentyev/interfacebloat v1.1.0 // indirect - github.com/sashamelentyev/usestdlibvars v1.23.0 // indirect github.com/satori/go.uuid v1.2.0 // indirect - github.com/securego/gosec/v2 v2.15.0 // indirect - github.com/sergi/go-diff v1.2.0 // indirect - github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect - github.com/sivchari/containedctx v1.0.2 // indirect - github.com/sivchari/nosnakecase v1.7.0 // indirect - github.com/sivchari/tenv v1.7.1 // indirect - github.com/skeema/knownhosts v1.2.1 // indirect - github.com/sonatard/noctx v0.0.2 // indirect + github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect + github.com/skeema/knownhosts v1.3.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect - github.com/sourcegraph/go-diff v0.7.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect - github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect + github.com/spf13/pflag v1.0.6 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect - github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect - github.com/tdakkota/asciicheck v0.2.0 // indirect - github.com/tetafro/godot v1.4.11 // indirect - github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e // indirect - github.com/timonwong/loggercheck v0.9.4 // indirect - github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect - github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect - github.com/ultraware/funlen v0.0.3 // indirect - github.com/ultraware/whitespace v0.0.5 // indirect - github.com/uudashr/gocognit v1.0.6 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/yagipy/maintidx v1.0.0 // indirect - github.com/yeya24/promlinter v0.2.0 // indirect - gitlab.com/bosi/decorder v0.2.3 // indirect - go.etcd.io/bbolt v1.3.10 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.14.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - go.uber.org/atomic v1.10.0 // indirect + go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect + go.opencensus.io v0.24.0 // indirect go.uber.org/multierr v1.10.0 // indirect - go.uber.org/zap v1.24.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/term v0.23.0 // indirect - golang.org/x/text v0.17.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/mod v0.19.0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/text v0.22.0 // indirect + golang.org/x/tools v0.23.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools v2.2.0+incompatible // indirect - honnef.co/go/tools v0.4.3 // indirect - mvdan.cc/gofumpt v0.4.0 // indirect - mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect - mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect - mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d // indirect ) retract ( + // bumped go version in minor release + v0.38.14 // a regression was introduced v0.38.4 // a breaking change was introduced diff --git a/go.sum b/go.sum index 2f633132230..e419a373107 100644 --- a/go.sum +++ b/go.sum @@ -1,125 +1,41 @@ -4d63.com/gocheckcompilerdirectives v1.2.1 h1:AHcMYuw56NPjq/2y615IGg2kYkBdTvOaojYCBcRE7MA= -4d63.com/gocheckcompilerdirectives v1.2.1/go.mod h1:yjDJSxmDTtIHHCqX0ufRYZDL6vQtMG7tJdKVeWwsqvs= -4d63.com/gochecknoglobals v0.2.1 h1:1eiorGsgHOFOuoOiJDy2psSrQbRdIHrlge0IJIkUgDc= -4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Abirdcfly/dupword v0.0.11 h1:z6v8rMETchZXUIuHxYNmlUAuKuB21PeaSymTed16wgU= -github.com/Abirdcfly/dupword v0.0.11/go.mod h1:wH8mVGuf3CP5fsBTkfWwwwKTjDnVVCxtU8d8rgeVYXA= -github.com/Antonboom/errname v0.1.9 h1:BZDX4r3l4TBZxZ2o2LNrlGxSHran4d1u4veZdoORTT4= -github.com/Antonboom/errname v0.1.9/go.mod h1:nLTcJzevREuAsgTbG85UsuiWpMpAqbKD1HNZ29OzE58= -github.com/Antonboom/nilnil v0.1.3 h1:6RTbx3d2mcEu3Zwq9TowQpQMVpP75zugwOtqY1RTtcE= -github.com/Antonboom/nilnil v0.1.3/go.mod h1:iOov/7gRcXkeEU+EMGpBu2ORih3iyVEiWjeste1SJm8= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 h1:+r1rSv4gvYn0wmRjC8X7IAzX8QezqtFV9m0MUHFJgts= -github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= -github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4= +github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard v1.1.1 h1:TSUznLjvp/4IUP+OQ0t/4jF4QUyxIcVX8YnghZdunyA= -github.com/OpenPeeDeeP/depguard v1.1.1/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= -github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= -github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/ProtonMail/go-crypto v1.1.5 h1:eoAQfK2dwL+tFSFpr7TbOaPNUbPiJj4fLYwwGE1FQO4= +github.com/ProtonMail/go-crypto v1.1.5/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= -github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= +github.com/adlio/schema v1.3.6 h1:k1/zc2jNfeiZBA5aFTRy37jlBIuCkXCm0XmvpzCKI9I= +github.com/adlio/schema v1.3.6/go.mod h1:qkxwLgPBd1FgLRHYVCmQT/rrBr3JH38J9LjmVzWNudg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= -github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= -github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= -github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/ashanbrown/forbidigo v1.5.1 h1:WXhzLjOlnuDYPYQo/eFlcFMi8X/kLfvWLYu6CSoebis= -github.com/ashanbrown/forbidigo v1.5.1/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= -github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= -github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bkielbasa/cyclop v1.2.0 h1:7Jmnh0yL2DjKfw28p86YTd/B4lRGcNuu12sKE35sM7A= -github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= -github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= -github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= -github.com/bombsimon/wsl/v3 v3.4.0 h1:RkSxjT3tmlptwfgEgTgU+KYKLI35p/tviNXNXiL2aNU= -github.com/bombsimon/wsl/v3 v3.4.0/go.mod h1:KkIB+TXkqy6MvK9BDZVbZxKNYsE1/oLRJbIFtf14qqo= -github.com/breml/bidichk v0.2.4 h1:i3yedFWWQ7YzjdZJHnPo9d/xURinSq3OM+gyM43K4/8= -github.com/breml/bidichk v0.2.4/go.mod h1:7Zk0kRFt1LIZxtQdl9W9JwGAcLTTkOs+tN7wuEYGJ3s= -github.com/breml/errchkjson v0.3.1 h1:hlIeXuspTyt8Y/UmP5qy1JocGNR00KQHgfaNtRAjoxQ= -github.com/breml/errchkjson v0.3.1/go.mod h1:XroxrzKjdiutFyW3nWhw34VGg7kiMsDQox73yWCGI2U= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A= -github.com/btcsuite/btcd v0.24.2 h1:aLmxPguqxza+4ag8R1I2nnJjSu2iFn/kqtHTIImswcY= github.com/btcsuite/btcd v0.24.2/go.mod h1:5C8ChTkl5ejr3WHj8tkQSCmydiMEPB0ZhQhehpq7Dgg= github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= -github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= -github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= github.com/btcsuite/btcd/btcutil v1.1.5/go.mod h1:PSZZ4UitpLBWzxGd5VGOrLnmOjtPP/a6HaFo12zMs00= @@ -127,7 +43,6 @@ github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/ github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ= github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= @@ -138,39 +53,15 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/bufbuild/buf v1.15.1 h1:v7sK2uMEsGX4Z2hvu+xiMheH3C3AKBGfxPBgdUZYDQ8= -github.com/bufbuild/buf v1.15.1/go.mod h1:TQeGKam1QMfHy/xsSnnMpxN3JK5HBb6aNvZj4m52gkE= -github.com/bufbuild/connect-go v1.5.2 h1:G4EZd5gF1U1ZhhbVJXplbuUnfKpBZ5j5izqIwu2g2W8= -github.com/bufbuild/connect-go v1.5.2/go.mod h1:GmMJYR6orFqD0Y6ZgX8pwQ8j9baizDrIQMm1/a6LnHk= -github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= -github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= -github.com/butuzov/ireturn v0.1.1 h1:QvrO2QF2+/Cx1WA/vETCIYBKtRjc30vesdoPUNo1EbY= -github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= -github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4= -github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= -github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 h1:W9o46d2kbNL06lq7UNDPV0zYLzkrde/bjIqO02eoll0= -github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8/go.mod h1:gakxgyXaaPkxvLw1XQxNGK4I37ys9iBRzNUx/B7pUCo= -github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= -github.com/chigopher/pathlib v0.12.0 h1:1GM7fN/IwXXmOHbd1jkMqHD2wUhYqUvafgxTwmLT/q8= -github.com/chigopher/pathlib v0.12.0/go.mod h1:EJ5UtJ/sK8Nt6q3VWN+EwZLZ3g0afJiG8NegYiQQ/gQ= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= @@ -188,175 +79,91 @@ github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwP github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= -github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= +github.com/cometbft/cometbft-db v0.14.1 h1:SxoamPghqICBAIcGpleHbmoPqy+crij/++eZz3DlerQ= +github.com/cometbft/cometbft-db v0.14.1/go.mod h1:KHP1YghilyGV/xjD5DP3+2hyigWx0WTp9X+0Gnx0RxQ= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= -github.com/containerd/stargz-snapshotter/estargz v0.12.1 h1:+7nYmHJb0tEkcRaAW+MHqoKaJYZmkikupxCqVtmPuY0= -github.com/containerd/stargz-snapshotter/estargz v0.12.1/go.mod h1:12VUuCq3qPq4y8yUW+l5w3+oXV3cx2Po3KSe/SmPGqw= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= -github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= -github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= -github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= -github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/daixiang0/gci v0.10.1 h1:eheNA3ljF6SxnPD/vE4lCBusVHmV3Rs3dkKvFrJ7MR0= -github.com/daixiang0/gci v0.10.1/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= +github.com/cyphar/filepath-securejoin v0.3.6 h1:4d9N5ykBnSp5Xn2JkhocYDkOpURL/18CYMpo6xB9uWM= +github.com/cyphar/filepath-securejoin v0.3.6/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= +github.com/decred/dcrd/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U0x++OzVrdms8= +github.com/decred/dcrd/crypto/blake256 v1.1.0/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU= -github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= github.com/denisenkom/go-mssqldb v0.12.0 h1:VtrkII767ttSPNRfFekePK3sctr+joXgO58stqQbtUA= github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= -github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= -github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= -github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/badger/v4 v4.2.0 h1:kJrlajbXXL9DFTNuhhu9yCx7JJa4qpYWxtE8BzuWsEs= +github.com/dgraph-io/badger/v4 v4.2.0/go.mod h1:qfCqhPoWDFJRx1gp5QwwyGo8xk1lbHUxvK9nK0OGAak= github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= -github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/docker/cli v23.0.1+incompatible h1:LRyWITpGzl2C9e9uGxzisptnxAn1zfZKXy13Ul2Q5oM= -github.com/docker/cli v23.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= -github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= -github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= +github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1xfI36MSkFg= +github.com/docker/cli v24.0.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/docker v24.0.9+incompatible h1:HPGzNmwfLZWdxHqK9/II92pyi1EpYKsAqcl4G0Of9v0= +github.com/docker/docker v24.0.9+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= -github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v1.4.0 h1:4GyuSbFa+s26+3rmYNSuUVsx+HgPrV1bk1jXI0l9wjM= +github.com/elazarl/goproxy v1.4.0/go.mod h1:X/5W/t+gzDyLfHW4DrMdpjqYjpXsURlBt9lpBDxZZZQ= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= -github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= -github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= -github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= -github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= -github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= -github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= -github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= -github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= -github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0= -github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= -github.com/go-critic/go-critic v0.7.0 h1:tqbKzB8pqi0NsRZ+1pyU4aweAF7A7QN0Pi4Q02+rYnQ= -github.com/go-critic/go-critic v0.7.0/go.mod h1:moYzd7GdVXE2C2hYTwd7h0CPcqlUeclsyBRwMa38v64= +github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c= +github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= -github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM= +github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= -github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= -github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= -github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-git/go-git/v5 v5.13.2 h1:7O7xvsK7K+rZPKW6AQR1YyNhfywkv7B8/FsP3ki6Zv0= +github.com/go-git/go-git/v5 v5.13.2/go.mod h1:hWdW5P4YZRjmpGHwRH2v3zkWcNl6HeXaXQEMGb3NJ9A= +github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= +github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= -github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= -github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= -github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= -github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= -github.com/go-toolsmith/astequal v1.1.0 h1:kHKm1AWqClYn15R0K1KKE4RG614D46n+nqUQ06E1dTw= -github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= -github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= -github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= -github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= -github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= -github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= -github.com/go-toolsmith/pkgload v1.2.2/go.mod h1:R2hxLNRKuAsiXCo2i5J6ZQPhnPMOVtU+f0arbFPWCus= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= -github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= -github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= -github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= -github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= -github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= -github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M= -github.com/gofrs/uuid/v5 v5.0.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= @@ -364,26 +171,14 @@ github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2V github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 h1:+eHOFJl1BaXrQxKX+T06f78590z4qA2ZzBTqahsKSE4= github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/glog v1.2.3 h1:oDTdz9f5VGVVNGu/Q7UXKWYsD0873HXLHdJUNBsSEKM= +github.com/golang/glog v1.2.3/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -392,504 +187,188 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6J5HIP8ZtyMdiDscjMLfRBSPuzVVeo= -github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= -github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 h1:amWTbTGqOZ71ruzrdA+Nx5WA3tV1N0goTspwmKCQvBY= -github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2/go.mod h1:9wOXstvyDRshQ9LggQuzBCGysxs3b6Uo/1MvYCR2NMs= -github.com/golangci/golangci-lint v1.52.0 h1:T7w3tuF1goz64qGV+ML4MgysSl/yUfA3UZJK92oE48A= -github.com/golangci/golangci-lint v1.52.0/go.mod h1:wlTh+d/oVlgZC2yCe6nlxrxNAnuhEQC0Zdygoh72Uak= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.4.0 h1:KtVB/hTK4bbL/S6bs64rYyk8adjmh1BygbBiaAiX+a0= -github.com/golangci/misspell v0.4.0/go.mod h1:W6O/bwV6lGDxUCChm2ykw9NQdd5bYd1Xkjo88UcWyJc= -github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 h1:DIPQnGy2Gv2FSA4B/hh8Q7xx3B7AIDk3DAMeHclH1vQ= -github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6/go.mod h1:0AKcRCkMoKvUvlf89F6O7H2LYdhr1zBh736mBItOdRs= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= -github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= +github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.13.0 h1:y1C7Z3e149OJbOPDBxLYR8ITPz8dTKqQwjErKVHJC8k= -github.com/google/go-containerregistry v0.13.0/go.mod h1:J9FQ+eSS4a1aC2GNZxvNpbWhgp0487v+cgiilB4FqDo= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= -github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 h1:CqYfpuYIjnlNxM3msdyPRKabhXZWbKjf3Q8BWROFBso= -github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gordonklaus/ineffassign v0.0.0-20230107090616-13ace0543b28 h1:9alfqbrhuD+9fLZ4iaAVwhlp5PEhmnBt7yvK2Oy5C1U= -github.com/gordonklaus/ineffassign v0.0.0-20230107090616-13ace0543b28/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= -github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= -github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= -github.com/gostaticanalysis/comment v1.4.2 h1:hlnx5+S2fY9Zo9ePo4AhgYsYHbM2+eAv8m/s1JiCd6Q= -github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= -github.com/gostaticanalysis/forcetypeassert v0.1.0 h1:6eUflI3DiGusXGK6X7cCcIgVCpZ2CiZ1Q7jl6ZxNV70= -github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= -github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= -github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= -github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= -github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= -github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/gotestyourself/gotestyourself v2.2.0+incompatible h1:AQwinXlbQR2HvPjQZOmDhRqsv5mZf+Jb1RnSLxcqZcI= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/informalsystems/tm-load-test v1.3.0 h1:FGjKy7vBw6mXNakt+wmNWKggQZRsKkEYpaFk/zR64VA= github.com/informalsystems/tm-load-test v1.3.0/go.mod h1:OQ5AQ9TbT5hKWBNIwsMjn6Bf4O0U4b1kRc+0qZlQJKw= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 h1:2uT3aivO7NVpUPGcQX7RbHijHMyWix/yCnIrCWc+5co= -github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= -github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= -github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= -github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= -github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= -github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= -github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= -github.com/junk1tm/musttag v0.5.0 h1:bV1DTdi38Hi4pG4OVWa7Kap0hi0o7EczuK6wQt9zPOM= -github.com/junk1tm/musttag v0.5.0/go.mod h1:PcR7BA+oREQYvHwgjIDmw3exJeds5JzRcvEJTfjrA0M= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.3 h1:dEKh+GLHcWm2oN34nMvDzn1sqI0i0WxPvrgiJA5JuM8= -github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt0GMb8= -github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= -github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= -github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= -github.com/kunwardeep/paralleltest v1.0.6 h1:FCKYMF1OF2+RveWlABsdnmsvJrei5aoyZoaGS+Ugg8g= -github.com/kunwardeep/paralleltest v1.0.6/go.mod h1:Y0Y0XISdZM5IKm3TREQMZ6iteqn1YuwCsJO/0kL9Zes= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= -github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= -github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA= -github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= -github.com/ldez/tagliatelle v0.4.0 h1:sylp7d9kh6AdXN2DpVGHBRb5guTVAgOxqNGhbqc4b1c= -github.com/ldez/tagliatelle v0.4.0/go.mod h1:mNtTfrHy2haaBAw+VT7IBV6VXBThS7TCreYWbBcJ87I= -github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU= -github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= -github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= -github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= -github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= -github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= -github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= -github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04= -github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc= -github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2srm/LN17lpybq15AryXIRcWYLE= -github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.14.9 h1:10HX2Td0ocZpYEjhilsuo6WWtUqttj2Kb0KtD86/KYA= -github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= -github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/revive v1.3.1 h1:OlQkcH40IB2cGuprTPcjB0iIUddgVZgGmDX3IAMR8D4= -github.com/mgechev/revive v1.3.1/go.mod h1:YlD6TTWl2B8A103R9KWJSPVI9DrEf+oqr15q21Ld+5I= -github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= -github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= +github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/minio/highwayhash v1.0.3 h1:kbnuUMoHYyVl7szWjSxJnxw11k2U709jqFPPmIUyD6Q= +github.com/minio/highwayhash v1.0.3/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/moricho/tparallel v0.3.0 h1:8dDx3S3e+jA+xiQXC7O3dvfRTe/J+FYlTDDW01Y7z/Q= -github.com/moricho/tparallel v0.3.0/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= -github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= -github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6FxaNu/BnU2OAaLF86eTVhP2hjTB6iMvItA= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.9.5 h1:TzssWan6orBiLYVqewCG8faud9qlFntJE30ACpzmGME= -github.com/nishanths/exhaustive v0.9.5/go.mod h1:IbwrGdVMizvDcIxPYGVdQn5BqWJaOwpCvg4RGb8r/TA= -github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= -github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= -github.com/nunnatsa/ginkgolinter v0.9.0 h1:Sm0zX5QfjJzkeCjEp+t6d3Ha0jwvoDjleP9XCsrEzOA= -github.com/nunnatsa/ginkgolinter v0.9.0/go.mod h1:FHaMLURXP7qImeH6bvxWJUpyH+2tuqe5j4rW1gxJRmI= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae h1:FatpGJD2jmJfhZiFDElaC0QhZUDQnxUeAwTGkfAHN3I= github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo/v2 v2.8.0 h1:pAM+oBNPrpXRs+E/8spkeGx9QgekbRVyr74EUvRVOUI= -github.com/onsi/ginkgo/v2 v2.8.0/go.mod h1:6JsQiECmxCa3V5st74AL/AmsV482EDdVrGaVW6z3oYU= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= -github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= -github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= +github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY= github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= -github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= -github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 h1:Dx7Ovyv/SFnMFw3fD4oEoeorXc6saIiQ23LrGLth0Gw= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= -github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4= +github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.7.0 h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA= -github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v1.4.5 h1:70YWmMy4FgRHehGNOUask3HtSFSOLKgmDn7ryNe7LqI= -github.com/polyfloyd/go-errorlint v1.4.5/go.mod h1:sIZEbFoDOCnTYYZoVkjc4hTnM459tuWA9H/EkdXwsKk= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= -github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.21.0 h1:DIsaGmiaBkSangBgMtWdNfxbMNdku5IK6iNhrEqWvdA= +github.com/prometheus/client_golang v1.21.0/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= +github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/quasilyte/go-ruleguard v0.4.0 h1:DyM6r+TKL+xbKB4Nm7Afd1IQh9kEUKQs2pboWGKtvQo= -github.com/quasilyte/go-ruleguard v0.4.0/go.mod h1:Eu76Z/R8IXtViWUIHkE3p8gdH3/PKk1eh3YGfaEof10= -github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= -github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= -github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= -github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= -github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= -github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= -github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.3.0 h1:q15RT/pd6UggBXVBuLps8BXRvl5GPBcwVA7BJHMLuTw= -github.com/ryancurrah/gomodguard v1.3.0/go.mod h1:ggBxb3luypPEzqVtq33ee7YSN35V28XeGnid8dnni50= -github.com/ryanrolds/sqlclosecheck v0.4.0 h1:i8SX60Rppc1wRuyQjMciLqIzV3xnoHB7/tXbr6RGYNI= -github.com/ryanrolds/sqlclosecheck v0.4.0/go.mod h1:TBRRjzL31JONc9i4XMinicuo+s+E8yKZ5FN8X3G6CKQ= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= -github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= -github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= -github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= -github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= -github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= -github.com/sashamelentyev/usestdlibvars v1.23.0 h1:01h+/2Kd+NblNItNeux0veSL5cBF1jbEOPrEhDzGYq0= -github.com/sashamelentyev/usestdlibvars v1.23.0/go.mod h1:YPwr/Y1LATzHI93CqoPUN/2BzGQ/6N/cl/KwgR0B/aU= +github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU= +github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/securego/gosec/v2 v2.15.0 h1:v4Ym7FF58/jlykYmmhZ7mTm7FQvN/setNm++0fgIAtw= -github.com/securego/gosec/v2 v2.15.0/go.mod h1:VOjTrZOkUtSDt2QLSJmQBMWnvwiQPEjg0l+5juIqGk8= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/sivchari/containedctx v1.0.2 h1:0hLQKpgC53OVF1VT7CeoFHk9YKstur1XOgfYIc1yrHI= -github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= -github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt95do8= -github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= -github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= -github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= -github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= -github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= +github.com/skeema/knownhosts v1.3.0 h1:AM+y0rI04VksttfwjkSTNQorvGqmwATnvnAHpSgc0LY= +github.com/skeema/knownhosts v1.3.0/go.mod h1:sPINvnADmT/qYH1kfv+ePMmOBTH6Tbl7b5LvTDjFK7M= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa h1:YJfZp12Z3AFhSBeXOlv4BO55RMwPn2NoQeDsrdWnBtY= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= -github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= -github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= -github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= -github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.4.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= -github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= +github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= +github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= -github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= -github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= -github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= -github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= -github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= -github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= -github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= -github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= -github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= -github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= -github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= -github.com/tetafro/godot v1.4.11 h1:BVoBIqAf/2QdbFmSwAWnaIqDivZdOV0ZRwEm6jivLKw= -github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= -github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e h1:MV6KaVu/hzByHP0UvJ4HcMGE/8a6A4Rggc/0wx2AvJo= -github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= -github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= -github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= -github.com/tomarrell/wrapcheck/v2 v2.8.1 h1:HxSqDSN0sAt0yJYsrcYVoEeyM4aI9yAm3KQpIXDJRhQ= -github.com/tomarrell/wrapcheck/v2 v2.8.1/go.mod h1:/n2Q3NZ4XFT50ho6Hbxg+RV1uyo2Uow/Vdm9NQcl5SE= -github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= -github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ultraware/funlen v0.0.3 h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iLA= -github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI= -github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/uudashr/gocognit v1.0.6 h1:2Cgi6MweCsdB6kpcVQp7EW4U23iBFQWfTXiWlyp842Y= -github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= -github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME= -github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= -github.com/vektra/mockery/v2 v2.23.1 h1:N59FENM2d/gWE6Ns5JPuf9a7jqQWeheGefZqvuvb1dM= -github.com/vektra/mockery/v2 v2.23.1/go.mod h1:Zh3Kv1ckKs6FokhlVLcCu6UTyzfS3M8mpROz1lBNp+w= -github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= @@ -898,421 +377,126 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= -github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= -github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= -github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -gitlab.com/bosi/decorder v0.2.3 h1:gX4/RgK16ijY8V+BRQHAySfQAb354T7/xQpDB2n10P0= -gitlab.com/bosi/decorder v0.2.3/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= -go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= -go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 h1:qxen9oVGzDdIRP6ejyAJc760RwW4SnVDiTYTzwnXuxo= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5/go.mod h1:eW0HG9/oHQhvRCvb1/pIXW4cOvtDqeQK+XSi3TnwaXY= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= +golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= -golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 h1:jWGQJV4niP+CCmFW9ekjA9Zx8vYORzOUH2/Nl5WPuLQ= -golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= +golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= -golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= -golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o= -gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +gonum.org/v1/gonum v0.15.1 h1:FNy7N6OUZVUaWG9pTiD+jlhdQ3lMP+/LcTpJ6+a8sQ0= +gonum.org/v1/gonum v0.15.1/go.mod h1:eZTZuRFrzu5pcyjN5wJhcIhnUdNijYxX1T2IcrOGY0o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c h1:lfpJ/2rWPa/kJgxyyXM8PrNnfCzcmxJ265mADgwmvLI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a h1:hgh8P4EuoxpsuKMXX/To36nOFD7vixReXgn8lPGnt+o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= -google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= +google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1321,21 +505,13 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -1346,7 +522,6 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -1355,25 +530,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.4.3 h1:o/n5/K5gXqk8Gozvs2cnL0F2S1/g1vcGCAx2vETjITw= -honnef.co/go/tools v0.4.3/go.mod h1:36ZgoUOrqOk1GxwHhyryEkq8FQWkUO2xGuSMhUCcdvA= -mvdan.cc/gofumpt v0.4.0 h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM= -mvdan.cc/gofumpt v0.4.0/go.mod h1:PljLOHDeZqgS8opHRKLzp2It2VBuSdteAgqUfzMTxlQ= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d h1:3rvTIIM22r9pvXk+q3swxUQAQOxksVMGK7sml4nG57w= -mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d/go.mod h1:IeHQjmn6TOD+e4Z3RFiZMMsLVL+A96Nvptar8Fj71is= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= \ No newline at end of file diff --git a/inspect/inspect_test.go b/inspect/inspect_test.go index 38245ac0c62..1c4151e55a1 100644 --- a/inspect/inspect_test.go +++ b/inspect/inspect_test.go @@ -58,8 +58,8 @@ func TestInspectRun(t *testing.T) { func TestBlock(t *testing.T) { testHeight := int64(1) testBlock := new(types.Block) - testBlock.Header.Height = testHeight - testBlock.Header.LastCommitHash = []byte("test hash") + testBlock.Height = testHeight + testBlock.LastCommitHash = []byte("test hash") stateStoreMock := &statemocks.Store{} stateStoreMock.On("Close").Return(nil) @@ -341,7 +341,7 @@ func TestCommit(t *testing.T) { res, err := cli.Commit(context.Background(), &testHeight) require.NoError(t, err) require.NotNil(t, res) - require.Equal(t, res.SignedHeader.Commit.Round, testRound) + require.Equal(t, res.Commit.Round, testRound) cancel() wg.Wait() @@ -354,8 +354,8 @@ func TestBlockByHash(t *testing.T) { testHeight := int64(1) testHash := []byte("test hash") testBlock := new(types.Block) - testBlock.Header.Height = testHeight - testBlock.Header.LastCommitHash = testHash + testBlock.Height = testHeight + testBlock.LastCommitHash = testHash stateStoreMock := &statemocks.Store{} stateStoreMock.On("Close").Return(nil) blockStoreMock := &statemocks.BlockStore{} @@ -407,8 +407,8 @@ func TestBlockchain(t *testing.T) { testHeight := int64(1) testBlock := new(types.Block) testBlockHash := []byte("test hash") - testBlock.Header.Height = testHeight - testBlock.Header.LastCommitHash = testBlockHash + testBlock.Height = testHeight + testBlock.LastCommitHash = testBlockHash stateStoreMock := &statemocks.Store{} stateStoreMock.On("Close").Return(nil) diff --git a/libs/autofile/group.go b/libs/autofile/group.go index 057957915af..bb9fcc1a741 100644 --- a/libs/autofile/group.go +++ b/libs/autofile/group.go @@ -357,7 +357,7 @@ func (g *Group) ReadGroupInfo() GroupInfo { func (g *Group) readGroupInfo() GroupInfo { groupDir := filepath.Dir(g.Head.Path) headBase := filepath.Base(g.Head.Path) - var minIndex, maxIndex int = -1, -1 + var minIndex, maxIndex = -1, -1 var totalSize, headSize int64 = 0, 0 dir, err := os.Open(groupDir) @@ -502,11 +502,11 @@ func (gr *GroupReader) openFile(index int) error { gr.Group.mtx.Lock() defer gr.Group.mtx.Unlock() - if index > gr.Group.maxIndex { + if index > gr.maxIndex { return io.EOF } - curFilePath := filePathForIndex(gr.Head.Path, index, gr.Group.maxIndex) + curFilePath := filePathForIndex(gr.Head.Path, index, gr.maxIndex) curFile, err := os.OpenFile(curFilePath, os.O_RDONLY|os.O_CREATE, autoFilePerms) if err != nil { return err diff --git a/libs/bits/bit_array.go b/libs/bits/bit_array.go index f9744f9c7b4..fb786080284 100644 --- a/libs/bits/bit_array.go +++ b/libs/bits/bit_array.go @@ -28,7 +28,7 @@ func NewBitArray(bits int) *BitArray { } return &BitArray{ Bits: bits, - Elems: make([]uint64, (bits+63)/64), + Elems: make([]uint64, numElements(bits)), } } @@ -41,7 +41,7 @@ func NewBitArrayFromFn(bits int, fn func(int) bool) *BitArray { } bA := &BitArray{ Bits: bits, - Elems: make([]uint64, (bits+63)/64), + Elems: make([]uint64, numElements(bits)), } for i := 0; i < bits; i++ { v := fn(i) @@ -90,7 +90,7 @@ func (bA *BitArray) SetIndex(i int, v bool) bool { } func (bA *BitArray) setIndex(i int, v bool) bool { - if i >= bA.Bits { + if i >= bA.Bits || i/64 >= len(bA.Elems) { return false } if v { @@ -121,7 +121,7 @@ func (bA *BitArray) copy() *BitArray { } func (bA *BitArray) copyBits(bits int) *BitArray { - c := make([]uint64, (bits+63)/64) + c := make([]uint64, numElements(bits)) copy(c, bA.Elems) return &BitArray{ Bits: bits, @@ -282,6 +282,11 @@ func (bA *BitArray) PickRandom() (int, bool) { } func (bA *BitArray) getNumTrueIndices() int { + if bA.Size() == 0 || len(bA.Elems) == 0 || len(bA.Elems) != numElements(bA.Size()) { + // size and elements must be valid to do this calc + return 0 + } + count := 0 numElems := len(bA.Elems) // handle all elements except the last one @@ -495,3 +500,22 @@ func (bA *BitArray) FromProto(protoBitArray *cmtprotobits.BitArray) { bA.Elems = protoBitArray.Elems } } + +// ValidateBasic validates a BitArray. Note that a nil BitArray and BitArray of +// size 0 bits is valid. However the number of Bits and Elems be valid based on +// each other. +func (bA *BitArray) ValidateBasic() error { + if bA == nil { + return nil + } + + expectedElems := numElements(bA.Size()) + if expectedElems != len(bA.Elems) { + return fmt.Errorf("mismatch between specified number of bits %d, and number of elements %d, expected %d elements", bA.Size(), len(bA.Elems), expectedElems) + } + return nil +} + +func numElements(bits int) int { + return (bits + 63) / 64 +} diff --git a/libs/bits/bit_array_test.go b/libs/bits/bit_array_test.go index 0f7351f346e..c0cb0457299 100644 --- a/libs/bits/bit_array_test.go +++ b/libs/bits/bit_array_test.go @@ -173,6 +173,28 @@ func TestGetNumTrueIndices(t *testing.T) { } } +func TestGetNumTrueIndicesInvalidStates(t *testing.T) { + testCases := []struct { + name string + bA1 *BitArray + exp int + }{ + {"empty", &BitArray{}, 0}, + {"explicit 0 bits nil elements", &BitArray{Bits: 0, Elems: nil}, 0}, + {"explicit 0 bits 0 len elements", &BitArray{Bits: 0, Elems: make([]uint64, 0)}, 0}, + {"nil", nil, 0}, + {"with elements", NewBitArray(10), 0}, + {"more elements than bits specifies", &BitArray{Bits: 0, Elems: make([]uint64, 5)}, 0}, + {"less elements than bits specifies", &BitArray{Bits: 200, Elems: make([]uint64, 1)}, 0}, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + n := tc.bA1.getNumTrueIndices() + require.Equal(t, n, tc.exp) + }) + } +} + func TestGetNthTrueIndex(t *testing.T) { type testcase struct { Input string @@ -226,7 +248,7 @@ func TestGetNthTrueIndex(t *testing.T) { } } -func TestBytes(_ *testing.T) { +func TestBytes(t *testing.T) { bA := NewBitArray(4) bA.SetIndex(0, true) check := func(bA *BitArray, bz []byte) { @@ -253,6 +275,10 @@ func TestBytes(_ *testing.T) { check(bA, []byte{0x80, 0x01}) bA.SetIndex(9, true) check(bA, []byte{0x80, 0x03}) + + bA = NewBitArray(4) + bA.Elems = nil + require.False(t, bA.SetIndex(1, true)) } func TestEmptyFull(t *testing.T) { @@ -371,6 +397,28 @@ func TestBitArrayProtoBuf(t *testing.T) { } } +func TestBitArrayValidateBasic(t *testing.T) { + testCases := []struct { + name string + bA1 *BitArray + expPass bool + }{ + {"valid empty", &BitArray{}, true}, + {"valid explicit 0 bits nil elements", &BitArray{Bits: 0, Elems: nil}, true}, + {"valid explicit 0 bits 0 len elements", &BitArray{Bits: 0, Elems: make([]uint64, 0)}, true}, + {"valid nil", nil, true}, + {"valid with elements", NewBitArray(10), true}, + {"more elements than bits specifies", &BitArray{Bits: 0, Elems: make([]uint64, 5)}, false}, + {"less elements than bits specifies", &BitArray{Bits: 200, Elems: make([]uint64, 1)}, false}, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := tc.bA1.ValidateBasic() + require.Equal(t, err == nil, tc.expPass) + }) + } +} + // Tests that UnmarshalJSON doesn't crash when no bits are passed into the JSON. // See issue https://github.com/cometbft/cometbft/issues/2658 func TestUnmarshalJSONDoesntCrashOnZeroBits(t *testing.T) { diff --git a/libs/bytes/bytes.go b/libs/bytes/bytes.go index 621016f8513..1f3a395f7d8 100644 --- a/libs/bytes/bytes.go +++ b/libs/bytes/bytes.go @@ -58,8 +58,8 @@ func (bz HexBytes) String() string { func (bz HexBytes) Format(s fmt.State, verb rune) { switch verb { case 'p': - s.Write([]byte(fmt.Sprintf("%p", bz))) //nolint: errcheck + fmt.Fprintf(s, "%p", bz) default: - s.Write([]byte(fmt.Sprintf("%X", []byte(bz)))) //nolint: errcheck + fmt.Fprintf(s, "%X", []byte(bz)) } } diff --git a/libs/flowrate/io_test.go b/libs/flowrate/io_test.go index 4d7de417e46..3386d9889da 100644 --- a/libs/flowrate/io_test.go +++ b/libs/flowrate/io_test.go @@ -164,7 +164,7 @@ const maxDeviationForRate int64 = 50 // `time.Sleep` has ended). func statusesAreEqual(s1 *Status, s2 *Status) bool { if s1.Active == s2.Active && - s1.Start == s2.Start && + s1.Start.Equal(s2.Start) && durationsAreEqual(s1.Duration, s2.Duration, maxDeviationForDuration) && s1.Idle == s2.Idle && s1.Bytes == s2.Bytes && diff --git a/libs/tempfile/tempfile_test.go b/libs/tempfile/tempfile_test.go index 4ff18863f4a..5b0545f89a3 100644 --- a/libs/tempfile/tempfile_test.go +++ b/libs/tempfile/tempfile_test.go @@ -114,7 +114,7 @@ func TestWriteFileAtomicManyDuplicates(t *testing.T) { fname := "/tmp/" + atomicWriteFilePrefix + fileRand f, err := os.OpenFile(fname, atomicWriteFileFlag, 0777) require.Nil(t, err) - _, err = f.WriteString(fmt.Sprintf(testString, i)) + _, err = fmt.Fprintf(f, testString, i) require.NoError(t, err) defer os.Remove(fname) } diff --git a/light/detector.go b/light/detector.go index 5b742761eba..aaa9fae9138 100644 --- a/light/detector.go +++ b/light/detector.go @@ -26,7 +26,7 @@ import ( // If there are no conflicting headers, the light client deems the verified target header // trusted and saves it to the trusted store. func (c *Client) detectDivergence(ctx context.Context, primaryTrace []*types.LightBlock, now time.Time) error { - if primaryTrace == nil || len(primaryTrace) < 2 { + if len(primaryTrace) < 2 { return errors.New("nil or single block primary trace") } var ( diff --git a/light/provider/http/http.go b/light/provider/http/http.go index b73f7bd4524..a82ac6f3bae 100644 --- a/light/provider/http/http.go +++ b/light/provider/http/http.go @@ -184,7 +184,7 @@ func (p *http) signedHeader(ctx context.Context, height *int64) (*types.SignedHe // If the node is starting at a non-zero height, but does not yet // have any blocks, it can return an empty signed header without // returning an error. - if commit.SignedHeader.IsEmpty() { + if commit.IsEmpty() { // Technically this means that the provider still needs to // catch up. return nil, provider.ErrHeightTooHigh diff --git a/light/rpc/client.go b/light/rpc/client.go index b26c51a9d23..b0d54f6b107 100644 --- a/light/rpc/client.go +++ b/light/rpc/client.go @@ -447,9 +447,9 @@ func (c *Client) HeaderByHash(ctx context.Context, hash cmtbytes.HexBytes) (*cty return nil, err } - if !bytes.Equal(lb.Header.Hash(), res.Header.Hash()) { + if !bytes.Equal(lb.Hash(), res.Header.Hash()) { return nil, fmt.Errorf("primary header hash does not match trusted header hash. (%X != %X)", - lb.Header.Hash(), res.Header.Hash()) + lb.Hash(), res.Header.Hash()) } return res, nil diff --git a/light/rpc/mocks/light_client.go b/light/rpc/mocks/light_client.go index 5699dfe4395..d564138313f 100644 --- a/light/rpc/mocks/light_client.go +++ b/light/rpc/mocks/light_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -17,10 +17,14 @@ type LightClient struct { mock.Mock } -// ChainID provides a mock function with given fields: +// ChainID provides a mock function with no fields func (_m *LightClient) ChainID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ChainID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -35,6 +39,10 @@ func (_m *LightClient) ChainID() string { func (_m *LightClient) TrustedLightBlock(height int64) (*types.LightBlock, error) { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for TrustedLightBlock") + } + var r0 *types.LightBlock var r1 error if rf, ok := ret.Get(0).(func(int64) (*types.LightBlock, error)); ok { @@ -61,6 +69,10 @@ func (_m *LightClient) TrustedLightBlock(height int64) (*types.LightBlock, error func (_m *LightClient) Update(ctx context.Context, now time.Time) (*types.LightBlock, error) { ret := _m.Called(ctx, now) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *types.LightBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, time.Time) (*types.LightBlock, error)); ok { @@ -87,6 +99,10 @@ func (_m *LightClient) Update(ctx context.Context, now time.Time) (*types.LightB func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int64, now time.Time) (*types.LightBlock, error) { ret := _m.Called(ctx, height, now) + if len(ret) == 0 { + panic("no return value specified for VerifyLightBlockAtHeight") + } + var r0 *types.LightBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) (*types.LightBlock, error)); ok { @@ -109,13 +125,12 @@ func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int6 return r0, r1 } -type mockConstructorTestingTNewLightClient interface { +// NewLightClient creates a new instance of LightClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewLightClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewLightClient creates a new instance of LightClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLightClient(t mockConstructorTestingTNewLightClient) *LightClient { +}) *LightClient { mock := &LightClient{} mock.Mock.Test(t) diff --git a/mempool/clist_mempool.go b/mempool/clist_mempool.go index d1b6fb7ecbb..455cce3ab4e 100644 --- a/mempool/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -232,6 +232,7 @@ func (mem *CListMempool) CheckTx( txSize := len(tx) if err := mem.isFull(txSize); err != nil { + mem.metrics.RejectedTxs.Add(1) return err } @@ -414,7 +415,9 @@ func (mem *CListMempool) resCbFirstTime( if err := mem.isFull(len(tx)); err != nil { // remove from cache (mempool might have a space later) mem.cache.Remove(tx) - mem.logger.Error(err.Error()) + // use debug level to avoid spamming logs when traffic is high + mem.logger.Debug(err.Error()) + mem.metrics.RejectedTxs.Add(1) return } @@ -429,6 +432,7 @@ func (mem *CListMempool) resCbFirstTime( "height", mem.height.Load(), "total", mem.Size(), ) + mem.metrics.RejectedTxs.Add(1) return } @@ -493,6 +497,7 @@ func (mem *CListMempool) resCbRecheck(tx types.Tx, res *abci.ResponseCheckTx) { } if !mem.config.KeepInvalidTxsInCache { mem.cache.Remove(tx) + mem.metrics.EvictedTxs.Add(1) } } } diff --git a/mempool/metrics.gen.go b/mempool/metrics.gen.go index cd41c2ebc42..3d202e320ad 100644 --- a/mempool/metrics.gen.go +++ b/mempool/metrics.gen.go @@ -38,19 +38,19 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics { Namespace: namespace, Subsystem: MetricsSubsystem, Name: "failed_txs", - Help: "Number of failed transactions.", + Help: "FailedTxs defines the number of failed transactions. These are transactions that failed to make it into the mempool because they were deemed invalid. metrics:Number of failed transactions.", }, labels).With(labelsAndValues...), RejectedTxs: prometheus.NewCounterFrom(stdprometheus.CounterOpts{ Namespace: namespace, Subsystem: MetricsSubsystem, Name: "rejected_txs", - Help: "Number of rejected transactions.", + Help: "RejectedTxs defines the number of rejected transactions. These are transactions that failed to make it into the mempool due to resource limits, e.g. mempool is full. metrics:Number of rejected transactions.", }, labels).With(labelsAndValues...), EvictedTxs: prometheus.NewCounterFrom(stdprometheus.CounterOpts{ Namespace: namespace, Subsystem: MetricsSubsystem, Name: "evicted_txs", - Help: "Number of evicted transactions.", + Help: "EvictedTxs defines the number of evicted transactions. These are valid transactions that passed CheckTx and make it into the mempool but later became invalid. metrics:Number of evicted transactions.", }, labels).With(labelsAndValues...), RecheckTimes: prometheus.NewCounterFrom(stdprometheus.CounterOpts{ Namespace: namespace, diff --git a/mempool/metrics.go b/mempool/metrics.go index 689d6f496dd..6a24a5b48a7 100644 --- a/mempool/metrics.go +++ b/mempool/metrics.go @@ -24,21 +24,22 @@ type Metrics struct { // Histogram of transaction sizes in bytes. TxSizeBytes metrics.Histogram `metrics_buckettype:"exp" metrics_bucketsizes:"1,3,7"` - // Number of failed transactions. + // FailedTxs defines the number of failed transactions. These are + // transactions that failed to make it into the mempool because they were + // deemed invalid. + // metrics:Number of failed transactions. FailedTxs metrics.Counter // RejectedTxs defines the number of rejected transactions. These are - // transactions that passed CheckTx but failed to make it into the mempool - // due to resource limits, e.g. mempool is full and no lower priority - // transactions exist in the mempool. - //metrics:Number of rejected transactions. + // transactions that failed to make it into the mempool due to resource + // limits, e.g. mempool is full. + // metrics:Number of rejected transactions. RejectedTxs metrics.Counter // EvictedTxs defines the number of evicted transactions. These are valid - // transactions that passed CheckTx and existed in the mempool but were later - // evicted to make room for higher priority valid transactions that passed - // CheckTx. - //metrics:Number of evicted transactions. + // transactions that passed CheckTx and make it into the mempool but later + // became invalid. + // metrics:Number of evicted transactions. EvictedTxs metrics.Counter // Number of times transactions are rechecked in the mempool. diff --git a/mempool/mocks/mempool.go b/mempool/mocks/mempool.go index 7573c58e978..efc914b7548 100644 --- a/mempool/mocks/mempool.go +++ b/mempool/mocks/mempool.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -20,6 +20,10 @@ type Mempool struct { func (_m *Mempool) CheckTx(tx types.Tx, callback func(*abcitypes.ResponseCheckTx), txInfo mempool.TxInfo) error { ret := _m.Called(tx, callback, txInfo) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 error if rf, ok := ret.Get(0).(func(types.Tx, func(*abcitypes.ResponseCheckTx), mempool.TxInfo) error); ok { r0 = rf(tx, callback, txInfo) @@ -30,20 +34,24 @@ func (_m *Mempool) CheckTx(tx types.Tx, callback func(*abcitypes.ResponseCheckTx return r0 } -// EnableTxsAvailable provides a mock function with given fields: +// EnableTxsAvailable provides a mock function with no fields func (_m *Mempool) EnableTxsAvailable() { _m.Called() } -// Flush provides a mock function with given fields: +// Flush provides a mock function with no fields func (_m *Mempool) Flush() { _m.Called() } -// FlushAppConn provides a mock function with given fields: +// FlushAppConn provides a mock function with no fields func (_m *Mempool) FlushAppConn() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlushAppConn") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -54,7 +62,7 @@ func (_m *Mempool) FlushAppConn() error { return r0 } -// Lock provides a mock function with given fields: +// Lock provides a mock function with no fields func (_m *Mempool) Lock() { _m.Called() } @@ -63,6 +71,10 @@ func (_m *Mempool) Lock() { func (_m *Mempool) ReapMaxBytesMaxGas(maxBytes int64, maxGas int64) types.Txs { ret := _m.Called(maxBytes, maxGas) + if len(ret) == 0 { + panic("no return value specified for ReapMaxBytesMaxGas") + } + var r0 types.Txs if rf, ok := ret.Get(0).(func(int64, int64) types.Txs); ok { r0 = rf(maxBytes, maxGas) @@ -79,6 +91,10 @@ func (_m *Mempool) ReapMaxBytesMaxGas(maxBytes int64, maxGas int64) types.Txs { func (_m *Mempool) ReapMaxTxs(max int) types.Txs { ret := _m.Called(max) + if len(ret) == 0 { + panic("no return value specified for ReapMaxTxs") + } + var r0 types.Txs if rf, ok := ret.Get(0).(func(int) types.Txs); ok { r0 = rf(max) @@ -95,6 +111,10 @@ func (_m *Mempool) ReapMaxTxs(max int) types.Txs { func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error { ret := _m.Called(txKey) + if len(ret) == 0 { + panic("no return value specified for RemoveTxByKey") + } + var r0 error if rf, ok := ret.Get(0).(func(types.TxKey) error); ok { r0 = rf(txKey) @@ -105,10 +125,14 @@ func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error { return r0 } -// Size provides a mock function with given fields: +// Size provides a mock function with no fields func (_m *Mempool) Size() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -119,10 +143,14 @@ func (_m *Mempool) Size() int { return r0 } -// SizeBytes provides a mock function with given fields: +// SizeBytes provides a mock function with no fields func (_m *Mempool) SizeBytes() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SizeBytes") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -133,10 +161,14 @@ func (_m *Mempool) SizeBytes() int64 { return r0 } -// TxsAvailable provides a mock function with given fields: +// TxsAvailable provides a mock function with no fields func (_m *Mempool) TxsAvailable() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TxsAvailable") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -149,7 +181,7 @@ func (_m *Mempool) TxsAvailable() <-chan struct{} { return r0 } -// Unlock provides a mock function with given fields: +// Unlock provides a mock function with no fields func (_m *Mempool) Unlock() { _m.Called() } @@ -158,6 +190,10 @@ func (_m *Mempool) Unlock() { func (_m *Mempool) Update(blockHeight int64, blockTxs types.Txs, deliverTxResponses []*abcitypes.ExecTxResult, newPreFn mempool.PreCheckFunc, newPostFn mempool.PostCheckFunc) error { ret := _m.Called(blockHeight, blockTxs, deliverTxResponses, newPreFn, newPostFn) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 error if rf, ok := ret.Get(0).(func(int64, types.Txs, []*abcitypes.ExecTxResult, mempool.PreCheckFunc, mempool.PostCheckFunc) error); ok { r0 = rf(blockHeight, blockTxs, deliverTxResponses, newPreFn, newPostFn) @@ -168,13 +204,12 @@ func (_m *Mempool) Update(blockHeight int64, blockTxs types.Txs, deliverTxRespon return r0 } -type mockConstructorTestingTNewMempool interface { +// NewMempool creates a new instance of Mempool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMempool(t interface { mock.TestingT Cleanup(func()) -} - -// NewMempool creates a new instance of Mempool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMempool(t mockConstructorTestingTNewMempool) *Mempool { +}) *Mempool { mock := &Mempool{} mock.Mock.Test(t) diff --git a/mempool/reactor.go b/mempool/reactor.go index fa2993396b3..ef3e9a7c382 100644 --- a/mempool/reactor.go +++ b/mempool/reactor.go @@ -155,10 +155,16 @@ func (memR *Reactor) Receive(e p2p.Envelope) { for _, tx := range protoTxs { ntx := types.Tx(tx) err = memR.mempool.CheckTx(ntx, nil, txInfo) - if errors.Is(err, ErrTxInCache) { - memR.Logger.Debug("Tx already exists in cache", "tx", ntx.String()) - } else if err != nil { - memR.Logger.Info("Could not check tx", "tx", ntx.String(), "err", err) + if err != nil { + switch { + case errors.Is(err, ErrTxInCache): + memR.Logger.Debug("Tx already exists in cache", "tx", ntx.String()) + case errors.As(err, &ErrMempoolIsFull{}): + // using debug level to avoid flooding when traffic is high + memR.Logger.Debug(err.Error()) + default: + memR.Logger.Info("Could not check tx", "tx", ntx.String(), "err", err) + } } } default: diff --git a/node/node_test.go b/node/node_test.go index 80c1f5e8a89..7dfe82d4657 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -34,6 +34,7 @@ import ( cmttime "github.com/cometbft/cometbft/types/time" oracletypes "github.com/cometbft/cometbft/oracle/service/types" + oracleproto "github.com/cometbft/cometbft/proto/tendermint/oracle" ) func TestNodeStartStop(t *testing.T) { @@ -164,7 +165,7 @@ func TestNodeSetPrivValTCP(t *testing.T) { config := test.ResetTestRoot("node_priv_val_tcp_test") defer os.RemoveAll(config.RootDir) - config.BaseConfig.PrivValidatorListenAddr = addr + config.PrivValidatorListenAddr = addr dialer := privval.DialTCPFn(addr, 100*time.Millisecond, ed25519.GenPrivKey()) dialerEndpoint := privval.NewSignerDialerEndpoint( @@ -198,7 +199,7 @@ func TestPrivValidatorListenAddrNoProtocol(t *testing.T) { config := test.ResetTestRoot("node_priv_val_tcp_test") defer os.RemoveAll(config.RootDir) - config.BaseConfig.PrivValidatorListenAddr = addrNoPrefix + config.PrivValidatorListenAddr = addrNoPrefix _, err := DefaultNewNode(config, log.TestingLogger()) assert.Error(t, err) @@ -210,7 +211,7 @@ func TestNodeSetPrivValIPC(t *testing.T) { config := test.ResetTestRoot("node_priv_val_tcp_test") defer os.RemoveAll(config.RootDir) - config.BaseConfig.PrivValidatorListenAddr = "unix://" + tmpfile + config.PrivValidatorListenAddr = "unix://" + tmpfile dialer := privval.DialUnixFn(tmpfile) dialerEndpoint := privval.NewSignerDialerEndpoint( @@ -315,7 +316,11 @@ func TestCreateProposalBlock(t *testing.T) { assert.NoError(t, err) } - oracleInfo := oracletypes.OracleInfo{} + oracleInfo := oracletypes.OracleInfo{ + GossipVoteBuffer: &oracletypes.GossipVoteBuffer{ + Buffer: make(map[string]*oracleproto.GossipedVotes), + }, + } blockExec := sm.NewBlockExecutor( stateStore, @@ -395,7 +400,11 @@ func TestMaxProposalBlockSize(t *testing.T) { err = mempool.CheckTx(tx, nil, mempl.TxInfo{}) assert.NoError(t, err) - oracleInfo := oracletypes.OracleInfo{} + oracleInfo := oracletypes.OracleInfo{ + GossipVoteBuffer: &oracletypes.GossipVoteBuffer{ + Buffer: make(map[string]*oracleproto.GossipedVotes), + }, + } blockExec := sm.NewBlockExecutor( stateStore, diff --git a/p2p/mocks/peer.go b/p2p/mocks/peer.go index 235b0e976fb..265d71af533 100644 --- a/p2p/mocks/peer.go +++ b/p2p/mocks/peer.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -18,10 +18,14 @@ type Peer struct { mock.Mock } -// CloseConn provides a mock function with given fields: +// CloseConn provides a mock function with no fields func (_m *Peer) CloseConn() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CloseConn") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -32,7 +36,7 @@ func (_m *Peer) CloseConn() error { return r0 } -// FlushStop provides a mock function with given fields: +// FlushStop provides a mock function with no fields func (_m *Peer) FlushStop() { _m.Called() } @@ -41,6 +45,10 @@ func (_m *Peer) FlushStop() { func (_m *Peer) Get(_a0 string) interface{} { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 interface{} if rf, ok := ret.Get(0).(func(string) interface{}); ok { r0 = rf(_a0) @@ -53,10 +61,14 @@ func (_m *Peer) Get(_a0 string) interface{} { return r0 } -// GetRemovalFailed provides a mock function with given fields: +// GetRemovalFailed provides a mock function with no fields func (_m *Peer) GetRemovalFailed() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRemovalFailed") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -67,10 +79,14 @@ func (_m *Peer) GetRemovalFailed() bool { return r0 } -// ID provides a mock function with given fields: +// ID provides a mock function with no fields func (_m *Peer) ID() p2p.ID { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 p2p.ID if rf, ok := ret.Get(0).(func() p2p.ID); ok { r0 = rf() @@ -81,10 +97,14 @@ func (_m *Peer) ID() p2p.ID { return r0 } -// IsOutbound provides a mock function with given fields: +// IsOutbound provides a mock function with no fields func (_m *Peer) IsOutbound() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsOutbound") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -95,10 +115,14 @@ func (_m *Peer) IsOutbound() bool { return r0 } -// IsPersistent provides a mock function with given fields: +// IsPersistent provides a mock function with no fields func (_m *Peer) IsPersistent() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsPersistent") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -109,10 +133,14 @@ func (_m *Peer) IsPersistent() bool { return r0 } -// IsRunning provides a mock function with given fields: +// IsRunning provides a mock function with no fields func (_m *Peer) IsRunning() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsRunning") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -123,10 +151,14 @@ func (_m *Peer) IsRunning() bool { return r0 } -// NodeInfo provides a mock function with given fields: +// NodeInfo provides a mock function with no fields func (_m *Peer) NodeInfo() p2p.NodeInfo { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeInfo") + } + var r0 p2p.NodeInfo if rf, ok := ret.Get(0).(func() p2p.NodeInfo); ok { r0 = rf() @@ -139,10 +171,14 @@ func (_m *Peer) NodeInfo() p2p.NodeInfo { return r0 } -// OnReset provides a mock function with given fields: +// OnReset provides a mock function with no fields func (_m *Peer) OnReset() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OnReset") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -153,10 +189,14 @@ func (_m *Peer) OnReset() error { return r0 } -// OnStart provides a mock function with given fields: +// OnStart provides a mock function with no fields func (_m *Peer) OnStart() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OnStart") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -167,15 +207,19 @@ func (_m *Peer) OnStart() error { return r0 } -// OnStop provides a mock function with given fields: +// OnStop provides a mock function with no fields func (_m *Peer) OnStop() { _m.Called() } -// Quit provides a mock function with given fields: +// Quit provides a mock function with no fields func (_m *Peer) Quit() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Quit") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -188,10 +232,14 @@ func (_m *Peer) Quit() <-chan struct{} { return r0 } -// RemoteAddr provides a mock function with given fields: +// RemoteAddr provides a mock function with no fields func (_m *Peer) RemoteAddr() net.Addr { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RemoteAddr") + } + var r0 net.Addr if rf, ok := ret.Get(0).(func() net.Addr); ok { r0 = rf() @@ -204,10 +252,14 @@ func (_m *Peer) RemoteAddr() net.Addr { return r0 } -// RemoteIP provides a mock function with given fields: +// RemoteIP provides a mock function with no fields func (_m *Peer) RemoteIP() net.IP { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RemoteIP") + } + var r0 net.IP if rf, ok := ret.Get(0).(func() net.IP); ok { r0 = rf() @@ -220,10 +272,14 @@ func (_m *Peer) RemoteIP() net.IP { return r0 } -// Reset provides a mock function with given fields: +// Reset provides a mock function with no fields func (_m *Peer) Reset() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Reset") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -238,6 +294,10 @@ func (_m *Peer) Reset() error { func (_m *Peer) Send(_a0 p2p.Envelope) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 bool if rf, ok := ret.Get(0).(func(p2p.Envelope) bool); ok { r0 = rf(_a0) @@ -258,15 +318,19 @@ func (_m *Peer) SetLogger(_a0 log.Logger) { _m.Called(_a0) } -// SetRemovalFailed provides a mock function with given fields: +// SetRemovalFailed provides a mock function with no fields func (_m *Peer) SetRemovalFailed() { _m.Called() } -// SocketAddr provides a mock function with given fields: +// SocketAddr provides a mock function with no fields func (_m *Peer) SocketAddr() *p2p.NetAddress { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SocketAddr") + } + var r0 *p2p.NetAddress if rf, ok := ret.Get(0).(func() *p2p.NetAddress); ok { r0 = rf() @@ -279,10 +343,14 @@ func (_m *Peer) SocketAddr() *p2p.NetAddress { return r0 } -// Start provides a mock function with given fields: +// Start provides a mock function with no fields func (_m *Peer) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -293,10 +361,14 @@ func (_m *Peer) Start() error { return r0 } -// Status provides a mock function with given fields: +// Status provides a mock function with no fields func (_m *Peer) Status() conn.ConnectionStatus { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 conn.ConnectionStatus if rf, ok := ret.Get(0).(func() conn.ConnectionStatus); ok { r0 = rf() @@ -307,10 +379,14 @@ func (_m *Peer) Status() conn.ConnectionStatus { return r0 } -// Stop provides a mock function with given fields: +// Stop provides a mock function with no fields func (_m *Peer) Stop() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Stop") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -321,10 +397,14 @@ func (_m *Peer) Stop() error { return r0 } -// String provides a mock function with given fields: +// String provides a mock function with no fields func (_m *Peer) String() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for String") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -339,6 +419,10 @@ func (_m *Peer) String() string { func (_m *Peer) TrySend(_a0 p2p.Envelope) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for TrySend") + } + var r0 bool if rf, ok := ret.Get(0).(func(p2p.Envelope) bool); ok { r0 = rf(_a0) @@ -349,13 +433,12 @@ func (_m *Peer) TrySend(_a0 p2p.Envelope) bool { return r0 } -type mockConstructorTestingTNewPeer interface { +// NewPeer creates a new instance of Peer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewPeer(t interface { mock.TestingT Cleanup(func()) -} - -// NewPeer creates a new instance of Peer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPeer(t mockConstructorTestingTNewPeer) *Peer { +}) *Peer { mock := &Peer{} mock.Mock.Test(t) diff --git a/p2p/netaddress.go b/p2p/netaddress.go index 252178be3a3..fc9df4505db 100644 --- a/p2p/netaddress.go +++ b/p2p/netaddress.go @@ -255,8 +255,7 @@ func (na *NetAddress) Routable() bool { return false } // TODO(oga) bitcoind doesn't include RFC3849 here, but should we? - return !(na.RFC1918() || na.RFC3927() || na.RFC4862() || - na.RFC4193() || na.RFC4843() || na.Local()) + return !na.RFC1918() && !na.RFC3927() && !na.RFC4862() && !na.RFC4193() && !na.RFC4843() && !na.Local() } // For IPv4 these are either a 0 or all bits set address. For IPv6 a zero diff --git a/p2p/peer.go b/p2p/peer.go index dc88152df6d..71da27a7577 100644 --- a/p2p/peer.go +++ b/p2p/peer.go @@ -229,12 +229,12 @@ func (p *peer) ID() ID { // IsOutbound returns true if the connection is outbound, false otherwise. func (p *peer) IsOutbound() bool { - return p.peerConn.outbound + return p.outbound } // IsPersistent returns true if the peer is persitent, false otherwise. func (p *peer) IsPersistent() bool { - return p.peerConn.persistent + return p.persistent } // NodeInfo returns a copy of the peer's NodeInfo. @@ -247,7 +247,7 @@ func (p *peer) NodeInfo() NodeInfo { // For inbound peers, it's the address returned by the underlying connection // (not what's reported in the peer's NodeInfo). func (p *peer) SocketAddr() *NetAddress { - return p.peerConn.socketAddr + return p.socketAddr } // Status returns the peer's ConnectionStatus. @@ -326,7 +326,7 @@ func (p *peer) hasChannel(chID byte) bool { // CloseConn closes original connection. Used for cleaning up in cases where the peer had not been started at all. func (p *peer) CloseConn() error { - return p.peerConn.conn.Close() + return p.conn.Close() } func (p *peer) SetRemovalFailed() { @@ -348,7 +348,7 @@ func (pc *peerConn) CloseConn() { // RemoteAddr returns peer's remote network address. func (p *peer) RemoteAddr() net.Addr { - return p.peerConn.conn.RemoteAddr() + return p.conn.RemoteAddr() } // CanSend returns true if the send queue is not full, false otherwise. diff --git a/p2p/pex/pex_reactor.go b/p2p/pex/pex_reactor.go index 216932f8519..c661d8a0d52 100644 --- a/p2p/pex/pex_reactor.go +++ b/p2p/pex/pex_reactor.go @@ -418,16 +418,16 @@ func (r *Reactor) ensurePeersRoutine() { // fire once immediately. // ensures we dial the seeds right away if the book is empty - r.ensurePeers() + r.ensurePeers(true) // fire periodically ticker := time.NewTicker(r.ensurePeersPeriod) for { select { case <-ticker.C: - r.ensurePeers() + r.ensurePeers(true) case <-r.ensurePeersCh: - r.ensurePeers() + r.ensurePeers(false) case <-r.Quit(): ticker.Stop() return @@ -440,7 +440,7 @@ func (r *Reactor) ensurePeersRoutine() { // heuristic that we haven't perfected yet, or, perhaps is manually edited by // the node operator. It should not be used to compute what addresses are // already connected or not. -func (r *Reactor) ensurePeers() { +func (r *Reactor) ensurePeers(ensurePeersPeriodElapsed bool) { var ( out, in, dial = r.Switch.NumPeers() numToDial = r.Switch.MaxNumOutboundPeers() - (out + dial) @@ -508,7 +508,7 @@ func (r *Reactor) ensurePeers() { // 1) Pick a random peer and ask for more. peers := r.Switch.Peers().List() peersCount := len(peers) - if peersCount > 0 { + if peersCount > 0 && ensurePeersPeriodElapsed { peer := peers[cmtrand.Int()%peersCount] r.Logger.Info("We need more addresses. Sending pexRequest to random peer", "peer", peer) r.RequestAddrs(peer) diff --git a/p2p/pex/pex_reactor_test.go b/p2p/pex/pex_reactor_test.go index 0a25c70581c..1a4472a626f 100644 --- a/p2p/pex/pex_reactor_test.go +++ b/p2p/pex/pex_reactor_test.go @@ -270,14 +270,11 @@ func TestConnectionSpeedForPeerReceivedFromSeed(t *testing.T) { require.Nil(t, err) defer os.RemoveAll(dir) - // Default is 10, we need one connection for the seed node. - cfg.MaxNumOutboundPeers = 2 - var id int var knownAddrs []*p2p.NetAddress // 1. Create some peers - for id = 0; id < cfg.MaxNumOutboundPeers+1; id++ { + for id = 0; id < 3; id++ { peer := testCreateDefaultPeer(dir, id) require.NoError(t, peer.Start()) addr := peer.NetAddress() @@ -304,14 +301,14 @@ func TestConnectionSpeedForPeerReceivedFromSeed(t *testing.T) { assertPeersWithTimeout(t, []*p2p.Switch{node}, 10*time.Millisecond, 3*time.Second, 1) // 5. Check that the node connects to the peers reported by the seed node - assertPeersWithTimeout(t, []*p2p.Switch{node}, 10*time.Millisecond, 1*time.Second, cfg.MaxNumOutboundPeers) + assertPeersWithTimeout(t, []*p2p.Switch{node}, 10*time.Millisecond, 1*time.Second, 2) // 6. Assert that the configured maximum number of inbound/outbound peers // are respected, see https://github.com/cometbft/cometbft/issues/486 outbound, inbound, dialing := node.NumPeers() assert.LessOrEqual(t, inbound, cfg.MaxNumInboundPeers) assert.LessOrEqual(t, outbound, cfg.MaxNumOutboundPeers) - assert.Zero(t, dialing) + assert.LessOrEqual(t, dialing, cfg.MaxNumOutboundPeers+cfg.MaxNumInboundPeers-outbound-inbound) } func TestPEXReactorSeedMode(t *testing.T) { @@ -563,8 +560,9 @@ func assertPeersWithTimeout( ) { var ( ticker = time.NewTicker(checkPeriod) - remaining = timeout + timeoutCh = time.After(timeout) ) + defer ticker.Stop() for { select { @@ -578,14 +576,10 @@ func assertPeersWithTimeout( break } } - remaining -= checkPeriod - if remaining < 0 { - remaining = 0 - } if allGood { return } - case <-time.After(remaining): + case <-timeoutCh: numPeersStr := "" for i, s := range switches { outbound, inbound, _ := s.NumPeers() diff --git a/p2p/switch.go b/p2p/switch.go index 68ad5669b3e..4afe4ba45e0 100644 --- a/p2p/switch.go +++ b/p2p/switch.go @@ -388,7 +388,8 @@ func (sw *Switch) stopAndRemovePeer(peer Peer, reason interface{}) { } // reconnectToPeer tries to reconnect to the addr, first repeatedly -// with a fixed interval, then with exponential backoff. +// with a fixed interval (approximately 2 minutes), then with +// exponential backoff (approximately close to 24 hours). // If no success after all that, it stops trying, and leaves it // to the PEX/Addrbook to find the peer with the addr again // NOTE: this will keep trying even if the handshake or auth fails. @@ -404,6 +405,7 @@ func (sw *Switch) reconnectToPeer(addr *NetAddress) { start := time.Now() sw.Logger.Info("Reconnecting to peer", "addr", addr) + for i := 0; i < reconnectAttempts; i++ { if !sw.IsRunning() { return @@ -424,7 +426,7 @@ func (sw *Switch) reconnectToPeer(addr *NetAddress) { sw.Logger.Error("Failed to reconnect to peer. Beginning exponential backoff", "addr", addr, "elapsed", time.Since(start)) - for i := 0; i < reconnectBackOffAttempts; i++ { + for i := 1; i <= reconnectBackOffAttempts; i++ { if !sw.IsRunning() { return } diff --git a/privval/signer_dialer_endpoint.go b/privval/signer_dialer_endpoint.go index 9afb3aaa3ff..997c15750f6 100644 --- a/privval/signer_dialer_endpoint.go +++ b/privval/signer_dialer_endpoint.go @@ -60,7 +60,7 @@ func NewSignerDialerEndpoint( } sd.BaseService = *service.NewBaseService(logger, "SignerDialerEndpoint", sd) - sd.signerEndpoint.timeoutReadWrite = defaultTimeoutReadWriteSeconds * time.Second + sd.timeoutReadWrite = defaultTimeoutReadWriteSeconds * time.Second for _, optionFunc := range options { optionFunc(sd) diff --git a/privval/signer_listener_endpoint.go b/privval/signer_listener_endpoint.go index 8e7f4235638..3a8525bab24 100644 --- a/privval/signer_listener_endpoint.go +++ b/privval/signer_listener_endpoint.go @@ -20,7 +20,7 @@ type SignerListenerEndpointOption func(*SignerListenerEndpoint) // // Default: 5s func SignerListenerEndpointTimeoutReadWrite(timeout time.Duration) SignerListenerEndpointOption { - return func(sl *SignerListenerEndpoint) { sl.signerEndpoint.timeoutReadWrite = timeout } + return func(sl *SignerListenerEndpoint) { sl.timeoutReadWrite = timeout } } // SignerListenerEndpoint listens for an external process to dial in and keeps @@ -55,7 +55,7 @@ func NewSignerListenerEndpoint( } sl.BaseService = *service.NewBaseService(logger, "SignerListenerEndpoint", sl) - sl.signerEndpoint.timeoutReadWrite = defaultTimeoutReadWriteSeconds * time.Second + sl.timeoutReadWrite = defaultTimeoutReadWriteSeconds * time.Second for _, optionFunc := range options { optionFunc(sl) @@ -70,7 +70,7 @@ func (sl *SignerListenerEndpoint) OnStart() error { sl.connectionAvailableCh = make(chan net.Conn) // NOTE: ping timeout must be less than read/write timeout. - sl.pingInterval = time.Duration(sl.signerEndpoint.timeoutReadWrite.Milliseconds()*2/3) * time.Millisecond + sl.pingInterval = time.Duration(sl.timeoutReadWrite.Milliseconds()*2/3) * time.Millisecond sl.pingTimer = time.NewTicker(sl.pingInterval) go sl.serviceLoop() diff --git a/privval/signer_listener_endpoint_test.go b/privval/signer_listener_endpoint_test.go index c0f62b0ff24..49a3adc0d4a 100644 --- a/privval/signer_listener_endpoint_test.go +++ b/privval/signer_listener_endpoint_test.go @@ -193,10 +193,8 @@ func TestDuplicateListenReject(t *testing.T) { assert.True(t, signerServer2.IsRunning()) // wait for successful connection - for { - if listenerEndpoint.IsConnected() { - break - } + for !listenerEndpoint.IsConnected() { + } // simulate ensureConnection, bypass triggerConnect default drop with multiple messages diff --git a/privval/signer_requestHandler.go b/privval/signer_requestHandler.go index e4e6afe044a..88857b6d566 100644 --- a/privval/signer_requestHandler.go +++ b/privval/signer_requestHandler.go @@ -37,10 +37,6 @@ func DefaultValidationRequestHandler( return res, err } pk, err := cryptoenc.PubKeyToProto(pubKey) - if err != nil { - return res, err - } - if err != nil { res = mustWrapMsg(&privvalproto.PubKeyResponse{ PubKey: cryptoproto.PublicKey{}, Error: &privvalproto.RemoteSignerError{Code: 0, Description: err.Error()}}) diff --git a/privval/socket_listeners.go b/privval/socket_listeners.go index 6d406bd6925..0be86453d25 100644 --- a/privval/socket_listeners.go +++ b/privval/socket_listeners.go @@ -169,7 +169,7 @@ func newTimeoutConn(conn net.Conn, timeout time.Duration) *timeoutConn { func (c timeoutConn) Read(b []byte) (n int, err error) { // Reset deadline deadline := time.Now().Add(c.timeout) - err = c.Conn.SetReadDeadline(deadline) + err = c.SetReadDeadline(deadline) if err != nil { return } @@ -181,7 +181,7 @@ func (c timeoutConn) Read(b []byte) (n int, err error) { func (c timeoutConn) Write(b []byte) (n int, err error) { // Reset deadline deadline := time.Now().Add(c.timeout) - err = c.Conn.SetWriteDeadline(deadline) + err = c.SetWriteDeadline(deadline) if err != nil { return } diff --git a/proxy/mocks/app_conn_consensus.go b/proxy/mocks/app_conn_consensus.go index 7fc45d48cf0..728aea330f4 100644 --- a/proxy/mocks/app_conn_consensus.go +++ b/proxy/mocks/app_conn_consensus.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -19,6 +19,10 @@ type AppConnConsensus struct { func (_m *AppConnConsensus) Commit(_a0 context.Context) (*types.ResponseCommit, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 *types.ResponseCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*types.ResponseCommit, error)); ok { @@ -123,6 +127,10 @@ func (_m *AppConnConsensus) DoesSubAccountBelongToVal(_a0 context.Context, _a1 * func (_m *AppConnConsensus) Error() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Error") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -137,6 +145,10 @@ func (_m *AppConnConsensus) Error() error { func (_m *AppConnConsensus) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ExtendVote") + } + var r0 *types.ResponseExtendVote var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestExtendVote) (*types.ResponseExtendVote, error)); ok { @@ -189,6 +201,10 @@ func (_m *AppConnConsensus) FetchOracleVotes(_a0 context.Context, _a1 *types.Req func (_m *AppConnConsensus) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for FinalizeBlock") + } + var r0 *types.ResponseFinalizeBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error)); ok { @@ -215,6 +231,10 @@ func (_m *AppConnConsensus) FinalizeBlock(_a0 context.Context, _a1 *types.Reques func (_m *AppConnConsensus) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for InitChain") + } + var r0 *types.ResponseInitChain var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInitChain) (*types.ResponseInitChain, error)); ok { @@ -241,6 +261,10 @@ func (_m *AppConnConsensus) InitChain(_a0 context.Context, _a1 *types.RequestIni func (_m *AppConnConsensus) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for PrepareProposal") + } + var r0 *types.ResponsePrepareProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error)); ok { @@ -267,6 +291,10 @@ func (_m *AppConnConsensus) PrepareProposal(_a0 context.Context, _a1 *types.Requ func (_m *AppConnConsensus) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ProcessProposal") + } + var r0 *types.ResponseProcessProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestProcessProposal) (*types.ResponseProcessProposal, error)); ok { @@ -319,6 +347,10 @@ func (_m *AppConnConsensus) ValidateOracleVotes(_a0 context.Context, _a1 *types. func (_m *AppConnConsensus) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for VerifyVoteExtension") + } + var r0 *types.ResponseVerifyVoteExtension var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error)); ok { @@ -341,13 +373,12 @@ func (_m *AppConnConsensus) VerifyVoteExtension(_a0 context.Context, _a1 *types. return r0, r1 } -type mockConstructorTestingTNewAppConnConsensus interface { +// NewAppConnConsensus creates a new instance of AppConnConsensus. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewAppConnConsensus(t interface { mock.TestingT Cleanup(func()) -} - -// NewAppConnConsensus creates a new instance of AppConnConsensus. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAppConnConsensus(t mockConstructorTestingTNewAppConnConsensus) *AppConnConsensus { +}) *AppConnConsensus { mock := &AppConnConsensus{} mock.Mock.Test(t) diff --git a/proxy/mocks/app_conn_mempool.go b/proxy/mocks/app_conn_mempool.go index 281ff21c9f9..383785abd58 100644 --- a/proxy/mocks/app_conn_mempool.go +++ b/proxy/mocks/app_conn_mempool.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -21,6 +21,10 @@ type AppConnMempool struct { func (_m *AppConnMempool) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 *types.ResponseCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)); ok { @@ -47,6 +51,10 @@ func (_m *AppConnMempool) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx func (_m *AppConnMempool) CheckTxAsync(_a0 context.Context, _a1 *types.RequestCheckTx) (*abcicli.ReqRes, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTxAsync") + } + var r0 *abcicli.ReqRes var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*abcicli.ReqRes, error)); ok { @@ -69,10 +77,14 @@ func (_m *AppConnMempool) CheckTxAsync(_a0 context.Context, _a1 *types.RequestCh return r0, r1 } -// Error provides a mock function with given fields: +// Error provides a mock function with no fields func (_m *AppConnMempool) Error() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Error") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -87,6 +99,10 @@ func (_m *AppConnMempool) Error() error { func (_m *AppConnMempool) Flush(_a0 context.Context) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Flush") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(_a0) @@ -102,13 +118,12 @@ func (_m *AppConnMempool) SetResponseCallback(_a0 abcicli.Callback) { _m.Called(_a0) } -type mockConstructorTestingTNewAppConnMempool interface { +// NewAppConnMempool creates a new instance of AppConnMempool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewAppConnMempool(t interface { mock.TestingT Cleanup(func()) -} - -// NewAppConnMempool creates a new instance of AppConnMempool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAppConnMempool(t mockConstructorTestingTNewAppConnMempool) *AppConnMempool { +}) *AppConnMempool { mock := &AppConnMempool{} mock.Mock.Test(t) diff --git a/proxy/mocks/app_conn_query.go b/proxy/mocks/app_conn_query.go index b10838ac01e..75bacca9259 100644 --- a/proxy/mocks/app_conn_query.go +++ b/proxy/mocks/app_conn_query.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -19,6 +19,10 @@ type AppConnQuery struct { func (_m *AppConnQuery) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Echo") + } + var r0 *types.ResponseEcho var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*types.ResponseEcho, error)); ok { @@ -41,10 +45,14 @@ func (_m *AppConnQuery) Echo(_a0 context.Context, _a1 string) (*types.ResponseEc return r0, r1 } -// Error provides a mock function with given fields: +// Error provides a mock function with no fields func (_m *AppConnQuery) Error() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Error") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -59,6 +67,10 @@ func (_m *AppConnQuery) Error() error { func (_m *AppConnQuery) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.ResponseInfo, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Info") + } + var r0 *types.ResponseInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInfo) (*types.ResponseInfo, error)); ok { @@ -85,6 +97,10 @@ func (_m *AppConnQuery) Info(_a0 context.Context, _a1 *types.RequestInfo) (*type func (_m *AppConnQuery) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.ResponseQuery, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 *types.ResponseQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestQuery) (*types.ResponseQuery, error)); ok { @@ -107,13 +123,12 @@ func (_m *AppConnQuery) Query(_a0 context.Context, _a1 *types.RequestQuery) (*ty return r0, r1 } -type mockConstructorTestingTNewAppConnQuery interface { +// NewAppConnQuery creates a new instance of AppConnQuery. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewAppConnQuery(t interface { mock.TestingT Cleanup(func()) -} - -// NewAppConnQuery creates a new instance of AppConnQuery. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAppConnQuery(t mockConstructorTestingTNewAppConnQuery) *AppConnQuery { +}) *AppConnQuery { mock := &AppConnQuery{} mock.Mock.Test(t) diff --git a/proxy/mocks/app_conn_snapshot.go b/proxy/mocks/app_conn_snapshot.go index cb313d522d5..cf894ac6fa9 100644 --- a/proxy/mocks/app_conn_snapshot.go +++ b/proxy/mocks/app_conn_snapshot.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -19,6 +19,10 @@ type AppConnSnapshot struct { func (_m *AppConnSnapshot) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ApplySnapshotChunk") + } + var r0 *types.ResponseApplySnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)); ok { @@ -41,10 +45,14 @@ func (_m *AppConnSnapshot) ApplySnapshotChunk(_a0 context.Context, _a1 *types.Re return r0, r1 } -// Error provides a mock function with given fields: +// Error provides a mock function with no fields func (_m *AppConnSnapshot) Error() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Error") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -59,6 +67,10 @@ func (_m *AppConnSnapshot) Error() error { func (_m *AppConnSnapshot) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListSnapshots") + } + var r0 *types.ResponseListSnapshots var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestListSnapshots) (*types.ResponseListSnapshots, error)); ok { @@ -85,6 +97,10 @@ func (_m *AppConnSnapshot) ListSnapshots(_a0 context.Context, _a1 *types.Request func (_m *AppConnSnapshot) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for LoadSnapshotChunk") + } + var r0 *types.ResponseLoadSnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)); ok { @@ -111,6 +127,10 @@ func (_m *AppConnSnapshot) LoadSnapshotChunk(_a0 context.Context, _a1 *types.Req func (_m *AppConnSnapshot) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for OfferSnapshot") + } + var r0 *types.ResponseOfferSnapshot var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)); ok { @@ -133,13 +153,12 @@ func (_m *AppConnSnapshot) OfferSnapshot(_a0 context.Context, _a1 *types.Request return r0, r1 } -type mockConstructorTestingTNewAppConnSnapshot interface { +// NewAppConnSnapshot creates a new instance of AppConnSnapshot. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewAppConnSnapshot(t interface { mock.TestingT Cleanup(func()) -} - -// NewAppConnSnapshot creates a new instance of AppConnSnapshot. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAppConnSnapshot(t mockConstructorTestingTNewAppConnSnapshot) *AppConnSnapshot { +}) *AppConnSnapshot { mock := &AppConnSnapshot{} mock.Mock.Test(t) diff --git a/proxy/mocks/client_creator.go b/proxy/mocks/client_creator.go index 798afe88fb2..6a873f5a301 100644 --- a/proxy/mocks/client_creator.go +++ b/proxy/mocks/client_creator.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -12,10 +12,14 @@ type ClientCreator struct { mock.Mock } -// NewABCIClient provides a mock function with given fields: +// NewABCIClient provides a mock function with no fields func (_m *ClientCreator) NewABCIClient() (abcicli.Client, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NewABCIClient") + } + var r0 abcicli.Client var r1 error if rf, ok := ret.Get(0).(func() (abcicli.Client, error)); ok { @@ -38,13 +42,12 @@ func (_m *ClientCreator) NewABCIClient() (abcicli.Client, error) { return r0, r1 } -type mockConstructorTestingTNewClientCreator interface { +// NewClientCreator creates a new instance of ClientCreator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewClientCreator(t interface { mock.TestingT Cleanup(func()) -} - -// NewClientCreator creates a new instance of ClientCreator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewClientCreator(t mockConstructorTestingTNewClientCreator) *ClientCreator { +}) *ClientCreator { mock := &ClientCreator{} mock.Mock.Test(t) diff --git a/proxy/multi_app_conn_test.go b/proxy/multi_app_conn_test.go index 2c6e3e51ef0..5a813c06867 100644 --- a/proxy/multi_app_conn_test.go +++ b/proxy/multi_app_conn_test.go @@ -53,8 +53,7 @@ func TestAppConns_Failure(t *testing.T) { }() quitCh := make(chan struct{}) - var recvQuitCh <-chan struct{} //nolint:gosimple - recvQuitCh = quitCh + var recvQuitCh <-chan struct{} = quitCh clientCreatorMock := &mocks.ClientCreator{} diff --git a/rpc/client/event_test.go b/rpc/client/event_test.go index ca38b8e0e46..f9698529045 100644 --- a/rpc/client/event_test.go +++ b/rpc/client/event_test.go @@ -89,10 +89,10 @@ func TestBlockEvents(t *testing.T) { block := blockEvent.Block if firstBlockHeight == 0 { - firstBlockHeight = block.Header.Height + firstBlockHeight = block.Height } - require.Equal(t, firstBlockHeight+i, block.Header.Height) + require.Equal(t, firstBlockHeight+i, block.Height) } }) } diff --git a/rpc/client/helpers_test.go b/rpc/client/helpers_test.go index 65f55a4c32a..6743384f91e 100644 --- a/rpc/client/helpers_test.go +++ b/rpc/client/helpers_test.go @@ -53,7 +53,7 @@ func TestWaitForHeight(t *testing.T) { // we use the callback to update the status height myWaiter := func(delta int64) error { // update the height for the next call - m.Call.Response = &ctypes.ResultStatus{SyncInfo: ctypes.SyncInfo{LatestBlockHeight: 15}} + m.Response = &ctypes.ResultStatus{SyncInfo: ctypes.SyncInfo{LatestBlockHeight: 15}} return client.DefaultWaitStrategy(delta) } diff --git a/rpc/client/local/local.go b/rpc/client/local/local.go index 7115af1deb8..a32dbe9691c 100644 --- a/rpc/client/local/local.go +++ b/rpc/client/local/local.go @@ -232,7 +232,7 @@ func (c *Local) Subscribe( if outCap > 0 { sub, err = c.EventBus.Subscribe(ctx, subscriber, q, outCap) } else { - sub, err = c.EventBus.SubscribeUnbuffered(ctx, subscriber, q) + sub, err = c.SubscribeUnbuffered(ctx, subscriber, q) } if err != nil { return nil, fmt.Errorf("failed to subscribe: %w", err) diff --git a/rpc/client/rpc_test.go b/rpc/client/rpc_test.go index 8832ef040c1..c85f0259598 100644 --- a/rpc/client/rpc_test.go +++ b/rpc/client/rpc_test.go @@ -277,9 +277,9 @@ func TestAppCalls(t *testing.T) { // and we can even check the block is added block, err := c.Block(context.Background(), &apph) require.NoError(err) - appHash := block.Block.Header.AppHash + appHash := block.Block.AppHash assert.True(len(appHash) > 0) - assert.EqualValues(apph, block.Block.Header.Height) + assert.EqualValues(apph, block.Block.Height) blockByHash, err := c.BlockByHash(context.Background(), block.BlockID.Hash) require.NoError(err) @@ -311,14 +311,14 @@ func TestAppCalls(t *testing.T) { lastMeta := info.BlockMetas[0] assert.EqualValues(apph, lastMeta.Header.Height) blockData := block.Block - assert.Equal(blockData.Header.AppHash, lastMeta.Header.AppHash) + assert.Equal(blockData.AppHash, lastMeta.Header.AppHash) assert.Equal(block.BlockID, lastMeta.BlockID) } // and get the corresponding commit with the same apphash commit, err := c.Commit(context.Background(), &apph) require.NoError(err) - cappHash := commit.Header.AppHash + cappHash := commit.AppHash assert.Equal(appHash, cappHash) assert.NotNil(commit.Commit) diff --git a/rpc/core/tx.go b/rpc/core/tx.go index fdd38e327bc..ce881360dbd 100644 --- a/rpc/core/tx.go +++ b/rpc/core/tx.go @@ -36,7 +36,7 @@ func (env *Environment) Tx(_ *rpctypes.Context, hash []byte, prove bool) (*ctype if prove { block := env.BlockStore.LoadBlock(r.Height) if block != nil { - proof = block.Data.Txs.Proof(int(r.Index)) + proof = block.Txs.Proof(int(r.Index)) } } @@ -117,7 +117,7 @@ func (env *Environment) TxSearch( if prove { block := env.BlockStore.LoadBlock(r.Height) if block != nil { - proof = block.Data.Txs.Proof(int(r.Index)) + proof = block.Txs.Proof(int(r.Index)) } } diff --git a/rpc/jsonrpc/client/http_json_client.go b/rpc/jsonrpc/client/http_json_client.go index a41d385cc40..ff91a11ca59 100644 --- a/rpc/jsonrpc/client/http_json_client.go +++ b/rpc/jsonrpc/client/http_json_client.go @@ -99,9 +99,10 @@ func (u parsedURL) GetDialAddress() string { // http and ws default to port 80, https and wss default to port 443 // https://www.rfc-editor.org/rfc/rfc9110#section-4.2 // https://www.rfc-editor.org/rfc/rfc6455.html#section-3 - if u.Scheme == protoHTTP || u.Scheme == protoWS { + switch u.Scheme { + case protoHTTP, protoWS: return u.Host + `:80` - } else if u.Scheme == protoHTTPS || u.Scheme == protoWSS { + case protoHTTPS, protoWSS: return u.Host + `:443` } } diff --git a/rpc/jsonrpc/jsonrpc_test.go b/rpc/jsonrpc/jsonrpc_test.go index 1f12c817a0d..7fd1e9f3844 100644 --- a/rpc/jsonrpc/jsonrpc_test.go +++ b/rpc/jsonrpc/jsonrpc_test.go @@ -108,9 +108,10 @@ func TestMain(m *testing.M) { var colorFn = func(keyvals ...interface{}) term.FgBgColor { for i := 0; i < len(keyvals)-1; i += 2 { if keyvals[i] == "socket" { - if keyvals[i+1] == "tcp" { + switch keyvals[i+1] { + case "tcp": return term.FgBgColor{Fg: term.DarkBlue} - } else if keyvals[i+1] == "unix" { + case "unix": return term.FgBgColor{Fg: term.DarkCyan} } } diff --git a/rpc/jsonrpc/server/http_json_handler.go b/rpc/jsonrpc/server/http_json_handler.go index 0151d12e51d..d4199945e37 100644 --- a/rpc/jsonrpc/server/http_json_handler.go +++ b/rpc/jsonrpc/server/http_json_handler.go @@ -236,7 +236,7 @@ func writeListOfEndpoints(w http.ResponseWriter, r *http.Request, funcMap map[st for _, name := range noArgNames { link := fmt.Sprintf("//%s/%s", r.Host, name) - buf.WriteString(fmt.Sprintf("%s
", link, link)) + fmt.Fprintf(buf, "%s
", link, link) } buf.WriteString("
Endpoints that require arguments:
") @@ -249,7 +249,7 @@ func writeListOfEndpoints(w http.ResponseWriter, r *http.Request, funcMap map[st link += "&" } } - buf.WriteString(fmt.Sprintf("%s
", link, link)) + fmt.Fprintf(buf, "%s
", link, link) } buf.WriteString("") w.Header().Set("Content-Type", "text/html") diff --git a/scripts/metricsgen/metricsgen.go b/scripts/metricsgen/metricsgen.go index a30c2107ba2..b8ce0091c0c 100644 --- a/scripts/metricsgen/metricsgen.go +++ b/scripts/metricsgen/metricsgen.go @@ -169,8 +169,6 @@ func ParseMetricsDir(dir string, structName string) (TemplateData, error) { // Grab the package name. var pkgName string var pkg *ast.Package //nolint:staticcheck - // TODO(thane): Figure out a more readable way of implementing this. - //nolint:revive for pkgName, pkg = range d { } td := TemplateData{ diff --git a/scripts/mockery_generate.sh b/scripts/mockery_generate.sh index 2509e0cdbeb..c830c48f153 100755 --- a/scripts/mockery_generate.sh +++ b/scripts/mockery_generate.sh @@ -2,5 +2,4 @@ # # Invoke Mockery v2 to update generated mocks for the given type. -go run github.com/vektra/mockery/v2 --disable-version-string --case underscore --name "$*" - +go run github.com/vektra/mockery/v2@v2.53.0 --name "$*" diff --git a/scripts/wal2json/main.go b/scripts/wal2json/main.go index 7c2c3c87c7e..2145fd4b827 100644 --- a/scripts/wal2json/main.go +++ b/scripts/wal2json/main.go @@ -49,7 +49,7 @@ func main() { if err == nil { if endMsg, ok := msg.Msg.(cs.EndHeightMessage); ok { - _, err = os.Stdout.Write([]byte(fmt.Sprintf("ENDHEIGHT %d\n", endMsg.Height))) + _, err = fmt.Fprintf(os.Stdout, "ENDHEIGHT %d\n", endMsg.Height) } } diff --git a/spec/abci/abci++_methods.md b/spec/abci/abci++_methods.md index d9d6eb9ea08..ca4614069cf 100644 --- a/spec/abci/abci++_methods.md +++ b/spec/abci/abci++_methods.md @@ -709,8 +709,8 @@ Most of the data structures used in ABCI are shared [common data structures](../ * **Usage**: * Validator identified by address - * Used as part of VoteInfo within `CommitInfo` (used in `ProcessProposal` and `FinalizeBlock`), - and `ExtendedCommitInfo` (used in `PrepareProposal`). + * Used as part of `VoteInfo` within `CommitInfo` (used in `ProcessProposal` + and `FinalizeBlock`), and `ExtendedCommitInfo` (used in `PrepareProposal`). * Does not include PubKey to avoid sending potentially large quantum pubkeys over the ABCI @@ -804,10 +804,10 @@ Most of the data structures used in ABCI are shared [common data structures](../ * **Fields**: - | Name | Type | Description | Field Number | - |-------------------|-------------------------|---------------------------------------------------------------|--------------| - | validator | [Validator](#validator) | The validator that sent the vote. | 1 | - | signed_last_block | bool | Indicates whether or not the validator signed the last block. | 2 | + | Name | Type | Description | Field Number | + |---------------|-------------------------------------------------------|------------------------------------------------------------------------------------------|--------------| + | validator | [Validator](#validator) | The validator that sent the vote. | 1 | + | block_id_flag | [BlockIDFlag](../core/data_structures.md#blockidflag) | Indicates whether the validator voted the last block, nil, or its vote was not received. | 3 | * **Usage**: * Indicates whether a validator signed the last block, allowing for rewards based on validator availability. @@ -817,16 +817,18 @@ Most of the data structures used in ABCI are shared [common data structures](../ * **Fields**: - | Name | Type | Description | Field Number | - |-------------------|-------------------------|------------------------------------------------------------------------------|--------------| - | validator | [Validator](#validator) | The validator that sent the vote. | 1 | - | signed_last_block | bool | Indicates whether or not the validator signed the last block. | 2 | - | vote_extension | bytes | Non-deterministic extension provided by the sending validator's Application. | 3 | + | Name | Type | Description | Field Number | + |---------------------|-------------------------------------------------------|---------------------------------------------------------------------------------------------|--------------| + | validator | [Validator](#validator) | The validator that sent the vote. | 1 | + | vote_extension | bytes | Non-deterministic extension provided by the sending validator's Application. | 3 | + | extension_signature | bytes | Signature of the vote extension produced by the sending validator and verified by CometBFT. | 4 | + | block_id_flag | [BlockIDFlag](../core/data_structures.md#blockidflag) | Indicates whether the validator voted the last block, nil, or its vote was not received. | 5 | * **Usage**: * Indicates whether a validator signed the last block, allowing for rewards based on validator availability. * This information is extracted from CometBFT's data structures in the local process. - * `vote_extension` contains the sending validator's vote extension, which is signed by CometBFT. It can be empty + * `vote_extension` contains the sending validator's vote extension, whose signature was verified by CometBFT. It can be empty. + * `extension_signature` is the signature of the vote extension, which was verified verified by CometBFT. This way, we expose the signature to the application for further processing or verification. ### CommitInfo diff --git a/state/compatibility_test.go b/state/compatibility_test.go index 79846abfed5..34375ff78ea 100644 --- a/state/compatibility_test.go +++ b/state/compatibility_test.go @@ -67,7 +67,7 @@ func (multi MultiStore) SaveABCIResponses(height int64, abciResponses *cmtstate. // If the flag is false then we save the ABCIResponse. This can be used for the /block_results // query or to reindex an event using the command line. - if !multi.StoreOptions.DiscardABCIResponses { + if !multi.DiscardABCIResponses { bz, err := abciResponses.Marshal() if err != nil { return err diff --git a/state/execution.go b/state/execution.go index 302dd2cb832..9473ca3b916 100644 --- a/state/execution.go +++ b/state/execution.go @@ -132,7 +132,10 @@ func (blockExec *BlockExecutor) CreateProposalBlock( txs := blockExec.mempool.ReapMaxBytesMaxGas(maxReapBytes, maxGas) commit := lastExtCommit.ToCommit() - block := state.MakeBlock(height, txs, commit, evidence, proposerAddr) + block, err := state.MakeBlock(height, txs, commit, evidence, proposerAddr) + if err != nil { + return nil, err + } txSlice := block.Txs.ToSliceOfBytes() rpp, err := blockExec.proxyApp.PrepareProposal( ctx, @@ -200,7 +203,7 @@ func (blockExec *BlockExecutor) CreateProposalBlock( txl = append([]types.Tx{CreateOracleResultTx}, txl...) } - return state.MakeBlock(height, txl, commit, evidence, proposerAddr), nil + return state.MakeBlock(height, txl, commit, evidence, proposerAddr) } func (blockExec *BlockExecutor) ProcessProposal( @@ -209,9 +212,9 @@ func (blockExec *BlockExecutor) ProcessProposal( ) (bool, error) { resp, err := blockExec.proxyApp.ProcessProposal(context.TODO(), &abci.RequestProcessProposal{ Hash: block.Header.Hash(), - Height: block.Header.Height, - Time: block.Header.Time, - Txs: block.Data.Txs.ToSliceOfBytes(), + Height: block.Height, + Time: block.Time, + Txs: block.Txs.ToSliceOfBytes(), ProposedLastCommit: buildLastCommitInfoFromStore(block, blockExec.store, state.InitialHeight), Misbehavior: block.Evidence.Evidence.ToABCI(), ProposerAddress: block.ProposerAddress, @@ -291,8 +294,8 @@ func (blockExec *BlockExecutor) applyBlock(state State, blockID types.BlockID, b ) // Assert that the application correctly returned tx results for each of the transactions provided in the block - if len(block.Data.Txs) != len(abciResponse.TxResults) { - return state, fmt.Errorf("expected tx results length to match size of transactions in block. Expected %d, got %d", len(block.Data.Txs), len(abciResponse.TxResults)) + if len(block.Txs) != len(abciResponse.TxResults) { + return state, fmt.Errorf("expected tx results length to match size of transactions in block. Expected %d, got %d", len(block.Txs), len(abciResponse.TxResults)) } blockExec.logger.Info("executed block", "height", block.Height, "app_hash", fmt.Sprintf("%X", abciResponse.AppHash)) @@ -748,7 +751,7 @@ func fireEvents( } } - for i, tx := range block.Data.Txs { + for i, tx := range block.Txs { if err := eventBus.PublishEventTx(types.EventDataTx{TxResult: abci.TxResult{ Height: block.Height, Index: uint32(i), @@ -797,8 +800,8 @@ func ExecCommitBlock( } // Assert that the application correctly returned tx results for each of the transactions provided in the block - if len(block.Data.Txs) != len(resp.TxResults) { - return nil, fmt.Errorf("expected tx results length to match size of transactions in block. Expected %d, got %d", len(block.Data.Txs), len(resp.TxResults)) + if len(block.Txs) != len(resp.TxResults) { + return nil, fmt.Errorf("expected tx results length to match size of transactions in block. Expected %d, got %d", len(block.Txs), len(resp.TxResults)) } logger.Info("executed block", "height", block.Height, "app_hash", fmt.Sprintf("%X", resp.AppHash)) diff --git a/state/execution_test.go b/state/execution_test.go index 87f20f2880a..0e2b6fe4911 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -22,6 +22,7 @@ import ( "github.com/cometbft/cometbft/internal/test" "github.com/cometbft/cometbft/libs/log" mpmocks "github.com/cometbft/cometbft/mempool/mocks" + oracleproto "github.com/cometbft/cometbft/proto/tendermint/oracle" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" cmtversion "github.com/cometbft/cometbft/proto/tendermint/version" "github.com/cometbft/cometbft/proxy" @@ -41,6 +42,12 @@ var ( testPartSize uint32 = types.BlockPartSizeBytes ) +var EMPTY_ORACLE_INFO = oracletypes.OracleInfo{ + GossipVoteBuffer: &oracletypes.GossipVoteBuffer{ + Buffer: make(map[string]*oracleproto.GossipedVotes), + }, +} + func TestApplyBlock(t *testing.T) { app := &testApp{} cc := proxy.NewLocalClientCreator(app) @@ -72,7 +79,8 @@ func TestApplyBlock(t *testing.T) { blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(), mp, &oracleInfo, sm.EmptyEvidencePool{}, blockStore) - block := makeBlock(state, 1, new(types.Commit)) + block, err := makeBlock(state, 1, new(types.Commit)) + require.NoError(t, err) bps, err := block.MakePartSet(testPartSize) require.NoError(t, err) blockID := types.BlockID{Hash: block.Hash(), PartSetHeader: bps.Header()} @@ -147,7 +155,8 @@ func TestFinalizeBlockDecidedLastCommit(t *testing.T) { } // block for height 2 - block := makeBlock(state, 2, lastCommit.ToCommit()) + block, err := makeBlock(state, 2, lastCommit.ToCommit()) + require.NoError(t, err) bps, err := block.MakePartSet(testPartSize) require.NoError(t, err) blockID := types.BlockID{Hash: block.Hash(), PartSetHeader: bps.Header()} @@ -227,7 +236,8 @@ func TestFinalizeBlockValidators(t *testing.T) { } // block for height 2 - block := makeBlock(state, 2, lastCommit.ToCommit()) + block, err := makeBlock(state, 2, lastCommit.ToCommit()) + require.NoError(t, err) _, err = sm.ExecCommitBlock(proxyApp.Consensus(), block, log.TestingLogger(), stateStore, 1) require.NoError(t, err, tc.desc) @@ -353,9 +363,10 @@ func TestFinalizeBlockMisbehavior(t *testing.T) { blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(), mp, &oracleInfo, evpool, blockStore) - block := makeBlock(state, 1, new(types.Commit)) + block, err := makeBlock(state, 1, new(types.Commit)) + require.NoError(t, err) block.Evidence = types.EvidenceData{Evidence: ev} - block.Header.EvidenceHash = block.Evidence.Hash() + block.EvidenceHash = block.Evidence.Hash() bps, err := block.MakePartSet(testPartSize) require.NoError(t, err) @@ -403,7 +414,8 @@ func TestProcessProposal(t *testing.T) { blockStore, ) - block0 := makeBlock(state, height-1, new(types.Commit)) + block0, err := makeBlock(state, height-1, new(types.Commit)) + require.NoError(t, err) lastCommitSig := []types.CommitSig{} partSet, err := block0.MakePartSet(types.BlockPartSizeBytes) require.NoError(t, err) @@ -413,7 +425,7 @@ func TestProcessProposal(t *testing.T) { pk, err := privVal.GetPubKey() require.NoError(t, err) idx, _ := state.Validators.GetByAddress(pk.Address()) - vote := types.MakeVoteNoError(t, privVal, block0.Header.ChainID, idx, height-1, 0, 2, blockID, time.Now()) + vote := types.MakeVoteNoError(t, privVal, block0.ChainID, idx, height-1, 0, 2, blockID, time.Now()) addr := pk.Address() voteInfos = append(voteInfos, abci.VoteInfo{ @@ -426,18 +438,19 @@ func TestProcessProposal(t *testing.T) { lastCommitSig = append(lastCommitSig, vote.CommitSig()) } - block1 := makeBlock(state, height, &types.Commit{ + block1, err := makeBlock(state, height, &types.Commit{ Height: height - 1, Signatures: lastCommitSig, }) + require.NoError(t, err) block1.Txs = txs expectedRpp := &abci.RequestProcessProposal{ Txs: block1.Txs.ToSliceOfBytes(), Hash: block1.Hash(), - Height: block1.Header.Height, - Time: block1.Header.Time, + Height: block1.Height, + Time: block1.Time, Misbehavior: block1.Evidence.Evidence.ToABCI(), ProposedLastCommit: abci.CommitInfo{ Round: 0, @@ -637,7 +650,8 @@ func TestFinalizeBlockValidatorUpdates(t *testing.T) { ) require.NoError(t, err) - block := makeBlock(state, 1, new(types.Commit)) + block, err := makeBlock(state, 1, new(types.Commit)) + require.NoError(t, err) bps, err := block.MakePartSet(testPartSize) require.NoError(t, err) blockID := types.BlockID{Hash: block.Hash(), PartSetHeader: bps.Header()} @@ -703,7 +717,8 @@ func TestFinalizeBlockValidatorUpdatesResultingInEmptySet(t *testing.T) { blockStore, ) - block := makeBlock(state, 1, new(types.Commit)) + block, err := makeBlock(state, 1, new(types.Commit)) + require.NoError(t, err) bps, err := block.MakePartSet(testPartSize) require.NoError(t, err) blockID := types.BlockID{Hash: block.Hash(), PartSetHeader: bps.Header()} @@ -749,15 +764,13 @@ func TestEmptyPrepareProposal(t *testing.T) { mock.Anything).Return(nil) mp.On("ReapMaxBytesMaxGas", mock.Anything, mock.Anything).Return(types.Txs{}) - oracleInfo := oracletypes.OracleInfo{} - blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.TestingLogger(), proxyApp.Consensus(), mp, - &oracleInfo, + &EMPTY_ORACLE_INFO, sm.EmptyEvidencePool{}, blockStore, ) @@ -797,15 +810,13 @@ func TestPrepareProposalTxsAllIncluded(t *testing.T) { require.NoError(t, err) defer proxyApp.Stop() //nolint:errcheck // ignore for tests - oracleInfo := oracletypes.OracleInfo{} - blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.TestingLogger(), proxyApp.Consensus(), mp, - &oracleInfo, + &EMPTY_ORACLE_INFO, evpool, blockStore, ) @@ -815,7 +826,7 @@ func TestPrepareProposalTxsAllIncluded(t *testing.T) { block, err := blockExec.CreateProposalBlock(ctx, height, state, commit, pa) require.NoError(t, err) - for i, tx := range block.Data.Txs { + for i, tx := range block.Txs { require.Equal(t, txs[i], tx) } @@ -855,15 +866,13 @@ func TestPrepareProposalReorderTxs(t *testing.T) { require.NoError(t, err) defer proxyApp.Stop() //nolint:errcheck // ignore for tests - oracleInfo := oracletypes.OracleInfo{} - blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.TestingLogger(), proxyApp.Consensus(), mp, - &oracleInfo, + &EMPTY_ORACLE_INFO, evpool, blockStore, ) @@ -872,7 +881,7 @@ func TestPrepareProposalReorderTxs(t *testing.T) { require.NoError(t, err) block, err := blockExec.CreateProposalBlock(ctx, height, state, commit, pa) require.NoError(t, err) - for i, tx := range block.Data.Txs { + for i, tx := range block.Txs { require.Equal(t, txs[i], tx) } @@ -914,15 +923,13 @@ func TestPrepareProposalErrorOnTooManyTxs(t *testing.T) { require.NoError(t, err) defer proxyApp.Stop() //nolint:errcheck // ignore for tests - oracleInfo := oracletypes.OracleInfo{} - blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.NewNopLogger(), proxyApp.Consensus(), mp, - &oracleInfo, + &EMPTY_ORACLE_INFO, evpool, blockStore, ) @@ -974,14 +981,13 @@ func TestPrepareProposalCountSerializationOverhead(t *testing.T) { require.NoError(t, err) defer proxyApp.Stop() //nolint:errcheck // ignore for tests - oracleInfo := oracletypes.OracleInfo{} blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.NewNopLogger(), proxyApp.Consensus(), mp, - &oracleInfo, + &EMPTY_ORACLE_INFO, evpool, blockStore, ) @@ -1027,15 +1033,13 @@ func TestPrepareProposalErrorOnPrepareProposalError(t *testing.T) { require.NoError(t, err) defer proxyApp.Stop() //nolint:errcheck // ignore for tests - oracleInfo := oracletypes.OracleInfo{} - blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.NewNopLogger(), proxyApp.Consensus(), mp, - &oracleInfo, + &EMPTY_ORACLE_INFO, evpool, blockStore, ) @@ -1065,26 +1069,26 @@ func TestCreateProposalAbsentVoteExtensions(t *testing.T) { }{ { name: "missing extension data on first required height", - height: 2, - extensionEnableHeight: 1, + height: 3, + extensionEnableHeight: 2, expectPanic: true, }, { name: "missing extension during before required height", - height: 2, - extensionEnableHeight: 2, + height: 3, + extensionEnableHeight: 3, expectPanic: false, }, { name: "missing extension data and not required", - height: 2, + height: 3, extensionEnableHeight: 0, expectPanic: false, }, { name: "missing extension data and required in two heights", - height: 2, - extensionEnableHeight: 3, + height: 3, + extensionEnableHeight: 4, expectPanic: false, }, } { @@ -1119,19 +1123,18 @@ func TestCreateProposalAbsentVoteExtensions(t *testing.T) { mock.Anything).Return(nil) mp.On("ReapMaxBytesMaxGas", mock.Anything, mock.Anything).Return(types.Txs{}) - oracleInfo := oracletypes.OracleInfo{} - blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.NewNopLogger(), proxyApp.Consensus(), mp, - &oracleInfo, + &EMPTY_ORACLE_INFO, sm.EmptyEvidencePool{}, blockStore, ) - block := makeBlock(state, testCase.height, new(types.Commit)) + block, err := makeBlock(state, testCase.height, new(types.Commit)) + require.NoError(t, err) bps, err := block.MakePartSet(testPartSize) require.NoError(t, err) @@ -1141,7 +1144,8 @@ func TestCreateProposalAbsentVoteExtensions(t *testing.T) { stripSignatures(lastCommit) if testCase.expectPanic { require.Panics(t, func() { - blockExec.CreateProposalBlock(ctx, testCase.height, state, lastCommit, pa) //nolint:errcheck + _, err := blockExec.CreateProposalBlock(ctx, testCase.height, state, lastCommit, pa) + require.NoError(t, err) }) } else { _, err = blockExec.CreateProposalBlock(ctx, testCase.height, state, lastCommit, pa) diff --git a/state/helpers_test.go b/state/helpers_test.go index f094b79ab85..89bdf932c3d 100644 --- a/state/helpers_test.go +++ b/state/helpers_test.go @@ -56,7 +56,10 @@ func makeAndCommitGoodBlock( func makeAndApplyGoodBlock(state sm.State, height int64, lastCommit *types.Commit, proposerAddr []byte, blockExec *sm.BlockExecutor, evidence []types.Evidence, ) (sm.State, types.BlockID, error) { - block := state.MakeBlock(height, test.MakeNTxs(height, 10), lastCommit, evidence, proposerAddr) + block, err := state.MakeBlock(height, test.MakeNTxs(height, 10), lastCommit, evidence, proposerAddr) + if err != nil { + return state, types.BlockID{}, nil + } partSet, err := block.MakePartSet(types.BlockPartSizeBytes) if err != nil { return state, types.BlockID{}, err @@ -76,7 +79,7 @@ func makeAndApplyGoodBlock(state sm.State, height int64, lastCommit *types.Commi return state, blockID, nil } -func makeBlock(state sm.State, height int64, c *types.Commit) *types.Block { +func makeBlock(state sm.State, height int64, c *types.Commit) (*types.Block, error) { return state.MakeBlock( height, test.MakeNTxs(state.LastBlockHeight, 10), @@ -171,7 +174,10 @@ func makeHeaderPartsResponsesValPubKeyChange( state sm.State, pubkey crypto.PubKey, ) (types.Header, types.BlockID, *abci.ResponseFinalizeBlock) { - block := makeBlock(state, state.LastBlockHeight+1, new(types.Commit)) + block, err := makeBlock(state, state.LastBlockHeight+1, new(types.Commit)) + if err != nil { + return types.Header{}, types.BlockID{}, nil + } abciResponses := &abci.ResponseFinalizeBlock{} // If the pubkey is new, remove the old and add the new. _, val := state.NextValidators.GetByIndex(0) @@ -189,7 +195,10 @@ func makeHeaderPartsResponsesValPowerChange( state sm.State, power int64, ) (types.Header, types.BlockID, *abci.ResponseFinalizeBlock) { - block := makeBlock(state, state.LastBlockHeight+1, new(types.Commit)) + block, err := makeBlock(state, state.LastBlockHeight+1, new(types.Commit)) + if err != nil { + return types.Header{}, types.BlockID{}, nil + } abciResponses := &abci.ResponseFinalizeBlock{} // If the pubkey is new, remove the old and add the new. @@ -207,7 +216,10 @@ func makeHeaderPartsResponsesParams( state sm.State, params cmtproto.ConsensusParams, ) (types.Header, types.BlockID, *abci.ResponseFinalizeBlock) { - block := makeBlock(state, state.LastBlockHeight+1, new(types.Commit)) + block, err := makeBlock(state, state.LastBlockHeight+1, new(types.Commit)) + if err != nil { + return types.Header{}, types.BlockID{}, nil + } abciResponses := &abci.ResponseFinalizeBlock{ ConsensusParamUpdates: ¶ms, } diff --git a/state/indexer/block/kv/kv.go b/state/indexer/block/kv/kv.go index 3840e053a33..0e16b3d488a 100644 --- a/state/indexer/block/kv/kv.go +++ b/state/indexer/block/kv/kv.go @@ -385,11 +385,15 @@ FOR_LOOP: } func (idx *BlockerIndexer) setTmpHeights(tmpHeights map[string][]byte, it dbm.Iterator) { - // If we return attributes that occur within the same events, then store the event sequence in the - // result map as well + // If we return attributes that occur within the same events, then store the + // event sequence in the result map as well. eventSeq, _ := parseEventSeqFromEventKey(it.Key()) - retVal := it.Value() - tmpHeights[string(retVal)+strconv.FormatInt(eventSeq, 10)] = it.Value() + + // Copy the value because the iterator will be reused. + value := make([]byte, len(it.Value())) + copy(value, it.Value()) + + tmpHeights[string(value)+strconv.FormatInt(eventSeq, 10)] = value } @@ -415,8 +419,8 @@ func (idx *BlockerIndexer) match( tmpHeights := make(map[string][]byte) - switch { - case c.Op == syntax.TEq: + switch c.Op { + case syntax.TEq: it, err := dbm.IteratePrefix(idx.store, startKeyBz) if err != nil { return nil, fmt.Errorf("failed to create prefix iterator: %w", err) @@ -450,7 +454,7 @@ func (idx *BlockerIndexer) match( return nil, err } - case c.Op == syntax.TExists: + case syntax.TExists: prefix, err := orderedcode.Append(nil, c.Tag) if err != nil { return nil, err @@ -493,7 +497,7 @@ func (idx *BlockerIndexer) match( return nil, err } - case c.Op == syntax.TContains: + case syntax.TContains: prefix, err := orderedcode.Append(nil, c.Tag) if err != nil { return nil, err diff --git a/state/indexer/mocks/block_indexer.go b/state/indexer/mocks/block_indexer.go index 60ee57dc5f3..70751025a43 100644 --- a/state/indexer/mocks/block_indexer.go +++ b/state/indexer/mocks/block_indexer.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -23,6 +23,10 @@ type BlockIndexer struct { func (_m *BlockIndexer) Has(height int64) (bool, error) { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(int64) (bool, error)); ok { @@ -47,6 +51,10 @@ func (_m *BlockIndexer) Has(height int64) (bool, error) { func (_m *BlockIndexer) Index(_a0 types.EventDataNewBlockEvents) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Index") + } + var r0 error if rf, ok := ret.Get(0).(func(types.EventDataNewBlockEvents) error); ok { r0 = rf(_a0) @@ -61,6 +69,10 @@ func (_m *BlockIndexer) Index(_a0 types.EventDataNewBlockEvents) error { func (_m *BlockIndexer) Search(ctx context.Context, q *query.Query) ([]int64, error) { ret := _m.Called(ctx, q) + if len(ret) == 0 { + panic("no return value specified for Search") + } + var r0 []int64 var r1 error if rf, ok := ret.Get(0).(func(context.Context, *query.Query) ([]int64, error)); ok { @@ -88,13 +100,12 @@ func (_m *BlockIndexer) SetLogger(l log.Logger) { _m.Called(l) } -type mockConstructorTestingTNewBlockIndexer interface { +// NewBlockIndexer creates a new instance of BlockIndexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewBlockIndexer(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlockIndexer creates a new instance of BlockIndexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlockIndexer(t mockConstructorTestingTNewBlockIndexer) *BlockIndexer { +}) *BlockIndexer { mock := &BlockIndexer{} mock.Mock.Test(t) diff --git a/state/indexer/sink/psql/psql_test.go b/state/indexer/sink/psql/psql_test.go index 04bc704e84e..7312c90065c 100644 --- a/state/indexer/sink/psql/psql_test.go +++ b/state/indexer/sink/psql/psql_test.go @@ -66,7 +66,6 @@ func TestMain(m *testing.M) { "POSTGRES_DB=" + dbName, "listen_addresses = '*'", }, - ExposedPorts: []string{port}, }, func(config *docker.HostConfig) { // set AutoRemove to true so that stopped container goes away by itself config.AutoRemove = true diff --git a/state/mocks/block_store.go b/state/mocks/block_store.go index d7467eeb708..6dff8050cc4 100644 --- a/state/mocks/block_store.go +++ b/state/mocks/block_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -14,10 +14,14 @@ type BlockStore struct { mock.Mock } -// Base provides a mock function with given fields: +// Base provides a mock function with no fields func (_m *BlockStore) Base() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Base") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -28,10 +32,14 @@ func (_m *BlockStore) Base() int64 { return r0 } -// Close provides a mock function with given fields: +// Close provides a mock function with no fields func (_m *BlockStore) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -42,10 +50,14 @@ func (_m *BlockStore) Close() error { return r0 } -// DeleteLatestBlock provides a mock function with given fields: +// DeleteLatestBlock provides a mock function with no fields func (_m *BlockStore) DeleteLatestBlock() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DeleteLatestBlock") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -56,10 +68,14 @@ func (_m *BlockStore) DeleteLatestBlock() error { return r0 } -// Height provides a mock function with given fields: +// Height provides a mock function with no fields func (_m *BlockStore) Height() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Height") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -70,10 +86,14 @@ func (_m *BlockStore) Height() int64 { return r0 } -// LoadBaseMeta provides a mock function with given fields: +// LoadBaseMeta provides a mock function with no fields func (_m *BlockStore) LoadBaseMeta() *types.BlockMeta { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LoadBaseMeta") + } + var r0 *types.BlockMeta if rf, ok := ret.Get(0).(func() *types.BlockMeta); ok { r0 = rf() @@ -90,6 +110,10 @@ func (_m *BlockStore) LoadBaseMeta() *types.BlockMeta { func (_m *BlockStore) LoadBlock(height int64) *types.Block { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlock") + } + var r0 *types.Block if rf, ok := ret.Get(0).(func(int64) *types.Block); ok { r0 = rf(height) @@ -106,6 +130,10 @@ func (_m *BlockStore) LoadBlock(height int64) *types.Block { func (_m *BlockStore) LoadBlockByHash(hash []byte) *types.Block { ret := _m.Called(hash) + if len(ret) == 0 { + panic("no return value specified for LoadBlockByHash") + } + var r0 *types.Block if rf, ok := ret.Get(0).(func([]byte) *types.Block); ok { r0 = rf(hash) @@ -122,6 +150,10 @@ func (_m *BlockStore) LoadBlockByHash(hash []byte) *types.Block { func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlockCommit") + } + var r0 *types.Commit if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { r0 = rf(height) @@ -138,6 +170,10 @@ func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { func (_m *BlockStore) LoadBlockExtendedCommit(height int64) *types.ExtendedCommit { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlockExtendedCommit") + } + var r0 *types.ExtendedCommit if rf, ok := ret.Get(0).(func(int64) *types.ExtendedCommit); ok { r0 = rf(height) @@ -154,6 +190,10 @@ func (_m *BlockStore) LoadBlockExtendedCommit(height int64) *types.ExtendedCommi func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlockMeta") + } + var r0 *types.BlockMeta if rf, ok := ret.Get(0).(func(int64) *types.BlockMeta); ok { r0 = rf(height) @@ -170,6 +210,10 @@ func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta { ret := _m.Called(hash) + if len(ret) == 0 { + panic("no return value specified for LoadBlockMetaByHash") + } + var r0 *types.BlockMeta if rf, ok := ret.Get(0).(func([]byte) *types.BlockMeta); ok { r0 = rf(hash) @@ -186,6 +230,10 @@ func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta { func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part { ret := _m.Called(height, index) + if len(ret) == 0 { + panic("no return value specified for LoadBlockPart") + } + var r0 *types.Part if rf, ok := ret.Get(0).(func(int64, int) *types.Part); ok { r0 = rf(height, index) @@ -202,6 +250,10 @@ func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part { func (_m *BlockStore) LoadSeenCommit(height int64) *types.Commit { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadSeenCommit") + } + var r0 *types.Commit if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { r0 = rf(height) @@ -218,6 +270,10 @@ func (_m *BlockStore) LoadSeenCommit(height int64) *types.Commit { func (_m *BlockStore) PruneBlocks(height int64, _a1 state.State) (uint64, int64, error) { ret := _m.Called(height, _a1) + if len(ret) == 0 { + panic("no return value specified for PruneBlocks") + } + var r0 uint64 var r1 int64 var r2 error @@ -255,10 +311,14 @@ func (_m *BlockStore) SaveBlockWithExtendedCommit(block *types.Block, blockParts _m.Called(block, blockParts, seenCommit) } -// Size provides a mock function with given fields: +// Size provides a mock function with no fields func (_m *BlockStore) Size() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -269,13 +329,12 @@ func (_m *BlockStore) Size() int64 { return r0 } -type mockConstructorTestingTNewBlockStore interface { +// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewBlockStore(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlockStore(t mockConstructorTestingTNewBlockStore) *BlockStore { +}) *BlockStore { mock := &BlockStore{} mock.Mock.Test(t) diff --git a/state/mocks/evidence_pool.go b/state/mocks/evidence_pool.go index b5a3a8ac14c..31656715f10 100644 --- a/state/mocks/evidence_pool.go +++ b/state/mocks/evidence_pool.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type EvidencePool struct { func (_m *EvidencePool) AddEvidence(_a0 types.Evidence) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for AddEvidence") + } + var r0 error if rf, ok := ret.Get(0).(func(types.Evidence) error); ok { r0 = rf(_a0) @@ -32,6 +36,10 @@ func (_m *EvidencePool) AddEvidence(_a0 types.Evidence) error { func (_m *EvidencePool) CheckEvidence(_a0 types.EvidenceList) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for CheckEvidence") + } + var r0 error if rf, ok := ret.Get(0).(func(types.EvidenceList) error); ok { r0 = rf(_a0) @@ -46,6 +54,10 @@ func (_m *EvidencePool) CheckEvidence(_a0 types.EvidenceList) error { func (_m *EvidencePool) PendingEvidence(maxBytes int64) ([]types.Evidence, int64) { ret := _m.Called(maxBytes) + if len(ret) == 0 { + panic("no return value specified for PendingEvidence") + } + var r0 []types.Evidence var r1 int64 if rf, ok := ret.Get(0).(func(int64) ([]types.Evidence, int64)); ok { @@ -73,13 +85,12 @@ func (_m *EvidencePool) Update(_a0 state.State, _a1 types.EvidenceList) { _m.Called(_a0, _a1) } -type mockConstructorTestingTNewEvidencePool interface { +// NewEvidencePool creates a new instance of EvidencePool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewEvidencePool(t interface { mock.TestingT Cleanup(func()) -} - -// NewEvidencePool creates a new instance of EvidencePool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEvidencePool(t mockConstructorTestingTNewEvidencePool) *EvidencePool { +}) *EvidencePool { mock := &EvidencePool{} mock.Mock.Test(t) diff --git a/state/mocks/store.go b/state/mocks/store.go index 421a2dc812c..f6535ab888d 100644 --- a/state/mocks/store.go +++ b/state/mocks/store.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -20,6 +20,10 @@ type Store struct { func (_m *Store) Bootstrap(_a0 state.State) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Bootstrap") + } + var r0 error if rf, ok := ret.Get(0).(func(state.State) error); ok { r0 = rf(_a0) @@ -30,10 +34,14 @@ func (_m *Store) Bootstrap(_a0 state.State) error { return r0 } -// Close provides a mock function with given fields: +// Close provides a mock function with no fields func (_m *Store) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -44,10 +52,14 @@ func (_m *Store) Close() error { return r0 } -// GetOfflineStateSyncHeight provides a mock function with given fields: +// GetOfflineStateSyncHeight provides a mock function with no fields func (_m *Store) GetOfflineStateSyncHeight() (int64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetOfflineStateSyncHeight") + } + var r0 int64 var r1 error if rf, ok := ret.Get(0).(func() (int64, error)); ok { @@ -68,10 +80,14 @@ func (_m *Store) GetOfflineStateSyncHeight() (int64, error) { return r0, r1 } -// Load provides a mock function with given fields: +// Load provides a mock function with no fields func (_m *Store) Load() (state.State, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Load") + } + var r0 state.State var r1 error if rf, ok := ret.Get(0).(func() (state.State, error)); ok { @@ -96,6 +112,10 @@ func (_m *Store) Load() (state.State, error) { func (_m *Store) LoadConsensusParams(_a0 int64) (types.ConsensusParams, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LoadConsensusParams") + } + var r0 types.ConsensusParams var r1 error if rf, ok := ret.Get(0).(func(int64) (types.ConsensusParams, error)); ok { @@ -120,6 +140,10 @@ func (_m *Store) LoadConsensusParams(_a0 int64) (types.ConsensusParams, error) { func (_m *Store) LoadFinalizeBlockResponse(_a0 int64) (*abcitypes.ResponseFinalizeBlock, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LoadFinalizeBlockResponse") + } + var r0 *abcitypes.ResponseFinalizeBlock var r1 error if rf, ok := ret.Get(0).(func(int64) (*abcitypes.ResponseFinalizeBlock, error)); ok { @@ -146,6 +170,10 @@ func (_m *Store) LoadFinalizeBlockResponse(_a0 int64) (*abcitypes.ResponseFinali func (_m *Store) LoadFromDBOrGenesisDoc(_a0 *types.GenesisDoc) (state.State, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LoadFromDBOrGenesisDoc") + } + var r0 state.State var r1 error if rf, ok := ret.Get(0).(func(*types.GenesisDoc) (state.State, error)); ok { @@ -170,6 +198,10 @@ func (_m *Store) LoadFromDBOrGenesisDoc(_a0 *types.GenesisDoc) (state.State, err func (_m *Store) LoadFromDBOrGenesisFile(_a0 string) (state.State, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LoadFromDBOrGenesisFile") + } + var r0 state.State var r1 error if rf, ok := ret.Get(0).(func(string) (state.State, error)); ok { @@ -194,6 +226,10 @@ func (_m *Store) LoadFromDBOrGenesisFile(_a0 string) (state.State, error) { func (_m *Store) LoadLastFinalizeBlockResponse(_a0 int64) (*abcitypes.ResponseFinalizeBlock, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LoadLastFinalizeBlockResponse") + } + var r0 *abcitypes.ResponseFinalizeBlock var r1 error if rf, ok := ret.Get(0).(func(int64) (*abcitypes.ResponseFinalizeBlock, error)); ok { @@ -220,6 +256,10 @@ func (_m *Store) LoadLastFinalizeBlockResponse(_a0 int64) (*abcitypes.ResponseFi func (_m *Store) LoadValidators(_a0 int64) (*types.ValidatorSet, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LoadValidators") + } + var r0 *types.ValidatorSet var r1 error if rf, ok := ret.Get(0).(func(int64) (*types.ValidatorSet, error)); ok { @@ -246,6 +286,10 @@ func (_m *Store) LoadValidators(_a0 int64) (*types.ValidatorSet, error) { func (_m *Store) PruneStates(_a0 int64, _a1 int64, _a2 int64) error { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for PruneStates") + } + var r0 error if rf, ok := ret.Get(0).(func(int64, int64, int64) error); ok { r0 = rf(_a0, _a1, _a2) @@ -260,6 +304,10 @@ func (_m *Store) PruneStates(_a0 int64, _a1 int64, _a2 int64) error { func (_m *Store) Save(_a0 state.State) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Save") + } + var r0 error if rf, ok := ret.Get(0).(func(state.State) error); ok { r0 = rf(_a0) @@ -274,6 +322,10 @@ func (_m *Store) Save(_a0 state.State) error { func (_m *Store) SaveFinalizeBlockResponse(_a0 int64, _a1 *abcitypes.ResponseFinalizeBlock) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SaveFinalizeBlockResponse") + } + var r0 error if rf, ok := ret.Get(0).(func(int64, *abcitypes.ResponseFinalizeBlock) error); ok { r0 = rf(_a0, _a1) @@ -288,6 +340,10 @@ func (_m *Store) SaveFinalizeBlockResponse(_a0 int64, _a1 *abcitypes.ResponseFin func (_m *Store) SetOfflineStateSyncHeight(height int64) error { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for SetOfflineStateSyncHeight") + } + var r0 error if rf, ok := ret.Get(0).(func(int64) error); ok { r0 = rf(height) @@ -298,13 +354,12 @@ func (_m *Store) SetOfflineStateSyncHeight(height int64) error { return r0 } -type mockConstructorTestingTNewStore interface { +// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewStore(t interface { mock.TestingT Cleanup(func()) -} - -// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewStore(t mockConstructorTestingTNewStore) *Store { +}) *Store { mock := &Store{} mock.Mock.Test(t) diff --git a/state/rollback_test.go b/state/rollback_test.go index 46f1f94f78e..1eeb197c9bc 100644 --- a/state/rollback_test.go +++ b/state/rollback_test.go @@ -123,7 +123,7 @@ func TestRollbackHard(t *testing.T) { currState := state.State{ Version: cmtstate.Version{ - Consensus: block.Header.Version, + Consensus: block.Version, Software: version.TMCoreSemVer, }, LastBlockHeight: block.Height, @@ -180,7 +180,7 @@ func TestRollbackHard(t *testing.T) { nextState := state.State{ Version: cmtstate.Version{ - Consensus: block.Header.Version, + Consensus: block.Version, Software: version.TMCoreSemVer, }, LastBlockHeight: nextBlock.Height, diff --git a/state/state.go b/state/state.go index 15fb8e5e62b..765bf479b84 100644 --- a/state/state.go +++ b/state/state.go @@ -237,7 +237,7 @@ func (state State) MakeBlock( lastCommit *types.Commit, evidence []types.Evidence, proposerAddress []byte, -) *types.Block { +) (*types.Block, error) { // Build base block with block data. block := types.MakeBlock(height, txs, lastCommit, evidence) @@ -247,11 +247,15 @@ func (state State) MakeBlock( if height == state.InitialHeight { timestamp = state.LastBlockTime // genesis time } else { - timestamp = MedianTime(lastCommit, state.LastValidators) + ts, err := MedianTime(lastCommit, state.LastValidators) + if err != nil { + return nil, fmt.Errorf("error making block while calculating median time: %w", err) + } + timestamp = ts } // Fill rest of header with state data. - block.Header.Populate( + block.Populate( state.Version.Consensus, state.ChainID, timestamp, state.LastBlockID, state.Validators.Hash(), state.NextValidators.Hash(), @@ -259,14 +263,14 @@ func (state State) MakeBlock( proposerAddress, ) - return block + return block, nil } // MedianTime computes a median time for a given Commit (based on Timestamp field of votes messages) and the // corresponding validator set. The computed time is always between timestamps of // the votes sent by honest processes, i.e., a faulty processes can not arbitrarily increase or decrease the // computed value. -func MedianTime(commit *types.Commit, validators *types.ValidatorSet) time.Time { +func MedianTime(commit *types.Commit, validators *types.ValidatorSet) (time.Time, error) { weightedTimes := make([]*cmttime.WeightedTime, len(commit.Signatures)) totalVotingPower := int64(0) @@ -276,13 +280,15 @@ func MedianTime(commit *types.Commit, validators *types.ValidatorSet) time.Time } _, validator := validators.GetByAddress(commitSig.ValidatorAddress) // If there's no condition, TestValidateBlockCommit panics; not needed normally. - if validator != nil { - totalVotingPower += validator.VotingPower - weightedTimes[i] = cmttime.NewWeightedTime(commitSig.Timestamp, validator.VotingPower) + if validator == nil { + return time.Time{}, fmt.Errorf("commit validator not found in validator set: %X", + commitSig.ValidatorAddress) } + totalVotingPower += validator.VotingPower + weightedTimes[i] = cmttime.NewWeightedTime(commitSig.Timestamp, validator.VotingPower) } - return cmttime.WeightedMedian(weightedTimes, totalVotingPower) + return cmttime.WeightedMedian(weightedTimes, totalVotingPower), nil } //------------------------------------------------------------------------ diff --git a/state/state_test.go b/state/state_test.go index 863395dca32..0c01c297e7a 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -7,6 +7,7 @@ import ( "math/big" "os" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -116,7 +117,8 @@ func TestFinalizeBlockResponsesSaveLoad1(t *testing.T) { state.LastBlockHeight++ // Build mock responses. - block := makeBlock(state, 2, new(types.Commit)) + block, err := makeBlock(state, 2, new(types.Commit)) + require.NoError(t, err) abciResponses := new(abci.ResponseFinalizeBlock) dtxs := make([]*abci.ExecTxResult, 2) @@ -130,7 +132,7 @@ func TestFinalizeBlockResponsesSaveLoad1(t *testing.T) { abciResponses.AppHash = make([]byte, 1) - err := stateStore.SaveFinalizeBlockResponse(block.Height, abciResponses) + err = stateStore.SaveFinalizeBlockResponse(block.Height, abciResponses) require.NoError(t, err) loadedABCIResponses, err := stateStore.LoadFinalizeBlockResponse(block.Height) assert.NoError(err) @@ -463,7 +465,8 @@ func TestProposerPriorityDoesNotGetResetToZero(t *testing.T) { // NewValidatorSet calls IncrementProposerPriority but uses on a copy of val1 assert.EqualValues(t, 0, val1.ProposerPriority) - block := makeBlock(state, state.LastBlockHeight+1, new(types.Commit)) + block, err := makeBlock(state, state.LastBlockHeight+1, new(types.Commit)) + require.NoError(t, err) bps, err := block.MakePartSet(testPartSize) require.NoError(t, err) blockID := types.BlockID{Hash: block.Hash(), PartSetHeader: bps.Header()} @@ -576,7 +579,8 @@ func TestProposerPriorityProposerAlternates(t *testing.T) { // we only have one validator: assert.Equal(t, val1PubKey.Address(), state.Validators.Proposer.Address) - block := makeBlock(state, state.LastBlockHeight+1, new(types.Commit)) + block, err := makeBlock(state, state.LastBlockHeight+1, new(types.Commit)) + assert.NoError(t, err) bps, err := block.MakePartSet(testPartSize) require.NoError(t, err) blockID := types.BlockID{Hash: block.Hash(), PartSetHeader: bps.Header()} @@ -753,7 +757,8 @@ func TestLargeGenesisValidator(t *testing.T) { validatorUpdates, err := types.PB2TM.ValidatorUpdates(abciResponses.ValidatorUpdates) require.NoError(t, err) - block := makeBlock(oldState, oldState.LastBlockHeight+1, new(types.Commit)) + block, err := makeBlock(oldState, oldState.LastBlockHeight+1, new(types.Commit)) + require.NoError(t, err) bps, err := block.MakePartSet(testPartSize) require.NoError(t, err) blockID := types.BlockID{Hash: block.Hash(), PartSetHeader: bps.Header()} @@ -783,7 +788,8 @@ func TestLargeGenesisValidator(t *testing.T) { abciResponses := &abci.ResponseFinalizeBlock{ ValidatorUpdates: []abci.ValidatorUpdate{firstAddedVal}, } - block := makeBlock(oldState, oldState.LastBlockHeight+1, new(types.Commit)) + block, err := makeBlock(oldState, oldState.LastBlockHeight+1, new(types.Commit)) + require.NoError(t, err) bps, err := block.MakePartSet(testPartSize) require.NoError(t, err) @@ -799,7 +805,8 @@ func TestLargeGenesisValidator(t *testing.T) { validatorUpdates, err := types.PB2TM.ValidatorUpdates(abciResponses.ValidatorUpdates) require.NoError(t, err) - block := makeBlock(lastState, lastState.LastBlockHeight+1, new(types.Commit)) + block, err := makeBlock(lastState, lastState.LastBlockHeight+1, new(types.Commit)) + require.NoError(t, err) bps, err = block.MakePartSet(testPartSize) require.NoError(t, err) @@ -835,7 +842,8 @@ func TestLargeGenesisValidator(t *testing.T) { abciResponses := &abci.ResponseFinalizeBlock{ ValidatorUpdates: []abci.ValidatorUpdate{addedVal}, } - block := makeBlock(oldState, oldState.LastBlockHeight+1, new(types.Commit)) + block, err := makeBlock(oldState, oldState.LastBlockHeight+1, new(types.Commit)) + require.NoError(t, err) bps, err := block.MakePartSet(testPartSize) require.NoError(t, err) @@ -853,7 +861,7 @@ func TestLargeGenesisValidator(t *testing.T) { ValidatorUpdates: []abci.ValidatorUpdate{removeGenesisVal}, } - block = makeBlock(oldState, oldState.LastBlockHeight+1, new(types.Commit)) + block, err = makeBlock(oldState, oldState.LastBlockHeight+1, new(types.Commit)) require.NoError(t, err) bps, err = block.MakePartSet(testPartSize) @@ -876,7 +884,8 @@ func TestLargeGenesisValidator(t *testing.T) { abciResponses := &abci.ResponseFinalizeBlock{} validatorUpdates, err = types.PB2TM.ValidatorUpdates(abciResponses.ValidatorUpdates) require.NoError(t, err) - block = makeBlock(curState, curState.LastBlockHeight+1, new(types.Commit)) + block, err = makeBlock(curState, curState.LastBlockHeight+1, new(types.Commit)) + require.NoError(t, err) bps, err := block.MakePartSet(testPartSize) require.NoError(t, err) @@ -902,7 +911,8 @@ func TestLargeGenesisValidator(t *testing.T) { validatorUpdates, err := types.PB2TM.ValidatorUpdates(abciResponses.ValidatorUpdates) require.NoError(t, err) - block := makeBlock(updatedState, updatedState.LastBlockHeight+1, new(types.Commit)) + block, err := makeBlock(updatedState, updatedState.LastBlockHeight+1, new(types.Commit)) + require.NoError(t, err) bps, err := block.MakePartSet(testPartSize) require.NoError(t, err) @@ -1005,7 +1015,8 @@ func TestStateMakeBlock(t *testing.T) { proposerAddress := state.Validators.GetProposer().Address stateVersion := state.Version.Consensus - block := makeBlock(state, 2, new(types.Commit)) + block, err := makeBlock(state, 2, new(types.Commit)) + require.NoError(t, err) // test we set some fields assert.Equal(t, stateVersion, block.Version) @@ -1114,3 +1125,86 @@ func TestStateProto(t *testing.T) { } } } + +func TestMedianTime(t *testing.T) { + val1 := types.NewValidator(ed25519.GenPrivKey().PubKey(), 30) + val2 := types.NewValidator(ed25519.GenPrivKey().PubKey(), 30) + val3 := types.NewValidator(ed25519.GenPrivKey().PubKey(), 30) + + vals := types.NewValidatorSet([]*types.Validator{val1, val2, val3}) + + t.Run("all validators present", func(t *testing.T) { + now := time.Now() + commit := &types.Commit{ + Height: 1, + Signatures: []types.CommitSig{ + { + BlockIDFlag: types.BlockIDFlagCommit, + ValidatorAddress: val1.Address, + Timestamp: now, + }, + { + BlockIDFlag: types.BlockIDFlagCommit, + ValidatorAddress: val2.Address, + Timestamp: now.Add(1 * time.Minute), + }, + { + BlockIDFlag: types.BlockIDFlagCommit, + ValidatorAddress: val3.Address, + Timestamp: now.Add(2 * time.Minute), + }, + }, + } + + medianTime, err := sm.MedianTime(commit, vals) + require.NoError(t, err) + require.Equal(t, medianTime, now.Add(1*time.Minute)) + }) + + t.Run("validator not in validator set", func(t *testing.T) { + unknownVal := ed25519.GenPrivKey().PubKey().Address() + now := time.Now() + commit := &types.Commit{ + Height: 1, + Signatures: []types.CommitSig{ + { + BlockIDFlag: types.BlockIDFlagCommit, + ValidatorAddress: val1.Address, + Timestamp: now, + }, + { + BlockIDFlag: types.BlockIDFlagCommit, + ValidatorAddress: unknownVal, + Timestamp: now.Add(1 * time.Minute), + }, + }, + } + + _, err := sm.MedianTime(commit, vals) + require.Error(t, err) + require.Contains(t, err.Error(), "commit validator not found in validator set") + }) + + t.Run("not all validators present", func(t *testing.T) { + now := time.Now() + commit := &types.Commit{ + Height: 1, + Signatures: []types.CommitSig{ + { + BlockIDFlag: types.BlockIDFlagCommit, + ValidatorAddress: val1.Address, + Timestamp: now, + }, + { + BlockIDFlag: types.BlockIDFlagCommit, + ValidatorAddress: val2.Address, + Timestamp: now.Add(1 * time.Minute), + }, + }, + } + + medianTime, err := sm.MedianTime(commit, vals) + require.NoError(t, err) + require.Equal(t, medianTime, now) + }) +} diff --git a/state/txindex/kv/kv.go b/state/txindex/kv/kv.go index 0e1b25a89d6..263e62d5abf 100644 --- a/state/txindex/kv/kv.go +++ b/state/txindex/kv/kv.go @@ -342,7 +342,12 @@ func lookForHash(conditions []syntax.Condition) (hash []byte, ok bool, err error func (*TxIndex) setTmpHashes(tmpHeights map[string][]byte, key, value []byte) { eventSeq := extractEventSeqFromKey(key) - tmpHeights[string(value)+eventSeq] = value + + // Copy the value because the iterator will be reused. + valueCopy := make([]byte, len(value)) + copy(valueCopy, value) + + tmpHeights[string(valueCopy)+eventSeq] = valueCopy } // match returns all matching txs by hash that meet a given condition and start @@ -366,8 +371,8 @@ func (txi *TxIndex) match( tmpHashes := make(map[string][]byte) - switch { - case c.Op == syntax.TEq: + switch c.Op { + case syntax.TEq: it, err := dbm.IteratePrefix(txi.store, startKeyBz) if err != nil { panic(err) @@ -405,7 +410,7 @@ func (txi *TxIndex) match( panic(err) } - case c.Op == syntax.TExists: + case syntax.TExists: // XXX: can't use startKeyBz here because c.Operand is nil // (e.g. "account.owner//" won't match w/ a single row) it, err := dbm.IteratePrefix(txi.store, startKey(c.Tag)) @@ -443,7 +448,7 @@ func (txi *TxIndex) match( panic(err) } - case c.Op == syntax.TContains: + case syntax.TContains: // XXX: startKey does not apply here. // For example, if startKey = "account.owner/an/" and search query = "account.owner CONTAINS an" // we can't iterate with prefix "account.owner/an/" because we might miss keys like "account.owner/Ulan/" @@ -715,7 +720,7 @@ func extractValueFromKey(key []byte) string { } func extractEventSeqFromKey(key []byte) string { - parts := strings.SplitN(string(key), tagKeySeparator, -1) + parts := strings.Split(string(key), tagKeySeparator) lastEl := parts[len(parts)-1] diff --git a/state/txindex/kv/kv_test.go b/state/txindex/kv/kv_test.go index ea8d4ea308b..b6829ffb793 100644 --- a/state/txindex/kv/kv_test.go +++ b/state/txindex/kv/kv_test.go @@ -316,11 +316,12 @@ func TestTxSearchEventMatchByHeight(t *testing.T) { assert.Len(t, results, tc.resultsLength) if tc.resultsLength > 0 { for _, txr := range results { - if txr.Height == 1 { + switch txr.Height { + case 1: assert.True(t, proto.Equal(txResult, txr)) - } else if txr.Height == 10 { + case 10: assert.True(t, proto.Equal(txResult10, txr)) - } else { + default: assert.True(t, false) } } diff --git a/state/txindex/mocks/tx_indexer.go b/state/txindex/mocks/tx_indexer.go index dcffdb3ab38..53887de19ba 100644 --- a/state/txindex/mocks/tx_indexer.go +++ b/state/txindex/mocks/tx_indexer.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -24,6 +24,10 @@ type TxIndexer struct { func (_m *TxIndexer) AddBatch(b *txindex.Batch) error { ret := _m.Called(b) + if len(ret) == 0 { + panic("no return value specified for AddBatch") + } + var r0 error if rf, ok := ret.Get(0).(func(*txindex.Batch) error); ok { r0 = rf(b) @@ -38,6 +42,10 @@ func (_m *TxIndexer) AddBatch(b *txindex.Batch) error { func (_m *TxIndexer) Get(hash []byte) (*types.TxResult, error) { ret := _m.Called(hash) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *types.TxResult var r1 error if rf, ok := ret.Get(0).(func([]byte) (*types.TxResult, error)); ok { @@ -64,6 +72,10 @@ func (_m *TxIndexer) Get(hash []byte) (*types.TxResult, error) { func (_m *TxIndexer) Index(result *types.TxResult) error { ret := _m.Called(result) + if len(ret) == 0 { + panic("no return value specified for Index") + } + var r0 error if rf, ok := ret.Get(0).(func(*types.TxResult) error); ok { r0 = rf(result) @@ -78,6 +90,10 @@ func (_m *TxIndexer) Index(result *types.TxResult) error { func (_m *TxIndexer) Search(ctx context.Context, q *query.Query) ([]*types.TxResult, error) { ret := _m.Called(ctx, q) + if len(ret) == 0 { + panic("no return value specified for Search") + } + var r0 []*types.TxResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, *query.Query) ([]*types.TxResult, error)); ok { @@ -105,13 +121,12 @@ func (_m *TxIndexer) SetLogger(l log.Logger) { _m.Called(l) } -type mockConstructorTestingTNewTxIndexer interface { +// NewTxIndexer creates a new instance of TxIndexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewTxIndexer(t interface { mock.TestingT Cleanup(func()) -} - -// NewTxIndexer creates a new instance of TxIndexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTxIndexer(t mockConstructorTestingTNewTxIndexer) *TxIndexer { +}) *TxIndexer { mock := &TxIndexer{} mock.Mock.Test(t) diff --git a/state/validation.go b/state/validation.go index 287aec31aaa..84a8e79f88e 100644 --- a/state/validation.go +++ b/state/validation.go @@ -119,7 +119,11 @@ func validateBlock(state State, block *types.Block) error { state.LastBlockTime, ) } - medianTime := MedianTime(block.LastCommit, state.LastValidators) + + medianTime, err := MedianTime(block.LastCommit, state.LastValidators) + if err != nil { + return fmt.Errorf("error validating block while calculating median time: %w", err) + } if !block.Time.Equal(medianTime) { return fmt.Errorf("invalid block time. Expected %v, got %v", medianTime, diff --git a/state/validation_test.go b/state/validation_test.go index fc165632829..6f639f1cc86 100644 --- a/state/validation_test.go +++ b/state/validation_test.go @@ -104,9 +104,10 @@ func TestValidateBlockHeader(t *testing.T) { Invalid blocks don't pass */ for _, tc := range testCases { - block := makeBlock(state, height, lastCommit) + block, err := makeBlock(state, height, lastCommit) + require.NoError(t, err) tc.malleateBlock(block) - err := blockExec.ValidateBlock(state, block) + err = blockExec.ValidateBlock(state, block) require.Error(t, err, tc.name) } @@ -121,9 +122,10 @@ func TestValidateBlockHeader(t *testing.T) { } nextHeight := validationTestsStopHeight - block := makeBlock(state, nextHeight, lastCommit) + block, err := makeBlock(state, nextHeight, lastCommit) + require.NoError(t, err) state.InitialHeight = nextHeight + 1 - err := blockExec.ValidateBlock(state, block) + err = blockExec.ValidateBlock(state, block) require.Error(t, err, "expected an error when state is ahead of block") assert.Contains(t, err.Error(), "lower than initial height") } @@ -191,22 +193,18 @@ func TestValidateBlockCommit(t *testing.T) { BlockID: state.LastBlockID, Signatures: []types.CommitSig{wrongHeightVote.CommitSig()}, } - block := makeBlock(state, height, wrongHeightCommit) - err := blockExec.ValidateBlock(state, block) + block, err := makeBlock(state, height, wrongHeightCommit) + require.NoError(t, err) + err = blockExec.ValidateBlock(state, block) _, isErrInvalidCommitHeight := err.(types.ErrInvalidCommitHeight) require.True(t, isErrInvalidCommitHeight, "expected ErrInvalidCommitHeight at height %d but got: %v", height, err) /* #2589: test len(block.LastCommit.Signatures) == state.LastValidators.Size() */ - block = makeBlock(state, height, wrongSigsCommit) - err = blockExec.ValidateBlock(state, block) - _, isErrInvalidCommitSignatures := err.(types.ErrInvalidCommitSignatures) - require.True(t, isErrInvalidCommitSignatures, - "expected ErrInvalidCommitSignatures at height %d, but got: %v", - height, - err, - ) + _, err = makeBlock(state, height, wrongSigsCommit) + require.Error(t, err) + require.ErrorContains(t, err, "error making block") } /* @@ -335,9 +333,10 @@ func TestValidateBlockEvidence(t *testing.T) { evidence = append(evidence, newEv) currentBytes += int64(len(newEv.Bytes())) } - block := state.MakeBlock(height, test.MakeNTxs(height, 10), lastCommit, evidence, proposerAddr) + block, err := state.MakeBlock(height, test.MakeNTxs(height, 10), lastCommit, evidence, proposerAddr) + require.NoError(t, err) - err := blockExec.ValidateBlock(state, block) + err = blockExec.ValidateBlock(state, block) if assert.Error(t, err) { _, ok := err.(*types.ErrEvidenceOverflow) require.True(t, ok, "expected error to be of type ErrEvidenceOverflow at height %d but got %v", height, err) @@ -376,3 +375,152 @@ func TestValidateBlockEvidence(t *testing.T) { } } + +func TestValidateBlockTime(t *testing.T) { + proxyApp := newTestApp() + require.NoError(t, proxyApp.Start()) + defer proxyApp.Stop() //nolint:errcheck // ignore for tests + + state, stateDB, privVals := makeState(3, 1) + stateStore := sm.NewStore(stateDB, sm.StoreOptions{ + DiscardABCIResponses: false, + }) + mp := &mpmocks.Mempool{} + mp.On("Lock").Return() + mp.On("Unlock").Return() + mp.On("FlushAppConn", mock.Anything).Return(nil) + mp.On("Update", + mock.Anything, + mock.Anything, + mock.Anything, + mock.Anything, + mock.Anything, + mock.Anything).Return(nil) + + blockStore := store.NewBlockStore(dbm.NewMemDB()) + oracleInfo := oracletypes.OracleInfo{} + + blockExec := sm.NewBlockExecutor( + stateStore, + log.TestingLogger(), + proxyApp.Consensus(), + mp, + &oracleInfo, + sm.EmptyEvidencePool{}, + blockStore, + ) + lastCommit := &types.Commit{} + var lastExtCommit *types.ExtendedCommit + + // Build up state for test + for height := int64(1); height < 3; height++ { + var err error + state, _, lastExtCommit, err = makeAndCommitGoodBlock( + state, height, lastCommit, state.Validators.GetProposer().Address, blockExec, privVals, nil) + require.NoError(t, err, "height %d", height) + lastCommit = lastExtCommit.ToCommit() + } + + t.Run("block time before last block time", func(t *testing.T) { + height := int64(3) + block, err := makeBlock(state, height, lastCommit) + require.NoError(t, err) + + // Set time to before last block time + block.Time = block.Time.Add(-time.Millisecond * 10) + err = blockExec.ValidateBlock(state, block) + + require.ErrorContains(t, err, "not greater than last block time") + }) + + t.Run("block time after last block time, different than median time", func(t *testing.T) { + height := int64(3) + block, err := makeBlock(state, height, lastCommit) + require.NoError(t, err) + // Set time to after the median time + block.Time = block.Time.Add(time.Second) + err = blockExec.ValidateBlock(state, block) + require.Error(t, err) + require.Contains(t, err.Error(), "invalid block time") + }) + + t.Run("block time after last block time, same as median time", func(t *testing.T) { + height := int64(3) + block, err := makeBlock(state, height, lastCommit) + require.NoError(t, err) + err = blockExec.ValidateBlock(state, block) + require.NoError(t, err) + }) +} + +func TestValidateBlockInvalidCommit(t *testing.T) { + proxyApp := newTestApp() + require.NoError(t, proxyApp.Start()) + defer proxyApp.Stop() //nolint:errcheck // ignore for tests + + state, stateDB, privVals := makeState(3, 1) + stateStore := sm.NewStore(stateDB, sm.StoreOptions{ + DiscardABCIResponses: false, + }) + mp := &mpmocks.Mempool{} + mp.On("Lock").Return() + mp.On("Unlock").Return() + mp.On("FlushAppConn", mock.Anything).Return(nil) + mp.On("Update", + mock.Anything, + mock.Anything, + mock.Anything, + mock.Anything, + mock.Anything, + mock.Anything).Return(nil) + + blockStore := store.NewBlockStore(dbm.NewMemDB()) + oracleInfo := oracletypes.OracleInfo{} + + blockExec := sm.NewBlockExecutor( + stateStore, + log.TestingLogger(), + proxyApp.Consensus(), + mp, + &oracleInfo, + sm.EmptyEvidencePool{}, + blockStore, + ) + lastCommit := &types.Commit{} + var lastExtCommit *types.ExtendedCommit + + // Build up state for test + for height := int64(1); height < 3; height++ { + var err error + state, _, lastExtCommit, err = makeAndCommitGoodBlock( + state, height, lastCommit, state.Validators.GetProposer().Address, blockExec, privVals, nil) + require.NoError(t, err, "height %d", height) + lastCommit = lastExtCommit.ToCommit() + } + + t.Run("commit with unknown validator flagged as commit", func(t *testing.T) { + height := int64(3) + + // Create a commit where only unknown validators have BlockIDFlagCommit + unknownVal := ed25519.GenPrivKey() + now := time.Now() + + invalidCommit := &types.Commit{ + Height: height - 1, + Round: 0, + BlockID: state.LastBlockID, + Signatures: []types.CommitSig{ + { + BlockIDFlag: types.BlockIDFlagCommit, + ValidatorAddress: unknownVal.PubKey().Address(), + Timestamp: now, + Signature: []byte("dummy"), + }, + }, + } + + _, err := makeBlock(state, height, invalidCommit) + require.Error(t, err) + require.Contains(t, err.Error(), "commit validator not found in validator set") + }) +} diff --git a/statesync/messages.go b/statesync/messages.go index eff6646106d..958c60314fc 100644 --- a/statesync/messages.go +++ b/statesync/messages.go @@ -16,8 +16,12 @@ const ( chunkMsgSize = int(16e6) ) +var ( + ErrExceedsMaxSnapshotChunks = errors.New("amount of chunks in the snapshot exceeds the maximum allowed number of chunks") +) + // validateMsg validates a message. -func validateMsg(pb proto.Message) error { +func validateMsg(pb proto.Message, maxSnapshotChunks uint32) error { if pb == nil { return errors.New("message cannot be nil") } @@ -47,6 +51,9 @@ func validateMsg(pb proto.Message) error { if msg.Chunks == 0 { return errors.New("snapshot has no chunks") } + if msg.Chunks > maxSnapshotChunks { + return fmt.Errorf("%w: snapshot response chunk count: %d, maximum chunks: %d", ErrExceedsMaxSnapshotChunks, msg.Chunks, maxSnapshotChunks) + } default: return fmt.Errorf("unknown message type %T", msg) } diff --git a/statesync/messages_test.go b/statesync/messages_test.go index 97a888aba01..1e488afba63 100644 --- a/statesync/messages_test.go +++ b/statesync/messages_test.go @@ -70,11 +70,14 @@ func TestValidateMsg(t *testing.T) { "SnapshotsResponse no hash": { &ssproto.SnapshotsResponse{Height: 1, Format: 1, Chunks: 2, Hash: []byte{}}, false}, + "SnapshotsResponse exceeds max chunks": { + &ssproto.SnapshotsResponse{Height: 1, Format: 1, Chunks: 100001, Hash: []byte{1}}, + false}, } for name, tc := range testcases { tc := tc t.Run(name, func(t *testing.T) { - err := validateMsg(tc.msg) + err := validateMsg(tc.msg, 100000) if tc.valid { require.NoError(t, err) } else { diff --git a/statesync/mocks/state_provider.go b/statesync/mocks/state_provider.go index cbbe3c0b5a5..f4eda1709c3 100644 --- a/statesync/mocks/state_provider.go +++ b/statesync/mocks/state_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.53.0. DO NOT EDIT. package mocks @@ -20,6 +20,10 @@ type StateProvider struct { func (_m *StateProvider) AppHash(ctx context.Context, height uint64) ([]byte, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for AppHash") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) ([]byte, error)); ok { @@ -46,6 +50,10 @@ func (_m *StateProvider) AppHash(ctx context.Context, height uint64) ([]byte, er func (_m *StateProvider) Commit(ctx context.Context, height uint64) (*types.Commit, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 *types.Commit var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) (*types.Commit, error)); ok { @@ -72,6 +80,10 @@ func (_m *StateProvider) Commit(ctx context.Context, height uint64) (*types.Comm func (_m *StateProvider) State(ctx context.Context, height uint64) (state.State, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for State") + } + var r0 state.State var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) (state.State, error)); ok { @@ -92,13 +104,12 @@ func (_m *StateProvider) State(ctx context.Context, height uint64) (state.State, return r0, r1 } -type mockConstructorTestingTNewStateProvider interface { +// NewStateProvider creates a new instance of StateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewStateProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewStateProvider creates a new instance of StateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewStateProvider(t mockConstructorTestingTNewStateProvider) *StateProvider { +}) *StateProvider { mock := &StateProvider{} mock.Mock.Test(t) diff --git a/statesync/reactor.go b/statesync/reactor.go index a7374a29182..6cf6d5874b0 100644 --- a/statesync/reactor.go +++ b/statesync/reactor.go @@ -109,8 +109,11 @@ func (r *Reactor) Receive(e p2p.Envelope) { return } - err := validateMsg(e.Message) + err := validateMsg(e.Message, r.cfg.MaxSnapshotChunks) if err != nil { + if errors.Is(err, ErrExceedsMaxSnapshotChunks) { + r.syncer.RejectPeer(e.Src) + } r.Logger.Error("Invalid message", "peer", e.Src, "msg", e.Message, "err", err) r.Switch.StopPeerForError(e.Src, err) return diff --git a/statesync/snapshots.go b/statesync/snapshots.go index 5d4f9fe4d34..0270f31116a 100644 --- a/statesync/snapshots.go +++ b/statesync/snapshots.go @@ -30,7 +30,7 @@ type snapshot struct { func (s *snapshot) Key() snapshotKey { // Hash.Write() never returns an error. hasher := sha256.New() - hasher.Write([]byte(fmt.Sprintf("%v:%v:%v", s.Height, s.Format, s.Chunks))) + fmt.Fprintf(hasher, "%v:%v:%v", s.Height, s.Format, s.Chunks) hasher.Write(s.Hash) hasher.Write(s.Metadata) var key snapshotKey diff --git a/statesync/syncer.go b/statesync/syncer.go index 38bdedfd1b6..0e0737f814f 100644 --- a/statesync/syncer.go +++ b/statesync/syncer.go @@ -139,6 +139,12 @@ func (s *syncer) RemovePeer(peer p2p.Peer) { s.snapshots.RemovePeer(peer.ID()) } +// RejectPeer rejects a peer from the pool. +func (s *syncer) RejectPeer(peer p2p.Peer) { + s.logger.Debug("Rejecting peer from sync", "peer", peer.ID()) + s.snapshots.RejectPeer(peer.ID()) +} + // SyncAny tries to sync any of the snapshots in the snapshot pool, waiting to discover further // snapshots if none were found and discoveryTime > 0. It returns the latest state and block commit // which the caller must use to bootstrap the node. diff --git a/store/bench_test.go b/store/bench_test.go index ceb7a94e50e..4e85f828f72 100644 --- a/store/bench_test.go +++ b/store/bench_test.go @@ -17,7 +17,8 @@ func BenchmarkRepeatedLoadSeenCommitSameBlock(b *testing.B) { state, bs, cleanup := makeStateAndBlockStore() defer cleanup() h := bs.Height() + 1 - block := state.MakeBlock(h, test.MakeNTxs(h, 10), new(types.Commit), nil, state.Validators.GetProposer().Address) + block, err := state.MakeBlock(h, test.MakeNTxs(h, 10), new(types.Commit), nil, state.Validators.GetProposer().Address) + require.NoError(b, err) seenCommit := makeTestExtCommitWithNumSigs(block.Header.Height, cmttime.Now(), 100).ToCommit() ps, err := block.MakePartSet(types.BlockPartSizeBytes) require.NoError(b, err) diff --git a/store/store.go b/store/store.go index baffc704d10..7bd18243115 100644 --- a/store/store.go +++ b/store/store.go @@ -406,6 +406,14 @@ func (bs *BlockStore) PruneBlocks(height int64, state sm.State) (uint64, int64, if err := batch.Delete(calcSeenCommitKey(h)); err != nil { return 0, -1, err } + + if h < evidencePoint { + if err := batch.Delete(calcExtCommitKey(h)); err != nil { + return 0, -1, err + } + bs.blockExtendedCommitCache.Remove(h) + } + for p := 0; p < int(meta.BlockID.PartSetHeader.Total); p++ { if err := batch.Delete(calcBlockPartKey(h, p)); err != nil { return 0, -1, err diff --git a/store/store_test.go b/store/store_test.go index cafe7d34ffa..3cb8dfe4c9b 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -164,16 +164,17 @@ func TestBlockStoreSaveLoadBlock(t *testing.T) { // save a block big enough to have two block parts txs := []types.Tx{make([]byte, types.BlockPartSizeBytes)} // TX taking one block part alone - block := state.MakeBlock(bs.Height()+1, txs, new(types.Commit), nil, state.Validators.GetProposer().Address) + block, err := state.MakeBlock(bs.Height()+1, txs, new(types.Commit), nil, state.Validators.GetProposer().Address) + require.NoError(t, err) validPartSet, err := block.MakePartSet(types.BlockPartSizeBytes) require.NoError(t, err) require.GreaterOrEqual(t, validPartSet.Total(), uint32(2)) part2 := validPartSet.GetPart(1) - seenCommit := makeTestExtCommit(block.Header.Height, cmttime.Now()) + seenCommit := makeTestExtCommit(block.Height, cmttime.Now()) bs.SaveBlockWithExtendedCommit(block, validPartSet, seenCommit) require.EqualValues(t, 1, bs.Base(), "expecting the new height to be changed") - require.EqualValues(t, block.Header.Height, bs.Height(), "expecting the new height to be changed") + require.EqualValues(t, block.Height, bs.Height(), "expecting the new height to be changed") incompletePartSet := types.NewPartSetFromHeader(types.PartSetHeader{Total: 2}) uncontiguousPartSet := types.NewPartSetFromHeader(types.PartSetHeader{Total: 0}) @@ -406,9 +407,10 @@ func TestSaveBlockWithExtendedCommitPanicOnAbsentExtension(t *testing.T) { state, bs, cleanup := makeStateAndBlockStore() defer cleanup() h := bs.Height() + 1 - block := state.MakeBlock(h, test.MakeNTxs(h, 10), new(types.Commit), nil, state.Validators.GetProposer().Address) + block, err := state.MakeBlock(h, test.MakeNTxs(h, 10), new(types.Commit), nil, state.Validators.GetProposer().Address) + require.NoError(t, err) - seenCommit := makeTestExtCommit(block.Header.Height, cmttime.Now()) + seenCommit := makeTestExtCommit(block.Height, cmttime.Now()) ps, err := block.MakePartSet(types.BlockPartSizeBytes) require.NoError(t, err) testCase.malleateCommit(seenCommit) @@ -447,8 +449,9 @@ func TestLoadBlockExtendedCommit(t *testing.T) { state, bs, cleanup := makeStateAndBlockStore() defer cleanup() h := bs.Height() + 1 - block := state.MakeBlock(h, test.MakeNTxs(h, 10), new(types.Commit), nil, state.Validators.GetProposer().Address) - seenCommit := makeTestExtCommit(block.Header.Height, cmttime.Now()) + block, err := state.MakeBlock(h, test.MakeNTxs(h, 10), new(types.Commit), nil, state.Validators.GetProposer().Address) + require.NoError(t, err) + seenCommit := makeTestExtCommit(block.Height, cmttime.Now()) ps, err := block.MakePartSet(types.BlockPartSizeBytes) require.NoError(t, err) if testCase.saveExtended { @@ -477,7 +480,8 @@ func TestLoadBaseMeta(t *testing.T) { bs := NewBlockStore(dbm.NewMemDB()) for h := int64(1); h <= 10; h++ { - block := state.MakeBlock(h, test.MakeNTxs(h, 10), new(types.Commit), nil, state.Validators.GetProposer().Address) + block, err := state.MakeBlock(h, test.MakeNTxs(h, 10), new(types.Commit), nil, state.Validators.GetProposer().Address) + require.NoError(t, err) partSet, err := block.MakePartSet(types.BlockPartSizeBytes) require.NoError(t, err) seenCommit := makeTestExtCommit(h, cmttime.Now()) @@ -522,7 +526,8 @@ func TestLoadBlockPart(t *testing.T) { require.Contains(t, panicErr.Error(), "unmarshal to cmtproto.Part failed") // 3. A good block serialized and saved to the DB should be retrievable - block := state.MakeBlock(height, nil, new(types.Commit), nil, state.Validators.GetProposer().Address) + block, err := state.MakeBlock(height, nil, new(types.Commit), nil, state.Validators.GetProposer().Address) + require.NoError(t, err) partSet, err := block.MakePartSet(types.BlockPartSizeBytes) require.NoError(t, err) part1 := partSet.GetPart(0) @@ -567,7 +572,8 @@ func TestPruneBlocks(t *testing.T) { // make more than 1000 blocks, to test batch deletions for h := int64(1); h <= 1500; h++ { - block := state.MakeBlock(h, test.MakeNTxs(h, 10), new(types.Commit), nil, state.Validators.GetProposer().Address) + block, err := state.MakeBlock(h, test.MakeNTxs(h, 10), new(types.Commit), nil, state.Validators.GetProposer().Address) + require.NoError(t, err) partSet, err := block.MakePartSet(types.BlockPartSizeBytes) require.NoError(t, err) seenCommit := makeTestExtCommit(h, cmttime.Now()) @@ -601,7 +607,10 @@ func TestPruneBlocks(t *testing.T) { require.NotNil(t, bs.LoadBlockMeta(1100)) require.Nil(t, bs.LoadBlockMeta(1099)) require.NotNil(t, bs.LoadBlockCommit(1100)) + require.NotNil(t, bs.LoadBlockExtendedCommit(1100)) + // check for pruning require.Nil(t, bs.LoadBlockCommit(1099)) + require.Nil(t, bs.LoadBlockExtendedCommit(1099)) for i := int64(1); i < 1200; i++ { require.Nil(t, bs.LoadBlock(i)) @@ -630,7 +639,10 @@ func TestPruneBlocks(t *testing.T) { require.NotNil(t, bs.LoadBlockMeta(1100)) require.Nil(t, bs.LoadBlockMeta(1099)) require.NotNil(t, bs.LoadBlockCommit(1100)) + require.NotNil(t, bs.LoadBlockExtendedCommit(1100)) + // check for pruning require.Nil(t, bs.LoadBlockCommit(1099)) + require.Nil(t, bs.LoadBlockExtendedCommit(1099)) // Pruning beyond the current height should error _, _, err = bs.PruneBlocks(1501, state) @@ -696,29 +708,31 @@ func TestLoadBlockMetaByHash(t *testing.T) { require.NoError(t, err) bs := NewBlockStore(dbm.NewMemDB()) - b1 := state.MakeBlock(state.LastBlockHeight+1, test.MakeNTxs(state.LastBlockHeight+1, 10), new(types.Commit), nil, state.Validators.GetProposer().Address) + b1, err := state.MakeBlock(state.LastBlockHeight+1, test.MakeNTxs(state.LastBlockHeight+1, 10), new(types.Commit), nil, state.Validators.GetProposer().Address) + require.NoError(t, err) partSet, err := b1.MakePartSet(types.BlockPartSizeBytes) require.NoError(t, err) seenCommit := makeTestExtCommit(1, cmttime.Now()) bs.SaveBlock(b1, partSet, seenCommit.ToCommit()) baseBlock := bs.LoadBlockMetaByHash(b1.Hash()) - assert.EqualValues(t, b1.Header.Height, baseBlock.Header.Height) - assert.EqualValues(t, b1.Header.LastBlockID, baseBlock.Header.LastBlockID) - assert.EqualValues(t, b1.Header.ChainID, baseBlock.Header.ChainID) + assert.EqualValues(t, b1.Height, baseBlock.Header.Height) + assert.EqualValues(t, b1.LastBlockID, baseBlock.Header.LastBlockID) + assert.EqualValues(t, b1.ChainID, baseBlock.Header.ChainID) } func TestBlockFetchAtHeight(t *testing.T) { state, bs, cleanup := makeStateAndBlockStore() defer cleanup() require.Equal(t, bs.Height(), int64(0), "initially the height should be zero") - block := state.MakeBlock(bs.Height()+1, nil, new(types.Commit), nil, state.Validators.GetProposer().Address) + block, err := state.MakeBlock(bs.Height()+1, nil, new(types.Commit), nil, state.Validators.GetProposer().Address) + require.NoError(t, err) partSet, err := block.MakePartSet(types.BlockPartSizeBytes) require.NoError(t, err) - seenCommit := makeTestExtCommit(block.Header.Height, cmttime.Now()) + seenCommit := makeTestExtCommit(block.Height, cmttime.Now()) bs.SaveBlockWithExtendedCommit(block, partSet, seenCommit) - require.Equal(t, bs.Height(), block.Header.Height, "expecting the new height to be changed") + require.Equal(t, bs.Height(), block.Height, "expecting the new height to be changed") blockAtHeight := bs.LoadBlock(bs.Height()) b1, err := block.ToProto() diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile index 3dd11ce7ead..d5738bf73ee 100644 --- a/test/docker/Dockerfile +++ b/test/docker/Dockerfile @@ -1,23 +1,35 @@ -FROM golang:1.15 +FROM golang:1.22 + +# Avoid interactive prompts during apt operations +ENV DEBIAN_FRONTEND=noninteractive # Grab deps (jq, hexdump, xxd, killall) +# - hexdump lives in bsdextrautils on bookworm +# - xxd is available as its own package (no need for vim-common) +# - netcat is virtual; pick netcat-openbsd RUN apt-get update && \ apt-get install -y --no-install-recommends \ - jq bsdmainutils vim-common psmisc netcat curl + jq \ + bsdextrautils \ + xxd \ + psmisc \ + netcat-openbsd \ + curl \ + && rm -rf /var/lib/apt/lists/* # Setup CometBFT repo -ENV REPO $GOPATH/src/github.com/cometbft/cometbft -ENV GOBIN $GOPATH/bin +ENV REPO=$GOPATH/src/github.com/cometbft/cometbft +ENV GOBIN=$GOPATH/bin WORKDIR $REPO +# (Optional cache boost) copy mod files first for better go mod caching +# Comment these two lines out if they don't exist in your tree +COPY go.mod go.sum ./ +RUN go mod download || true + # Copy in the code -# TODO: rewrite to only copy Makefile & other files? COPY . $REPO -# Install the vendored dependencies -# docker caching prevents reinstall on code change! -RUN make tools - # install ABCI CLI RUN make install_abci diff --git a/test/e2e/docker/Dockerfile b/test/e2e/docker/Dockerfile index 8f422d57f00..b8254848155 100644 --- a/test/e2e/docker/Dockerfile +++ b/test/e2e/docker/Dockerfile @@ -1,32 +1,56 @@ -# We need to build in a Linux environment to support C libraries, e.g. RocksDB. -# We use Debian instead of Alpine, so that we can use binary database packages -# instead of spending time compiling them. -FROM cometbft/cometbft-db-testing:v0.11.0 +# Multi-stage build Dockerfile for CometBFT end-to-end testing +# Stage 1: Build environment - compiles the application and test node +FROM cometbft/cometbft-db-testing:v0.14.2 AS build -RUN apt-get -qq update -y && apt-get -qq upgrade -y >/dev/null - -# Set up build directory /src/cometbft -ENV COMETBFT_BUILD_OPTIONS badgerdb,boltdb,cleveldb,rocksdb WORKDIR /src/cometbft -# Fetch dependencies separately (for layer caching) +# Copy Go module files and download dependencies +# This is done before copying the rest of the code to leverage Docker's build cache COPY go.mod go.sum ./ RUN go mod download -# Build CometBFT and install into /usr/bin/cometbft +# Copy the entire codebase into the container COPY . . -RUN make build && cp build/cometbft /usr/bin/cometbft -COPY test/e2e/docker/entrypoint* /usr/bin/ -RUN cd test/e2e && make node && cp build/node /usr/bin/app -# Set up runtime directory. We don't use a separate runtime image since we need -# e.g. leveldb and rocksdb which are already installed in the build image. +# Set build options to include specific features and databases +ENV COMETBFT_BUILD_OPTIONS=badgerdb,boltdb,cleveldb,rocksdb +RUN make build +RUN cd test/e2e && make node + +# Stage 2: Final image - minimal runtime environment +FROM debian:bookworm-slim AS runtime + +# Update system packages and install network utilities +RUN apt-get -qq update -y && apt-get -qq upgrade -y >/dev/null +RUN apt-get -qq install -y iputils-ping iproute2 >/dev/null +RUN apt install libsnappy-dev libgflags-dev libleveldb-dev -y >/dev/null + WORKDIR /cometbft VOLUME /cometbft ENV CMTHOME=/cometbft -ENV GORACE "halt_on_error=1" +# Configure Go race detector to halt on error +ENV GORACE="halt_on_error=1" + +# Copy RocksDB shared libraries from the build stage +COPY --from=build /usr/local/lib/librocksdb.so* /lib/ + +# Copy executables from the build stage +# - entrypoint script for container initialization +# - cometbft binary for the blockchain node +# - app binary for the test application +COPY --from=build /src/cometbft/test/e2e/docker/entrypoint* /usr/bin/ +COPY --from=build /src/cometbft/build/cometbft /usr/bin/cometbft +COPY --from=build /src/cometbft/test/e2e/build/node /usr/bin/app + +# Expose ports: +# - 26656: P2P communication between nodes +# - 26657: RPC server for API requests +# - 26660: ABCI server for application communication +# - 6060: Prometheus metrics endpoint EXPOSE 26656 26657 26660 6060 + +# Set the entrypoint script to initialize the container ENTRYPOINT ["/usr/bin/entrypoint"] +# Default command to run when container starts (can be overridden) CMD ["node"] -STOPSIGNAL SIGTERM diff --git a/test/e2e/node/config.go b/test/e2e/node/config.go index f06ddc80d3d..7d3ba218a7b 100644 --- a/test/e2e/node/config.go +++ b/test/e2e/node/config.go @@ -59,7 +59,7 @@ func LoadConfig(file string) (*Config, error) { // Validate validates the configuration. We don't do exhaustive config // validation here, instead relying on Testnet.Validate() to handle it. // -//nolint:goconst + func (cfg Config) Validate() error { switch { case cfg.ChainID == "": diff --git a/test/e2e/node/main.go b/test/e2e/node/main.go index b6451e493be..60ca45d3920 100644 --- a/test/e2e/node/main.go +++ b/test/e2e/node/main.go @@ -62,7 +62,7 @@ func run(configFile string) error { if err = startSigner(cfg); err != nil { return err } - if cfg.Protocol == "builtin" || cfg.Protocol == "builtin_connsync" { + if cfg.Protocol == string(e2e.ProtocolBuiltin) || cfg.Protocol == string(e2e.ProtocolBuiltinConnSync) { time.Sleep(1 * time.Second) } } @@ -71,7 +71,7 @@ func run(configFile string) error { switch cfg.Protocol { case "socket", "grpc": err = startApp(cfg) - case "builtin", "builtin_connsync": + case string(e2e.ProtocolBuiltin), string(e2e.ProtocolBuiltinConnSync): if cfg.Mode == string(e2e.ModeLight) { err = startLightClient(cfg) } else { diff --git a/test/e2e/run-multiple.sh b/test/e2e/run-multiple.sh index 571a78a7faf..47322257bda 100755 --- a/test/e2e/run-multiple.sh +++ b/test/e2e/run-multiple.sh @@ -20,10 +20,11 @@ FAILED=() for MANIFEST in "$@"; do START=$SECONDS echo "==> Running testnet: $MANIFEST" + echo "==> Manifest:" + cat "$MANIFEST" if ! ./build/runner -f "$MANIFEST"; then - echo "==> Testnet $MANIFEST failed, dumping manifest..." - cat "$MANIFEST" + echo "==> Testnet failed" echo "==> Dumping container logs for $MANIFEST..." ./build/runner -f "$MANIFEST" logs diff --git a/test/e2e/runner/benchmark.go b/test/e2e/runner/benchmark.go index bd671fc4f58..6dd3d55a1c3 100644 --- a/test/e2e/runner/benchmark.go +++ b/test/e2e/runner/benchmark.go @@ -208,7 +208,7 @@ func extractTestnetStats(intervals []time.Duration) testnetStats { for _, interval := range intervals { diff := (interval - mean).Seconds() - std += math.Pow(diff, 2) + std += diff * diff } std = math.Sqrt(std / float64(len(intervals))) diff --git a/test/e2e/tests/block_test.go b/test/e2e/tests/block_test.go index e76e622eb11..7fc9e9ce081 100644 --- a/test/e2e/tests/block_test.go +++ b/test/e2e/tests/block_test.go @@ -29,20 +29,20 @@ func TestBlock_Header(t *testing.T) { } for _, block := range blocks { - if block.Header.Height < first { + if block.Height < first { continue } - if block.Header.Height > last { + if block.Height > last { break } - resp, err := client.Block(ctx, &block.Header.Height) + resp, err := client.Block(ctx, &block.Height) require.NoError(t, err) require.Equal(t, block, resp.Block, - "block mismatch for height %d", block.Header.Height) + "block mismatch for height %d", block.Height) require.NoError(t, resp.Block.ValidateBasic(), - "block at height %d is invalid", block.Header.Height) + "block at height %d is invalid", block.Height) } }) } diff --git a/test/loadtime/report/report.go b/test/loadtime/report/report.go index 32ee960f915..865291ef5d4 100644 --- a/test/loadtime/report/report.go +++ b/test/loadtime/report/report.go @@ -202,7 +202,7 @@ func GenerateFromBlockStore(s BlockStore) (*Reports, error) { // be used in the latency calculations because the last block whose // transactions are used is the block one before the last. cur := s.LoadBlock(i) - for _, tx := range prev.Data.Txs { + for _, tx := range prev.Txs { txc <- txData{tx: tx, bt: cur.Time} } prev = cur diff --git a/tests.mk b/tests.mk index ec461eb69de..765d2bd3fdc 100644 --- a/tests.mk +++ b/tests.mk @@ -61,7 +61,7 @@ vagrant_test: ### go tests test: @echo "--> Running go test" - @go test -p 1 $(PACKAGES) -tags deadlock + @go test -p 1 $(PACKAGES) .PHONY: test test_race: @@ -71,5 +71,5 @@ test_race: test_deadlock: @echo "--> Running go test --deadlock" - @go test -p 1 -v $(PACKAGES) -tags deadlock + @go test -p 1 -v $(PACKAGES) -tags deadlock .PHONY: test_race diff --git a/third_party/proto/gogoproto/README.md b/third_party/proto/gogoproto/README.md deleted file mode 100644 index 3852d578d3e..00000000000 --- a/third_party/proto/gogoproto/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Buf - -This file is now stored in the buf registry at [buf.build/cosmos/gogo-proto](https://buf.build/cosmos/gogo-proto). diff --git a/tools/README.md b/tools/README.md deleted file mode 100644 index 9368f26015c..00000000000 --- a/tools/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# tools - -Tools for working with CometBFT and associated technologies. -Documentation for these tools can be found online in the -[CometBFT tools documentation](https://docs.cometbft.com/v0.38.x/tools/). diff --git a/tools/proto/Dockerfile b/tools/proto/Dockerfile deleted file mode 100644 index bd2d486a33f..00000000000 --- a/tools/proto/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM bufbuild/buf:latest as buf - -FROM golang:1.14-alpine3.11 as builder - -RUN apk add --update --no-cache build-base curl git upx && \ - rm -rf /var/cache/apk/* - -ENV GOLANG_PROTOBUF_VERSION=1.3.1 \ - GOGOPROTO_VERSION=1.4.1 - -RUN GO111MODULE=on go get \ - github.com/golang/protobuf/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} \ - github.com/cosmos/gogoproto/protoc-gen-gogo@v${GOGOPROTO_VERSION} \ - github.com/cosmos/gogoproto/protoc-gen-gogofaster@v${GOGOPROTO_VERSION} && \ - mv /go/bin/protoc-gen-go* /usr/local/bin/ - - -FROM alpine:edge - -WORKDIR /work - -RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \ - apk add --update --no-cache clang && \ - rm -rf /var/cache/apk/* - -COPY --from=builder /usr/local/bin /usr/local/bin -COPY --from=buf /usr/local/bin /usr/local/bin diff --git a/tools/tools.go b/tools/tools.go deleted file mode 100644 index adfaa7f1454..00000000000 --- a/tools/tools.go +++ /dev/null @@ -1,13 +0,0 @@ -//go:build tools - -// This file uses the recommended method for tracking developer tools in a go module. -// -// https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module - -package tools - -import ( - _ "github.com/bufbuild/buf/cmd/buf" - _ "github.com/golangci/golangci-lint/cmd/golangci-lint" - _ "github.com/vektra/mockery/v2" -) diff --git a/types/block_meta.go b/types/block_meta.go index 9dcefcb34d1..9a795299231 100644 --- a/types/block_meta.go +++ b/types/block_meta.go @@ -22,7 +22,7 @@ func NewBlockMeta(block *Block, blockParts *PartSet) *BlockMeta { BlockID: BlockID{block.Hash(), blockParts.Header()}, BlockSize: block.Size(), Header: block.Header, - NumTxs: len(block.Data.Txs), + NumTxs: len(block.Txs), } } diff --git a/types/block_test.go b/types/block_test.go index f9c97a7e840..2c299cfcd74 100644 --- a/types/block_test.go +++ b/types/block_test.go @@ -82,8 +82,8 @@ func TestBlockValidateBasic(t *testing.T) { }, true}, {"Remove LastCommitHash", func(blk *Block) { blk.LastCommitHash = []byte("something else") }, true}, {"Tampered Data", func(blk *Block) { - blk.Data.Txs[0] = Tx("something else") - blk.Data.hash = nil // clear hash or change wont be noticed + blk.Txs[0] = Tx("something else") + blk.hash = nil // clear hash or change wont be noticed }, true}, {"Tampered DataHash", func(blk *Block) { blk.DataHash = cmtrand.Bytes(len(blk.DataHash)) diff --git a/types/light.go b/types/light.go index e3ef1f63db5..939beec665d 100644 --- a/types/light.go +++ b/types/light.go @@ -34,9 +34,9 @@ func (lb LightBlock) ValidateBasic(chainID string) error { } // make sure the validator set is consistent with the header - if valSetHash := lb.ValidatorSet.Hash(); !bytes.Equal(lb.SignedHeader.ValidatorsHash, valSetHash) { + if valSetHash := lb.ValidatorSet.Hash(); !bytes.Equal(lb.ValidatorsHash, valSetHash) { return fmt.Errorf("expected validator hash of header to match validator set hash (%X != %X)", - lb.SignedHeader.ValidatorsHash, valSetHash, + lb.ValidatorsHash, valSetHash, ) } @@ -154,7 +154,7 @@ func (sh SignedHeader) ValidateBasic(chainID string) error { if sh.Commit.Height != sh.Height { return fmt.Errorf("header and commit height mismatch: %d vs %d", sh.Height, sh.Commit.Height) } - if hhash, chash := sh.Header.Hash(), sh.Commit.BlockID.Hash; !bytes.Equal(hhash, chash) { + if hhash, chash := sh.Hash(), sh.Commit.BlockID.Hash; !bytes.Equal(hhash, chash) { return fmt.Errorf("commit signs block %X, header is block %X", chash, hhash) } diff --git a/types/light_test.go b/types/light_test.go index 82af25277f1..2d3d7a2e971 100644 --- a/types/light_test.go +++ b/types/light_test.go @@ -153,7 +153,7 @@ func TestSignedHeaderValidateBasic(t *testing.T) { Header: tc.shHeader, Commit: tc.shCommit, } - err := sh.ValidateBasic(validSignedHeader.Header.ChainID) + err := sh.ValidateBasic(validSignedHeader.ChainID) assert.Equalf( t, tc.expectErr, diff --git a/types/part_set.go b/types/part_set.go index 87a81f1c6bc..92e54cacb66 100644 --- a/types/part_set.go +++ b/types/part_set.go @@ -22,6 +22,19 @@ var ( ErrPartInvalidSize = errors.New("error inner part with invalid size") ) +// ErrInvalidPart is an error type for invalid parts. +type ErrInvalidPart struct { + Reason error +} + +func (e ErrInvalidPart) Error() string { + return fmt.Sprintf("invalid part: %v", e.Reason) +} + +func (e ErrInvalidPart) Unwrap() error { + return e.Reason +} + type Part struct { Index uint32 `json:"index"` Bytes cmtbytes.HexBytes `json:"bytes"` @@ -37,8 +50,11 @@ func (part *Part) ValidateBasic() error { if int64(part.Index) < part.Proof.Total-1 && len(part.Bytes) != int(BlockPartSizeBytes) { return ErrPartInvalidSize } + if int64(part.Index) != part.Proof.Index { + return ErrInvalidPart{Reason: fmt.Errorf("part index %d != proof index %d", part.Index, part.Proof.Index)} + } if err := part.Proof.ValidateBasic(); err != nil { - return fmt.Errorf("wrong Proof: %w", err) + return ErrInvalidPart{Reason: fmt.Errorf("wrong Proof: %w", err)} } return nil } @@ -275,6 +291,7 @@ func (ps *PartSet) Total() uint32 { return ps.total } +// CONTRACT: part is validated using ValidateBasic. func (ps *PartSet) AddPart(part *Part) (bool, error) { // TODO: remove this? would be preferable if this only returned (false, nil) // when its a duplicate block part diff --git a/types/part_set_test.go b/types/part_set_test.go index 260618dab1d..99ddab6fc37 100644 --- a/types/part_set_test.go +++ b/types/part_set_test.go @@ -125,7 +125,7 @@ func TestPartSetHeaderValidateBasic(t *testing.T) { } } -func TestPartValidateBasic(t *testing.T) { +func TestPart_ValidateBasic(t *testing.T) { testCases := []struct { testName string malleatePart func(*Part) @@ -137,6 +137,7 @@ func TestPartValidateBasic(t *testing.T) { pt.Index = 1 pt.Bytes = make([]byte, BlockPartSizeBytes-1) pt.Proof.Total = 2 + pt.Proof.Index = 1 }, false}, {"Too small inner part", func(pt *Part) { pt.Index = 0 @@ -149,6 +150,11 @@ func TestPartValidateBasic(t *testing.T) { Index: 1, LeafHash: make([]byte, 1024*1024), } + pt.Index = 1 + }, true}, + {"Index mismatch", func(pt *Part) { + pt.Index = 1 + pt.Proof.Index = 0 }, true}, } diff --git a/types/proposal.go b/types/proposal.go index 9bae5e4efa4..41121ce47d3 100644 --- a/types/proposal.go +++ b/types/proposal.go @@ -79,6 +79,22 @@ func (p *Proposal) ValidateBasic() error { return nil } +// ValidateBlockSize block size ensures that a proposal block is not larger +// than a maximum number of bytes, based on the total amount of parts reported +// in the PartSetHeader. If -1 is passed as the maxBlockSizeBytes, +// types.MaxBlockSizeBytes will be used as the maximum. +func (p *Proposal) ValidateBlockSize(maxBlockSizeBytes int64) error { + if maxBlockSizeBytes == -1 { + maxBlockSizeBytes = int64(MaxBlockSizeBytes) + } + totalParts := int64(p.BlockID.PartSetHeader.Total) + maxParts := (maxBlockSizeBytes-1)/int64(BlockPartSizeBytes) + 1 + if totalParts > maxParts { + return fmt.Errorf("proposal has too many parts %d (max: %d)", totalParts, maxParts) + } + return nil +} + // String returns a string representation of the Proposal. // // 1. height diff --git a/types/proposal_test.go b/types/proposal_test.go index 0e7f574c4ac..24e01a8cef0 100644 --- a/types/proposal_test.go +++ b/types/proposal_test.go @@ -190,3 +190,30 @@ func TestProposalProtoBuf(t *testing.T) { } } } + +func TestProposalValidateBlockSize(t *testing.T) { + testCases := []struct { + testName string + maxBlockSize int64 + proposal *Proposal + expectPass bool + }{ + {"10 chunk max, 5 chunk proposal, success", int64(10 * BlockPartSizeBytes), NewProposal(0, 0, 0, BlockID{PartSetHeader: PartSetHeader{Total: 5}}), true}, + {"10 chunk max, 20 chunk proposal, fail", int64(10 * BlockPartSizeBytes), NewProposal(0, 0, 0, BlockID{PartSetHeader: PartSetHeader{Total: 20}}), false}, + {"10 chunk max, max uint32 chunk proposal, fail", int64(10 * BlockPartSizeBytes), NewProposal(0, 0, 0, BlockID{PartSetHeader: PartSetHeader{Total: math.MaxUint32}}), false}, + {"-1 chunk max, max uint32 chunk proposal, fail", -1, NewProposal(0, 0, 0, BlockID{PartSetHeader: PartSetHeader{Total: math.MaxUint32}}), false}, + {"0 chunk max, max uint32 chunk proposal, fail", -1, NewProposal(0, 0, 0, BlockID{PartSetHeader: PartSetHeader{Total: math.MaxUint32}}), false}, + {"total parts equals chunk max, success", -1, NewProposal(0, 0, 0, BlockID{PartSetHeader: PartSetHeader{Total: 1600}}), true}, + } + for _, tc := range testCases { + tc := tc + t.Run(tc.testName, func(t *testing.T) { + err := tc.proposal.ValidateBlockSize(tc.maxBlockSize) + if tc.expectPass { + require.NoError(t, err) + } else { + require.Error(t, err) + } + }) + } +} diff --git a/types/validation.go b/types/validation.go index 77d9e47c021..2f21d5c9ae0 100644 --- a/types/validation.go +++ b/types/validation.go @@ -1,6 +1,7 @@ package types import ( + "bytes" "errors" "fmt" @@ -246,6 +247,10 @@ func verifyCommitBatch( // them by index else we need to retrieve them by address if lookUpByIndex { val = vals.Validators[idx] + if !bytes.Equal(val.Address, commitSig.ValidatorAddress) { + return fmt.Errorf("validator address mismatch at index %d: expected %X, got %X", + idx, val.Address, commitSig.ValidatorAddress) + } } else { valIdx, val = vals.GetByAddress(commitSig.ValidatorAddress) @@ -354,6 +359,10 @@ func verifyCommitSingle( // them by index else we need to retrieve them by address if lookUpByIndex { val = vals.Validators[idx] + if !bytes.Equal(val.Address, commitSig.ValidatorAddress) { + return fmt.Errorf("validator address mismatch at index %d: expected %X, got %X", + idx, val.Address, commitSig.ValidatorAddress) + } } else { valIdx, val = vals.GetByAddress(commitSig.ValidatorAddress) diff --git a/types/validator_set.go b/types/validator_set.go index 62b53dc8945..434ae916e7e 100644 --- a/types/validator_set.go +++ b/types/validator_set.go @@ -310,28 +310,39 @@ func (vals *ValidatorSet) Size() int { } // Forces recalculation of the set's total voting power. -// Panics if total voting power is bigger than MaxTotalVotingPower. -func (vals *ValidatorSet) updateTotalVotingPower() { +// Returns an error if total voting power exceeds MaxTotalVotingPower. +func (vals *ValidatorSet) updateTotalVotingPower() error { sum := int64(0) for _, val := range vals.Validators { // mind overflow sum = safeAddClip(sum, val.VotingPower) if sum > MaxTotalVotingPower { - panic(fmt.Sprintf( - "Total voting power should be guarded to not exceed %v; got: %v", - MaxTotalVotingPower, - sum)) + return fmt.Errorf("total voting power %d exceeds maximum %d", sum, MaxTotalVotingPower) } } vals.totalVotingPower = sum + return nil +} + +// TotalVotingPowerSafe returns the sum of the voting powers of all validators, +// or an error if the total exceeds MaxTotalVotingPower. +func (vals *ValidatorSet) TotalVotingPowerSafe() (int64, error) { + if vals.totalVotingPower == 0 { + if err := vals.updateTotalVotingPower(); err != nil { + return 0, err + } + } + return vals.totalVotingPower, nil } // TotalVotingPower returns the sum of the voting powers of all validators. // It recomputes the total voting power if required. func (vals *ValidatorSet) TotalVotingPower() int64 { if vals.totalVotingPower == 0 { - vals.updateTotalVotingPower() + if err := vals.updateTotalVotingPower(); err != nil { + panic(err) + } } return vals.totalVotingPower } @@ -665,7 +676,9 @@ func (vals *ValidatorSet) updateWithChangeSet(changes []*Validator, allowDeletes // Should go after additions. vals.checkAllKeysHaveSameType() - vals.updateTotalVotingPower() // will panic if total voting power > MaxTotalVotingPower + if err = vals.updateTotalVotingPower(); err != nil { + panic(err) + } // Scale and center. vals.RescalePriorities(PriorityWindowSizeFactor * vals.TotalVotingPower()) @@ -935,7 +948,10 @@ func ValidatorSetFromProto(vp *cmtproto.ValidatorSet) (*ValidatorSet, error) { // power hence we need to recompute it. // FIXME: We should look to remove TotalVotingPower from proto or add it in the validators hash // so we don't have to do this - vals.TotalVotingPower() + // NOTE: Use TotalVotingPowerSafe to return error instead of panicking on invalid input. + if _, err := vals.TotalVotingPowerSafe(); err != nil { + return nil, err + } return vals, vals.ValidateBasic() } @@ -960,7 +976,9 @@ func ValidatorSetFromExistingValidators(valz []*Validator) (*ValidatorSet, error } vals.checkAllKeysHaveSameType() vals.Proposer = vals.findPreviousProposer() - vals.updateTotalVotingPower() + if err := vals.updateTotalVotingPower(); err != nil { + return nil, err + } sort.Sort(ValidatorsByVotingPower(vals.Validators)) return vals, nil } diff --git a/types/validator_set_test.go b/types/validator_set_test.go index 2a281f12198..f332cbe9648 100644 --- a/types/validator_set_test.go +++ b/types/validator_set_test.go @@ -14,6 +14,7 @@ import ( "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/crypto/ed25519" + cryptoenc "github.com/cometbft/cometbft/crypto/encoding" "github.com/cometbft/cometbft/crypto/sr25519" cmtmath "github.com/cometbft/cometbft/libs/math" cmtrand "github.com/cometbft/cometbft/libs/rand" @@ -471,6 +472,25 @@ func TestValidatorSetTotalVotingPowerPanicsOnOverflow(t *testing.T) { assert.Panics(t, shouldPanic) } +func TestValidatorSetFromProtoReturnsErrorOnOverflow(t *testing.T) { + // ValidatorSetFromProto should return an error instead of panicking when total voting power exceeds MaxTotalVotingPower. + pubKey := ed25519.GenPrivKey().PubKey() + pkProto, err := cryptoenc.PubKeyToProto(pubKey) + require.NoError(t, err) + + protoVals := &cmtproto.ValidatorSet{ + Validators: []*cmtproto.Validator{ + {Address: pubKey.Address(), PubKey: pkProto, VotingPower: math.MaxInt64, ProposerPriority: 0}, + {Address: pubKey.Address(), PubKey: pkProto, VotingPower: math.MaxInt64, ProposerPriority: 0}, + }, + Proposer: &cmtproto.Validator{Address: pubKey.Address(), PubKey: pkProto, VotingPower: math.MaxInt64, ProposerPriority: 0}, + } + + _, err = ValidatorSetFromProto(protoVals) + require.Error(t, err) + assert.Contains(t, err.Error(), "exceeds maximum") +} + func TestAvgProposerPriority(t *testing.T) { // Create Validator set without calling IncrementProposerPriority: tcs := []struct { @@ -832,7 +852,8 @@ func verifyValidatorSet(t *testing.T, valSet *ValidatorSet) { // verify that the set's total voting power has been updated tvp := valSet.totalVotingPower - valSet.updateTotalVotingPower() + err := valSet.updateTotalVotingPower() + require.NoError(t, err) expectedTvp := valSet.TotalVotingPower() assert.Equal(t, expectedTvp, tvp, "expected TVP %d. Got %d, valSet=%s", expectedTvp, tvp, valSet) diff --git a/version/version.go b/version/version.go index c00b4f8ffe2..6b0cc79f2be 100644 --- a/version/version.go +++ b/version/version.go @@ -1,9 +1,9 @@ package version const ( - // TMVersionDefault is the used as the fallback version of CometBFT + // TMCoreSemVer is the used as the fallback version of CometBFT // when not using git describe. It is formatted with semantic versioning. - TMCoreSemVer = "0.38.12" + TMCoreSemVer = "0.38.19" // ABCISemVer is the semantic version of the ABCI protocol ABCISemVer = "2.0.0" ABCIVersion = ABCISemVer