Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: merge cometbft v0.37.5 #7

Open
wants to merge 590 commits into
base: Agoric
Choose a base branch
from
Open

Conversation

gibson042
Copy link

@gibson042 gibson042 commented Mar 6, 2024

Fixes Agoric/agoric-sdk#8995 following directions at Upgrading the Interchain Stack.

Upstream changes: cometbft/cometbft@v0.34.30...v0.37.5
Our changes from old upstream base: cometbft/cometbft@v0.34.30...agoric-labs:cometbft:v0.34.30-alpha.agoric.1
Our changes from new upstream base: cometbft/cometbft@v0.37.5...agoric-labs:cometbft:gibson-8995-merge-v0.37.4

PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use
    unclog to manage our changelog)
    CHANGELOG-Agoric.md
  • Updated relevant documentation (docs/ or spec/) and code comments

Details

Changes were required in .github/workflows (where we can't switch from rtCamp/action-slack-notify to slackapi/slack-github-action until replacing the repository secret SLACK_WEBHOOK with SLACK_WEBHOOK_URL, which neither @JimLarson nor I have sufficient privileges to do ourselves) and in abci/client/committing_client.go (where method changes were needed for the new Client interface... @michaelfig please read v0.37.4 UPGRADING.md and review the lock level in {Prepare,Process}Proposal{Sync,Async}).

# Setup

git remote update
OLD_BASE=v0.34.30
NEW_BASE=v0.37.4
# sed script for test output normalization
NORMALIZE='
  s/tendermint/cometbft/g;
  s/[0-9]{2}:[0-9]{2}(:[0-9]{2}([.][0-9]+)?)?/$hh:$mm/g;
  s/[0-9]+[.][0-9]+s/$duration/g;
  s/(127.0.0.1|\[?(::1|[0.:]*:1)\]?):[0-9]+/\1:$port/g;
  s/(should not run callback for) [0-9]+/\1 $n/g;
'

# Get test baselines

git switch $OLD_BASE && make build test &> test-$OLD_BASE.txt
git switch $NEW_BASE && make build test &> test-$NEW_BASE.txt
git switch Agoric && make build test &> test-Agoric.txt

awk '/^[^a-zA-Z0-9]*[Ff][Aa][Ii][Ll]/ { print; context=toupper(substr($0,1,4))!="FAIL"; next; } context' test-$OLD_BASE.txt | sed 's/^/# /'
# FAIL	github.com/tendermint/tendermint/light	51.135s
# --- FAIL: TestProvider (19.51s)
#     http_test.go:63: 
#         	Error Trace:	/home/rgibson/HD.VAULT/Projects/cometbft/light/provider/http/http_test.go:63
#         	Error:      	Should be true
#         	Test:       	TestProvider
#     http_test.go:78: 
#         	Error Trace:	/home/rgibson/HD.VAULT/Projects/cometbft/light/provider/http/http_test.go:78
#         	Error:      	Not equal: 
#         	            	expected: &errors.errorString{s:"height requested is too high"}
#         	            	actual  : &errors.errorString{s:"light block not found"}
#         	            	
#         	            	Diff:
#         	            	--- Expected
#         	            	+++ Actual
#         	            	@@ -1,3 +1,3 @@
#         	            	 (*errors.errorString)({
#         	            	- s: (string) (len=28) "height requested is too high"
#         	            	+ s: (string) (len=21) "light block not found"
#         	            	 })
#         	Test:       	TestProvider
# FAIL
# FAIL	github.com/tendermint/tendermint/light/provider/http	19.535s
# FAIL
# old upstream base vs. current head
gitdiff -U2 <(sed -E "$NORMALIZE" test-$OLD_BASE.txt) <(sed -E "$NORMALIZE" test-Agoric.txt) | sed 's/^/# /'
# diff --git 1/tmp/tmp.nIxdXs4Ed1/0//dev/fd/63 2/tmp/tmp.nIxdXs4Ed1/1//dev/fd/62
# index 8f6a04936..21fedc0b9 100644
# --- 1/tmp/tmp.nIxdXs4Ed1/0//dev/fd/63
# +++ 2/tmp/tmp.nIxdXs4Ed1/1//dev/fd/62
# @@ -1,3 +1,3 @@
# -CGO_ENABLED=0 go build -mod=readonly -ldflags "-X github.com/cometbft/cometbft/version.TMGitCommitHash=b3db15076 -s -w " -trimpath -tags 'cometbft' -o /home/rgibson/HD.VAULT/Projects/cometbft/build/cometbft ./cmd/cometbft/
# +CGO_ENABLED=0 go build -mod=readonly -ldflags "-X github.com/cometbft/cometbft/version.TMGitCommitHash=80d90f927 -s -w " -trimpath -tags 'cometbft' -o /home/rgibson/HD.VAULT/Projects/cometbft/build/cometbft ./cmd/cometbft/
#  --> Running go test
#  ok  	github.com/cometbft/cometbft/abci/client	(cached)
# @@ -44,5 +44,5 @@ ok  	github.com/cometbft/cometbft/evidence	(cached)
#  ?   	github.com/cometbft/cometbft/evidence/mocks	[no test files]
#  ok  	github.com/cometbft/cometbft/libs/async	(cached)
# -ok  	github.com/cometbft/cometbft/libs/autofile	(cached)
# +ok  	github.com/cometbft/cometbft/libs/autofile	$duration
#  ?   	github.com/cometbft/cometbft/libs/autofile/cmd	[no test files]
#  ok  	github.com/cometbft/cometbft/libs/bits	(cached)
# @@ -72,5 +72,5 @@ ok  	github.com/cometbft/cometbft/libs/tempfile	(cached)
#  ?   	github.com/cometbft/cometbft/libs/test	[no test files]
#  ok  	github.com/cometbft/cometbft/libs/timer	(cached)
# -2024/03/05 $hh:$mm verify from #2 to #15813 failed: invalid header: new header has a time from the future 2024-03-05 $hh:$mm +0000 UTC (now: 2024-03-05 $hh:$mm -0500 EST m=+51.103993481; max clock drift: 10s)
# +2024/03/05 $hh:$mm verify from #2 to #17028 failed: invalid header: new header has a time from the future 2024-03-05 $hh:$mm +0000 UTC (now: 2024-03-05 $hh:$mm -0500 EST m=+50.783803210; max clock drift: 10s)
#  FAIL	github.com/cometbft/cometbft/light	$duration
#  ?   	github.com/cometbft/cometbft/light/provider	[no test files]
# @@ -109,5 +109,5 @@ ok  	github.com/cometbft/cometbft/light/store/db	(cached)
#  ok  	github.com/cometbft/cometbft/mempool	(cached)
#  ?   	github.com/cometbft/cometbft/mempool/mock	[no test files]
# -ok  	github.com/cometbft/cometbft/mempool/v0	$duration
# +ok  	github.com/cometbft/cometbft/mempool/v0	(cached)
#  ok  	github.com/cometbft/cometbft/mempool/v1	(cached)
#  ok  	github.com/cometbft/cometbft/node	(cached)
# @@ -135,5 +135,5 @@ ok  	github.com/cometbft/cometbft/privval	(cached)
#  ok  	github.com/cometbft/cometbft/proxy	(cached)
#  ?   	github.com/cometbft/cometbft/proxy/mocks	[no test files]
# -ok  	github.com/cometbft/cometbft/rpc/client	$duration
# +ok  	github.com/cometbft/cometbft/rpc/client	(cached)
#  ?   	github.com/cometbft/cometbft/rpc/client/http	[no test files]
#  ?   	github.com/cometbft/cometbft/rpc/client/local	[no test files]
# old upstream base vs. new upstream base
gitdiff -U2 <(sed -E "$NORMALIZE" test-$OLD_BASE.txt) <(sed -E "$NORMALIZE" test-$NEW_BASE.txt) | sed 's/^/# /'
# diff --git 1/tmp/tmp.UBZXpACTkh/0//dev/fd/63 2/tmp/tmp.UBZXpACTkh/1//dev/fd/62
# index 8f6a04936..9cb0321b2 100644
# --- 1/tmp/tmp.UBZXpACTkh/0//dev/fd/63
# +++ 2/tmp/tmp.UBZXpACTkh/1//dev/fd/62
# @@ -1,3 +1,3 @@
# -CGO_ENABLED=0 go build -mod=readonly -ldflags "-X github.com/cometbft/cometbft/version.TMGitCommitHash=b3db15076 -s -w " -trimpath -tags 'cometbft' -o /home/rgibson/HD.VAULT/Projects/cometbft/build/cometbft ./cmd/cometbft/
# +CGO_ENABLED=0 go build -mod=readonly -ldflags "-X github.com/cometbft/cometbft/version.TMGitCommitHash=cce2e5da5 -s -w " -trimpath -tags 'cometbft' -o /home/rgibson/HD.VAULT/Projects/cometbft/build/cometbft ./cmd/cometbft/
#  --> Running go test
#  ok  	github.com/cometbft/cometbft/abci/client	(cached)
# @@ -6,5 +6,4 @@ ok  	github.com/cometbft/cometbft/abci/client	(cached)
#  ok  	github.com/cometbft/cometbft/abci/example	(cached)
#  ?   	github.com/cometbft/cometbft/abci/example/code	[no test files]
# -?   	github.com/cometbft/cometbft/abci/example/counter	[no test files]
#  ok  	github.com/cometbft/cometbft/abci/example/kvstore	(cached)
#  ?   	github.com/cometbft/cometbft/abci/server	[no test files]
# @@ -14,12 +13,8 @@ ok  	github.com/cometbft/cometbft/abci/tests	(cached)
#  ?   	github.com/cometbft/cometbft/abci/tests/benchmarks/simple	[no test files]
#  ?   	github.com/cometbft/cometbft/abci/tests/server	[no test files]
# -?   	github.com/cometbft/cometbft/abci/tests/test_app	[no test files]
#  ok  	github.com/cometbft/cometbft/abci/types	(cached)
# +?   	github.com/cometbft/cometbft/abci/types/mocks	[no test files]
#  ?   	github.com/cometbft/cometbft/abci/version	[no test files]
# -ok  	github.com/cometbft/cometbft/behaviour	(cached)
# -ok  	github.com/cometbft/cometbft/blockchain	(cached)
# -ok  	github.com/cometbft/cometbft/blockchain/v0	(cached)
# -ok  	github.com/cometbft/cometbft/blockchain/v1	(cached)
# -ok  	github.com/cometbft/cometbft/blockchain/v2	(cached)
# +ok  	github.com/cometbft/cometbft/blocksync	(cached)
#  ?   	github.com/cometbft/cometbft/cmd/cometbft	[no test files]
#  ok  	github.com/cometbft/cometbft/cmd/cometbft/commands	(cached)
# @@ -43,4 +38,5 @@ ok  	github.com/cometbft/cometbft/crypto/xsalsa20symmetric	(cached)
#  ok  	github.com/cometbft/cometbft/evidence	(cached)
#  ?   	github.com/cometbft/cometbft/evidence/mocks	[no test files]
# +ok  	github.com/cometbft/cometbft/internal/test	(cached)
#  ok  	github.com/cometbft/cometbft/libs/async	(cached)
#  ok  	github.com/cometbft/cometbft/libs/autofile	(cached)
# @@ -52,5 +48,5 @@ ok  	github.com/cometbft/cometbft/libs/cli/flags	(cached)
#  ok  	github.com/cometbft/cometbft/libs/clist	(cached)
#  ok  	github.com/cometbft/cometbft/libs/cmap	(cached)
# -ok  	github.com/cometbft/cometbft/libs/events	$duration
# +ok  	github.com/cometbft/cometbft/libs/events	(cached)
#  ?   	github.com/cometbft/cometbft/libs/fail	[no test files]
#  ok  	github.com/cometbft/cometbft/libs/flowrate	(cached)
# @@ -72,6 +68,5 @@ ok  	github.com/cometbft/cometbft/libs/tempfile	(cached)
#  ?   	github.com/cometbft/cometbft/libs/test	[no test files]
#  ok  	github.com/cometbft/cometbft/libs/timer	(cached)
# -2024/03/05 $hh:$mm verify from #2 to #15813 failed: invalid header: new header has a time from the future 2024-03-05 $hh:$mm +0000 UTC (now: 2024-03-05 $hh:$mm -0500 EST m=+51.103993481; max clock drift: 10s)
# -FAIL	github.com/cometbft/cometbft/light	$duration
# +ok  	github.com/cometbft/cometbft/light	(cached)
#  ?   	github.com/cometbft/cometbft/light/provider	[no test files]
#  CometBFT running!
# @@ -108,6 +103,6 @@ FAIL	github.com/cometbft/cometbft/light/provider/http	$duration
#  ok  	github.com/cometbft/cometbft/light/store/db	(cached)
#  ok  	github.com/cometbft/cometbft/mempool	(cached)
# -?   	github.com/cometbft/cometbft/mempool/mock	[no test files]
# -ok  	github.com/cometbft/cometbft/mempool/v0	$duration
# +?   	github.com/cometbft/cometbft/mempool/mocks	[no test files]
# +ok  	github.com/cometbft/cometbft/mempool/v0	(cached)
#  ok  	github.com/cometbft/cometbft/mempool/v1	(cached)
#  ok  	github.com/cometbft/cometbft/node	(cached)
# @@ -118,7 +113,6 @@ ok  	github.com/cometbft/cometbft/p2p/conn	(cached)
#  ok  	github.com/cometbft/cometbft/p2p/pex	(cached)
#  ok  	github.com/cometbft/cometbft/p2p/trust	(cached)
# -?   	github.com/cometbft/cometbft/p2p/upnp	[no test files]
#  ok  	github.com/cometbft/cometbft/privval	(cached)
# -?   	github.com/cometbft/cometbft/proto/cometbft/blockchain	[no test files]
# +?   	github.com/cometbft/cometbft/proto/cometbft/blocksync	[no test files]
#  ?   	github.com/cometbft/cometbft/proto/cometbft/consensus	[no test files]
#  ?   	github.com/cometbft/cometbft/proto/cometbft/crypto	[no test files]
# @@ -135,5 +129,5 @@ ok  	github.com/cometbft/cometbft/privval	(cached)
#  ok  	github.com/cometbft/cometbft/proxy	(cached)
#  ?   	github.com/cometbft/cometbft/proxy/mocks	[no test files]
# -ok  	github.com/cometbft/cometbft/rpc/client	$duration
# +ok  	github.com/cometbft/cometbft/rpc/client	(cached)
#  ?   	github.com/cometbft/cometbft/rpc/client/http	[no test files]
#  ?   	github.com/cometbft/cometbft/rpc/client/local	[no test files]
# @@ -150,4 +144,6 @@ ok  	github.com/cometbft/cometbft/rpc/jsonrpc/types	(cached)
#  ?   	github.com/cometbft/cometbft/rpc/test	[no test files]
#  ?   	github.com/cometbft/cometbft/scripts/json2wal	[no test files]
# +ok  	github.com/cometbft/cometbft/scripts/metricsgen	(cached)
# +ok  	github.com/cometbft/cometbft/scripts/metricsgen/metricsdiff	(cached)
#  ?   	github.com/cometbft/cometbft/scripts/wal2json	[no test files]
#  ok  	github.com/cometbft/cometbft/state	(cached)
# @@ -187,7 +183,4 @@ ok  	github.com/cometbft/cometbft/test/fuzz/mempool/v1	(cached)
#  ok  	github.com/cometbft/cometbft/test/loadtime/payload	(cached)
#  ok  	github.com/cometbft/cometbft/test/loadtime/report	(cached)
# -?   	github.com/cometbft/cometbft/test/maverick	[no test files]
# -?   	github.com/cometbft/cometbft/test/maverick/consensus	[no test files]
# -?   	github.com/cometbft/cometbft/test/maverick/node	[no test files]
#  ok  	github.com/cometbft/cometbft/types	(cached)
#  ok  	github.com/cometbft/cometbft/types/time	(cached)

# Make a commit with the same state as $NEW_BASE but with $OLD_BASE as a parent

git checkout -b tmp-merge $NEW_BASE
git merge -s ours $OLD_BASE
git tag v${OLD_BASE#v}-${NEW_BASE#v}-merge
git log --decorate -1 | sed 's/^/# /'
# commit 4d775874dc4ab22bc0cf9630ae3febbd9b958a75 (tag: v0.34.30-0.37.4-merge, tmp-merge)
# Merge: cce2e5da5 b3db15076
# Author: Richard Gibson <[email protected]>
# Date:   Tue Mar 5 15:56:01 2024 -0500
# 
#     Merge tag 'v0.34.30' into tmp-merge
#     
#     Release v0.34.30

# Make a branch based on the current head and merge in the commit we just made

git checkout -b gibson-8995-merge-v0.37.4 Agoric
git merge tmp-merge
git status | sed -n '/Unmerged paths:/,$ s/^/# /p'
# Unmerged paths:
#   (use "git add <file>..." to mark resolution)
# 	both modified:   .github/workflows/check-generated.yml
# 	both modified:   .github/workflows/e2e-nightly-34x.yml
# 	both modified:   .github/workflows/fuzz-nightly.yml
# 	both modified:   types/params.go

# Resolve conflicts

# result
git diff $NEW_BASE -- .github/workflows/check-generated.yml .github/workflows/e2e-nightly-34x.yml .github/workflows/fuzz-nightly.yml types/params.go | sed 's/^/# /'
# diff --git c/.github/workflows/check-generated.yml w/.github/workflows/check-generated.yml
# index 377f3378b..92915c509 100644
# --- c/.github/workflows/check-generated.yml
# +++ w/.github/workflows/check-generated.yml
# @@ -7,6 +7,8 @@ name: Check generated code
#  on:
#    pull_request:
#      branches:
# +      - main
# +      - Agoric
#        - v0.37.x
#  
#  permissions:
# diff --git c/.github/workflows/e2e-nightly-34x.yml w/.github/workflows/e2e-nightly-34x.yml
# index 66a30b537..66f98d325 100644
# --- c/.github/workflows/e2e-nightly-34x.yml
# +++ w/.github/workflows/e2e-nightly-34x.yml
# @@ -24,8 +24,9 @@ jobs:
#            go-version: '1.18'
#  
#        - uses: actions/checkout@v4
# -        with:
# -          ref: 'v0.34.x'
# +# AGORIC: We don't maintain a v0.34.x branch yet, so default will do.
# +#        with:
# +#          ref: 'v0.34.x'
#  
#        - name: Capture git repo info
#          id: git-info
# @@ -80,7 +81,9 @@ jobs:
#  
#    e2e-nightly-success:  # may turn this off once they seem to pass consistently
#      needs: e2e-nightly-test
# -    if: ${{ success() }}
# +# AGORIC: disabled because they pass consistently
# +    if: ${{ false }}
# +#    if: ${{ success() }}
#      runs-on: ubuntu-latest
#      steps:
#        - name: Notify Slack on success
# diff --git c/types/params.go w/types/params.go
# index 35281998a..68201a600 100644
# --- c/types/params.go
# +++ w/types/params.go
# @@ -76,7 +76,7 @@ func DefaultConsensusParams() *ConsensusParams {
#  // DefaultBlockParams returns a default BlockParams.
#  func DefaultBlockParams() BlockParams {
#  	return BlockParams{
# -		MaxBytes: 22020096, // 21MB
# +		MaxBytes: 5 * 1024 * 1024, // 5MB
#  		MaxGas:   -1,
#  	}
#  }
git commit

# Update abci/client/committing_client.go for ABCI changes

# result
$ git diff -U12 abci/client/committing_client.go | sed 's/^/# /'
# diff --git i/abci/client/committing_client.go w/abci/client/committing_client.go
# index 54706310d..e84383d1d 100644
# --- i/abci/client/committing_client.go
# +++ w/abci/client/committing_client.go
# @@ -1,22 +1,25 @@
#  package abcicli
#  
#  import (
# -	types "github.com/tendermint/tendermint/abci/types"
# -	"github.com/tendermint/tendermint/libs/service"
# -	cmtsync "github.com/tendermint/tendermint/libs/sync"
# +	types "github.com/cometbft/cometbft/abci/types"
# +	"github.com/cometbft/cometbft/libs/service"
# +	cmtsync "github.com/cometbft/cometbft/libs/sync"
#  )
#  
#  var _ Client = (*committingClient)(nil)
#  
# +// committingClient is a clone of localClient (./local_client.go) with better
# +// locking behavior for inbound read requests.
# +//
#  // NOTE: use defer to unlock mutex because Application might panic (e.g., in
#  // case of malicious tx or query). It only makes sense for publicly exposed
#  // methods like CheckTx (/broadcast_tx_* RPC endpoint) or Query (/abci_query
#  // RPC endpoint), but defers are used everywhere for the sake of consistency.
#  //
#  // NOTE: Keep in sync with changes to local_client.
#  type committingClient struct {
#  	service.BaseService
#  
#  	// Obtain a read-init lock when calling Application methods that result in a
#  	// state read.  This is currently:
#  	// CheckTx
# @@ -78,36 +81,24 @@ func (app *committingClient) EchoAsync(msg string) *ReqRes {
#  func (app *committingClient) InfoAsync(req types.RequestInfo) *ReqRes {
#  	// Blocked only by state writers
#  	app.mtx.RLock()
#  	defer app.mtx.RUnlock()
#  
#  	res := app.Application.Info(req)
#  	return app.callback(
#  		types.ToRequestInfo(req),
#  		types.ToResponseInfo(res),
#  	)
#  }
#  
# -func (app *committingClient) SetOptionAsync(req types.RequestSetOption) *ReqRes {
# -	// Need to block all readers
# -	app.mtx.Lock()
# -	defer app.mtx.Unlock()
# -
# -	res := app.Application.SetOption(req)
# -	return app.callback(
# -		types.ToRequestSetOption(req),
# -		types.ToResponseSetOption(res),
# -	)
# -}
# -
#  func (app *committingClient) DeliverTxAsync(params types.RequestDeliverTx) *ReqRes {
#  	// Blocked until state is initialized, then by state writers
#  	app.mtx.RInitLock()
#  	defer app.mtx.RInitUnlock()
#  
#  	res := app.Application.DeliverTx(params)
#  	return app.callback(
#  		types.ToRequestDeliverTx(params),
#  		types.ToResponseDeliverTx(res),
#  	)
#  }
#  
# @@ -231,54 +222,69 @@ func (app *committingClient) LoadSnapshotChunkAsync(req types.RequestLoadSnapsho
#  func (app *committingClient) ApplySnapshotChunkAsync(req types.RequestApplySnapshotChunk) *ReqRes {
#  	// Need to block all readers
#  	app.mtx.Lock()
#  	defer app.mtx.Unlock()
#  
#  	res := app.Application.ApplySnapshotChunk(req)
#  	return app.callback(
#  		types.ToRequestApplySnapshotChunk(req),
#  		types.ToResponseApplySnapshotChunk(res),
#  	)
#  }
#  
# +func (app *committingClient) PrepareProposalAsync(req types.RequestPrepareProposal) *ReqRes {
# +	// TODO: Verify appropriate lock level.
# +	app.mtx.Lock()
# +	defer app.mtx.Unlock()
# +
# +	res := app.Application.PrepareProposal(req)
# +	return app.callback(
# +		types.ToRequestPrepareProposal(req),
# +		types.ToResponsePrepareProposal(res),
# +	)
# +}
# +
# +func (app *committingClient) ProcessProposalAsync(req types.RequestProcessProposal) *ReqRes {
# +	// TODO: Verify appropriate lock level.
# +	app.mtx.Lock()
# +	defer app.mtx.Unlock()
# +
# +	res := app.Application.ProcessProposal(req)
# +	return app.callback(
# +		types.ToRequestProcessProposal(req),
# +		types.ToResponseProcessProposal(res),
# +	)
# +}
# +
#  //-------------------------------------------------------
#  
#  func (app *committingClient) FlushSync() error {
#  	// Never blocked
#  	return nil
#  }
#  
#  func (app *committingClient) EchoSync(msg string) (*types.ResponseEcho, error) {
#  	// Never blocked
#  	return &types.ResponseEcho{Message: msg}, nil
#  }
#  
#  func (app *committingClient) InfoSync(req types.RequestInfo) (*types.ResponseInfo, error) {
#  	// Blocked only by state writers
#  	app.mtx.RLock()
#  	defer app.mtx.RUnlock()
#  
#  	res := app.Application.Info(req)
#  	return &res, nil
#  }
#  
# -func (app *committingClient) SetOptionSync(req types.RequestSetOption) (*types.ResponseSetOption, error) {
# -	// Need to block all readers
# -	app.mtx.Lock()
# -	defer app.mtx.Unlock()
# -
# -	res := app.Application.SetOption(req)
# -	return &res, nil
# -}
# -
#  func (app *committingClient) DeliverTxSync(req types.RequestDeliverTx) (*types.ResponseDeliverTx, error) {
#  	// Blocked until state is initialized, then by state writers
#  	app.mtx.RInitLock()
#  	defer app.mtx.RInitUnlock()
#  
#  	res := app.Application.DeliverTx(req)
#  	return &res, nil
#  }
#  
#  func (app *committingClient) CheckTxSync(req types.RequestCheckTx) (*types.ResponseCheckTx, error) {
#  	// Blocked until state is initialized, then by state writers
#  	app.mtx.RInitLock()
# @@ -371,21 +377,39 @@ func (app *committingClient) LoadSnapshotChunkSync(
#  }
#  
#  func (app *committingClient) ApplySnapshotChunkSync(
#  	req types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) {
#  	// Need to block all readers
#  	app.mtx.Lock()
#  	defer app.mtx.Unlock()
#  
#  	res := app.Application.ApplySnapshotChunk(req)
#  	return &res, nil
#  }
#  
# +func (app *committingClient) PrepareProposalSync(req types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) {
# +	// TODO: Verify appropriate lock level.
# +	app.mtx.Lock()
# +	defer app.mtx.Unlock()
# +
# +	res := app.Application.PrepareProposal(req)
# +	return &res, nil
# +}
# +
# +func (app *committingClient) ProcessProposalSync(req types.RequestProcessProposal) (*types.ResponseProcessProposal, error) {
# +	// TODO: Verify appropriate lock level.
# +	app.mtx.Lock()
# +	defer app.mtx.Unlock()
# +
# +	res := app.Application.ProcessProposal(req)
# +	return &res, nil
# +}
# +
#  //-------------------------------------------------------
#  
#  func (app *committingClient) callback(req *types.Request, res *types.Response) *ReqRes {
#  	// Never blocked
#  	app.Callback(req, res)
#  	rr := newLocalReqRes(req, res)
#  	rr.callbackInvoked = true
#  	return rr
#  }

# Compare test results

make build test &> test-HEAD.txt
gitdiff -U2 <(sed -E "$NORMALIZE" test-$NEW_BASE.txt) <(sed -E "$NORMALIZE" test-HEAD.txt) | grep -i FAIL | sed 's/^/# /'
#  ?   	github.com/cometbft/cometbft/libs/fail	[no test files]
# @@ -101,16 +101,16 @@ FAIL	github.com/cometbft/cometbft/light/provider/http	$duration

# Merge in v0.37.5

git merge v0.37.5
git status | sed -n '/Unmerged paths:/,$ s/^/# /p'
# Unmerged paths:
#   (use "git add <file>..." to mark resolution)
# 	both modified:   .github/workflows/e2e-long-37x.yml
# 	both modified:   .github/workflows/e2e-nightly-34x.yml
# 	both modified:   .github/workflows/e2e-nightly-37x.yml
# 	both modified:   .github/workflows/e2e-nightly-main.yml
# 	both modified:   .github/workflows/fuzz-nightly.yml
# 	both modified:   .github/workflows/pre-release.yml
# 	both modified:   .github/workflows/release.yml

# Resolve conflicts

# result
echo .github/workflows/e2e-long-37x.yml .github/workflows/e2e-nightly-34x.yml .github/workflows/e2e-nightly-37x.yml .github/workflows/e2e-nightly-main.yml .github/workflows/fuzz-nightly.yml .github/workflows/pre-release.yml .github/workflows/release.yml \
| xargs git diff $(git log -1 --pretty='%H' --grep 'Revert to old Slack integration GH action') -- | sed 's/^/# /'
# diff --git c/.github/workflows/e2e-long-37x.yml w/.github/workflows/e2e-long-37x.yml
# index f564e6a88..f95e51fb5 100644
# --- c/.github/workflows/e2e-long-37x.yml
# +++ w/.github/workflows/e2e-long-37x.yml
# @@ -17,7 +17,7 @@ jobs:
#      runs-on: ubuntu-latest
#      timeout-minutes: 120
#      steps:
# -      - uses: actions/setup-go@v4
# +      - uses: actions/setup-go@v5
#          with:
#            go-version: '1.21'
#  
# diff --git c/.github/workflows/e2e-nightly-34x.yml w/.github/workflows/e2e-nightly-34x.yml
# index f51e90821..27c2fb7e8 100644
# --- c/.github/workflows/e2e-nightly-34x.yml
# +++ w/.github/workflows/e2e-nightly-34x.yml
# @@ -21,7 +21,7 @@ jobs:
#      runs-on: ubuntu-latest
#      timeout-minutes: 60
#      steps:
# -      - uses: actions/setup-go@v4
# +      - uses: actions/setup-go@v5
#          with:
#            go-version: '1.18'
#  
# diff --git c/.github/workflows/e2e-nightly-37x.yml w/.github/workflows/e2e-nightly-37x.yml
# index fb450efda..00ce2fc77 100644
# --- c/.github/workflows/e2e-nightly-37x.yml
# +++ w/.github/workflows/e2e-nightly-37x.yml
# @@ -21,7 +21,7 @@ jobs:
#      runs-on: ubuntu-latest
#      timeout-minutes: 60
#      steps:
# -      - uses: actions/setup-go@v4
# +      - uses: actions/setup-go@v5
#          with:
#            go-version: '1.21'
#  
# diff --git c/.github/workflows/e2e-nightly-main.yml w/.github/workflows/e2e-nightly-main.yml
# index e39d5afc7..92b039a66 100644
# --- c/.github/workflows/e2e-nightly-main.yml
# +++ w/.github/workflows/e2e-nightly-main.yml
# @@ -20,7 +20,7 @@ jobs:
#      runs-on: ubuntu-latest
#      timeout-minutes: 60
#      steps:
# -      - uses: actions/setup-go@v4
# +      - uses: actions/setup-go@v5
#          with:
#            go-version: '1.21'
#  
# diff --git c/.github/workflows/fuzz-nightly.yml w/.github/workflows/fuzz-nightly.yml
# index 09dd3dcd9..855ca5332 100644
# --- c/.github/workflows/fuzz-nightly.yml
# +++ w/.github/workflows/fuzz-nightly.yml
# @@ -13,7 +13,7 @@ jobs:
#    fuzz-nightly-test:
#      runs-on: ubuntu-latest
#      steps:
# -      - uses: actions/setup-go@v4
# +      - uses: actions/setup-go@v5
#          with:
#            go-version: '1.21'
#  
# @@ -51,14 +51,14 @@ jobs:
#          continue-on-error: true
#  
#        - name: Archive crashers
# -        uses: actions/upload-artifact@v3
# +        uses: actions/upload-artifact@v4
#          with:
#            name: crashers
#            path: test/fuzz/**/crashers
#            retention-days: 3
#  
#        - name: Archive suppressions
# -        uses: actions/upload-artifact@v3
# +        uses: actions/upload-artifact@v4
#          with:
#            name: suppressions
#            path: test/fuzz/**/suppressions
# diff --git c/.github/workflows/pre-release.yml w/.github/workflows/pre-release.yml
# index 992008ba3..176055532 100644
# --- c/.github/workflows/pre-release.yml
# +++ w/.github/workflows/pre-release.yml
# @@ -16,7 +16,7 @@ jobs:
#          with:
#            fetch-depth: 0
#  
# -      - uses: actions/setup-go@v4
# +      - uses: actions/setup-go@v5
#          with:
#            go-version: '1.21'
#  
# diff --git c/.github/workflows/release.yml w/.github/workflows/release.yml
# index 4317c0a4f..7b9a983dc 100644
# --- c/.github/workflows/release.yml
# +++ w/.github/workflows/release.yml
# @@ -14,7 +14,7 @@ jobs:
#          with:
#            fetch-depth: 0
#  
# -      - uses: actions/setup-go@v4
# +      - uses: actions/setup-go@v5
#          with:
#            go-version: '1.21'
git commit

# Compare test results

gitdiff <(sed -E "$NORMALIZE" test-HEAD.txt) <(sed -E "$NORMALIZE" test-HEAD-v0.37.5.txt) | grep -iC2 FAIL | sed 's/^/# /'
# +ok  	github.com/cometbft/cometbft/libs/clist	(cached)
# +ok  	github.com/cometbft/cometbft/libs/cmap	(cached)
#  --- FAIL: TestAddAndRemoveListenerConcurrency ($duration)
#      events_test.go:232: should not run callback for $n.
#  FAIL
#  FAIL	github.com/cometbft/cometbft/libs/events	$duration
#  ?   	github.com/cometbft/cometbft/libs/fail	[no test files]
# -ok  	github.com/cometbft/cometbft/libs/flowrate	$duration
# -ok  	github.com/cometbft/cometbft/libs/json	$duration
# --
#  E[2024-03-26|$hh:$mm] Error starting gRPC server                   err="accept tcp 127.0.0.1:$port: use of closed network connection"
# +E[2024-03-26|$hh:$mm] Stopped accept routine, as transport is closed module=p2p numPeers=0
#  --- FAIL: TestProvider ($duration)
#      http_test.go:63: 
#          	Error Trace:	/home/rgibson/Projects/cometbft/light/provider/http/http_test.go:63
# @@ -103,19 +103,19 @@ FAIL	github.com/cometbft/cometbft/light/provider/http	$duration
#  ?   	github.com/cometbft/cometbft/light/rpc	[no test files]
#  ?   	github.com/cometbft/cometbft/light/rpc/mocks	[no test files]
# --
# +ok  	github.com/cometbft/cometbft/types/time	(cached)
#  ?   	github.com/cometbft/cometbft/version	[no test files]
#  FAIL
#  make: *** [tests.mk:64: test] Error 1

mergify bot and others added 30 commits December 1, 2022 14:13
The "toml" annotation of "send no load" had a typo (`send_no_laod`).

This is suspected to have caused failures in e2e, however I couldn't reproduce the error locally, so not sure this will fix it. Still, the typo needs to be fixed in any case.

---

#### PR checklist

- [x] Tests written/updated, or no tests needed
- [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [x] Updated relevant documentation (`docs/`) and code comments, or no
      documentation updates needed

(cherry picked from commit 739b92b)

Co-authored-by: Sergio Mena <[email protected]>
Fixes the issue observed in an [e2e test run](https://github.com/tendermint/tendermint/actions/runs/3588927225). The issue arises when the e2e runner process cannot connect to the remote node. In the previous version of this code, the runner would simply skip the transaction if the client couldn't connect. This pull request resurrects that behavior.

---

#### PR checklist

- [ ] Tests written/updated, or no tests needed
- [ ] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [ ] Updated relevant documentation (`docs/`) and code comments, or no
      documentation updates needed

(cherry picked from commit d09f4f5)

Co-authored-by: William Banfield <[email protected]>
* docs: Fix metrics name rendering (#9695)

The docs theme unfortunately wraps code blocks inside tables, breaking the names and making them somewhat unreadable. This removes all the backticks from the metric names and tags.

---

#### PR checklist

- [x] Tests written/updated, or no tests needed
- [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [x] Updated relevant documentation (`docs/`) and code comments, or no
      documentation updates needed

(cherry picked from commit 17c94bb)

# Conflicts:
#	docs/tendermint-core/metrics.md

* Resolve conflicts

Signed-off-by: Thane Thomson <[email protected]>

Signed-off-by: Thane Thomson <[email protected]>
Co-authored-by: Thane Thomson <[email protected]>
* defer wait group completion

* generate correct number of tx

(cherry picked from commit 654e565)

Co-authored-by: William Banfield <[email protected]>
* e2e: setup testing for multi-version (#9819)

This pull requests sets up the e2e tests to be able to support multiple versions within the same test network. This is achieved through a few simple changes:

* Each node takes a `version` parameter in the testnet manifest. This dictates which version of the testapp to use. If not set, the locally available version is used.
* Adds a `testapp-docker.yml` workflow that publishes the testapp to docker hub so that tagged versions may be available for use in a multi-version test network.

This change does not actually add a testnetwork that does multi-version testing. Since no previous versions of the testapp have been published to dockerhub, there are not old versions available to test against. We'll either need to configure this after the next minor release which will trigger a testapp to be pushed to dockerhub, or push an image from the previous version of Tendermint so that the multiversion test has an old version to pull.

#### PR checklist

- [ ] Tests written/updated, or no tests needed
- [ ] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [ ] Updated relevant documentation (`docs/`) and code comments, or no
      documentation updates needed

(cherry picked from commit 5ba0d13)

# Conflicts:
#	test/e2e/pkg/manifest.go

* fix conflict

Co-authored-by: William Banfield <[email protected]>
Co-authored-by: William Banfield <[email protected]>
Since starting off as a wee validator, I've been mystified by the volume of p2p logspam, which often makes it impossible to monitor other tasks. Thus, routine p2p events, have been cast into the land of debug.

---

#### PR checklist

- [x] Tests written/updated, or no tests needed
- [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [x] Updated relevant documentation (`docs/`) and code comments, or no
      documentation updates needed

Co-authored-by: Jacob Gadikian <[email protected]>
* adds prepare and process proposal commands to console help

* comment typo fix

(cherry picked from commit c3302b0)

Co-authored-by: Lasaro Camargos <[email protected]>
* Rejects empty transactions in the example kvstore

* Add code for rejected transaction; Add test for txn rejection;

* Apply suggestions from code review

Co-authored-by: Sergio Mena <[email protected]>
(cherry picked from commit 49502da)

Co-authored-by: Lasaro Camargos <[email protected]>
* add multiversion flag to generator

* clarify flag comment

(cherry picked from commit ac48630)

Co-authored-by: William Banfield <[email protected]>
Updates the discussion of prepareProposal in the go tutorials to mention tx_max_bytes limitation to transaction set size.

---

#### PR checklist

- [x] Tests written/updated, or no tests needed
- [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [x] Updated relevant documentation (`docs/`) and code comments, or no
      documentation updates needed

(cherry picked from commit ba84060)

Co-authored-by: Lasaro Camargos <[email protected]>
…9858)

(cherry picked from commit 365af06)

Co-authored-by: William Banfield <[email protected]>
(cherry picked from commit 1c0995c)

Co-authored-by: Lasaro Camargos <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>

Signed-off-by: Thane Thomson <[email protected]>
(cherry picked from commit 82ec855)

Co-authored-by: Thane Thomson <[email protected]>
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](bufbuild/buf-setup-action@v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 3 to 4.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](goreleaser/goreleaser-action@v3...v4)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add vulncheck target to Makefile

Signed-off-by: Thane Thomson <[email protected]>

* ci: Add govulncheck workflow

Signed-off-by: Thane Thomson <[email protected]>

Signed-off-by: Thane Thomson <[email protected]>
(cherry picked from commit 8b7ae93)

Co-authored-by: Thane Thomson <[email protected]>
* docs: Update upgrading guidelines with new ABCI version

Signed-off-by: Thane Thomson <[email protected]>

* docs: Fix broken link in upgrading guidelines for ABCI++

Signed-off-by: Thane Thomson <[email protected]>

* docs: Prepare version in upgrading guidelines

Signed-off-by: Thane Thomson <[email protected]>

* Update UPGRADING.md

Co-authored-by: Sergio Mena <[email protected]>

Signed-off-by: Thane Thomson <[email protected]>
Co-authored-by: Sergio Mena <[email protected]>
…mits (backport #9760) (#9775)" (#9945)

This reverts commit 5703cc3.
Signed-off-by: Thane Thomson <[email protected]>
Bumps [actions/stale](https://github.com/actions/stale) from 6 to 7.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@v6...v7)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…metbft#36)

Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](bufbuild/buf-setup-action@v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Thane Thomson <[email protected]>

Signed-off-by: Thane Thomson <[email protected]>
(cherry picked from commit ddd0117)

Co-authored-by: Thane Thomson <[email protected]>
…bft#113)

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…metbft#114)

Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](bufbuild/buf-setup-action@v1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Renaming of variables and aliases prefixed with tm to use prefix cmt

* Replacing references to alias in the documentation

* Placate linter

* Replacing missed references

* reverting typos

* reverting typos
I noticed that stalebot wasn't respecting our `wip` label, only to realize I hadn't yet updated its config.

---

#### PR checklist

- [x] Tests written/updated, or no tests needed
- [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [x] Updated relevant documentation (`docs/`) and code comments, or no
      documentation updates needed

(cherry picked from commit 9975bc8)

Co-authored-by: Thane Thomson <[email protected]>
* Porting 0.37.0 changelog to unclog

* redirecting unclog  to cometbft repo

* Add epilogue.md with pointer to upstream changelog

* Backtick quoting go module names

Renaming files to be more descriptive of issue

* Use commit rather than tag in link to upstream changelog

* fixing issue number

* Improve epilogue.md and add generated CHANGELOG.md
* [cherry-picked] Renaming in docker-related files (cometbft#110)

* Performed renaming in docker-related files

* Fix e2e launch

* one more

* revert rename of tendermint-docker.yml

* unrevert renaming tendermint-docker.yml

* Rename TENDERMINT_BUILD_OPTIONS to COMETBFT_BUILD_OPTIONS all over

* Linter error

* Revert `cometbft-proof` to `tendermint-proof`

* Replaced TENDERMINT_VERSION --> COMETBFT_VERSION all over the codebase
* Reproducing the work done on cometbft#133, for branch v0.37.x

* Updated docker related changes

* Removed extra comments

Co-authored-by: Jasmina Malicevic <[email protected]>
@gibson042 gibson042 changed the title feat: merge cometbft v0.37.4 feat: merge cometbft v0.37.5 Mar 26, 2024
@gibson042
Copy link
Author

Updated to incorporate upstream v0.37.5.

@github-actions github-actions bot removed the Stale label Mar 27, 2024
@gibson042 gibson042 marked this pull request as ready for review March 27, 2024 19:56
Copy link

github-actions bot commented Apr 7, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Apr 7, 2024
@JimLarson
Copy link

Adding a keepalive comment for now. We'd like to not land this on Agoric until it's been tested against an updated cosmos-sdk. We could land this on a side branch just to close the PR, then later merge to Agoric.

@JimLarson JimLarson removed the Stale label Apr 8, 2024
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@michaelfig
Copy link

Not stale.

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Apr 30, 2024
@github-actions github-actions bot closed this May 5, 2024
@gibson042 gibson042 reopened this May 5, 2024
@github-actions github-actions bot removed the Stale label May 6, 2024
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label May 17, 2024
@gibson042 gibson042 removed the Stale label May 17, 2024
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label May 28, 2024
@gibson042 gibson042 removed the Stale label May 28, 2024
Copy link

github-actions bot commented Jun 8, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Jun 8, 2024
@gibson042 gibson042 removed the Stale label Jun 8, 2024
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade agoric-labs/cometbft to 0.37.4