Skip to content

Commit 847cc73

Browse files
committed
Merge tag 'v0.38.11' into cometbft-0.38.9
Tagged v0.38.11 release
2 parents 0c45d5c + e1b4453 commit 847cc73

File tree

22 files changed

+123
-51
lines changed

22 files changed

+123
-51
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- `[types]` Added missing JSON tags to `DuplicateVoteEvidence` and `LightClientAttackEvidence`
2+
types ([\#3528](https://github.com/cometbft/cometbft/issues/3528))
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- `[types]` Only check IFF vote is a non-nil Precommit if extensionsEnabled
2+
types ([\#3565](https://github.com/cometbft/cometbft/issues/3565))
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- `[indexer]` Fixed ineffective select break statements; they now
2+
point to their enclosing for loop label to exit
3+
([\#3544](https://github.com/cometbft/cometbft/issues/3544))

.changelog/v0.38.11/summary.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*August 12, 2024*
2+
3+
This release fixes a panic in consensus where CometBFT would previously panic
4+
if there's no extension signature in non-nil Precommit EVEN IF vote extensions
5+
themselves are disabled.
6+
7+
It also includes a few other bug fixes and performance improvements.

.github/workflows/cometbft-docker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ jobs:
4141
platforms: all
4242

4343
- name: Set up Docker Build
44-
uses: docker/setup-buildx-action@v3.4.0
44+
uses: docker/setup-buildx-action@v3.6.1
4545

4646
- name: Login to DockerHub
4747
if: ${{ github.event_name != 'pull_request' }}
48-
uses: docker/login-action@v3.2.0
48+
uses: docker/login-action@v3.3.0
4949
with:
5050
username: ${{ secrets.DOCKERHUB_USERNAME }}
5151
password: ${{ secrets.DOCKERHUB_TOKEN }}
5252

5353
- name: Publish to Docker Hub
54-
uses: docker/build-push-action@v6.3.0
54+
uses: docker/build-push-action@v6.6.1
5555
with:
5656
context: .
5757
file: ./DOCKER/Dockerfile

.github/workflows/proto-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
timeout-minutes: 5
1616
steps:
1717
- uses: actions/checkout@v4
18-
- uses: bufbuild/buf-setup-action@v1.34.0
18+
- uses: bufbuild/buf-setup-action@v1.36.0
1919
- uses: bufbuild/buf-lint-action@v1
2020
with:
2121
input: 'proto'

.github/workflows/testapp-docker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ jobs:
4141
platforms: all
4242

4343
- name: Set up Docker Build
44-
uses: docker/setup-buildx-action@v3.4.0
44+
uses: docker/setup-buildx-action@v3.6.1
4545

4646
- name: Login to DockerHub
4747
if: ${{ github.event_name != 'pull_request' }}
48-
uses: docker/login-action@v3.2.0
48+
uses: docker/login-action@v3.3.0
4949
with:
5050
username: ${{ secrets.DOCKERHUB_USERNAME }}
5151
password: ${{ secrets.DOCKERHUB_TOKEN }}
5252

5353
- name: Publish to Docker Hub
54-
uses: docker/build-push-action@v6.3.0
54+
uses: docker/build-push-action@v6.6.1
5555
with:
5656
context: .
5757
file: ./test/e2e/docker/Dockerfile

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# CHANGELOG
22

3+
## v0.38.11
4+
5+
*August 12, 2024*
6+
7+
This release fixes a panic in consensus where CometBFT would previously panic
8+
if there's no extension signature in non-nil Precommit EVEN IF vote extensions
9+
themselves are disabled.
10+
11+
It also includes a few other bug fixes and performance improvements.
12+
13+
### BUG FIXES
14+
15+
- `[types]` Added missing JSON tags to `DuplicateVoteEvidence` and `LightClientAttackEvidence`
16+
types ([\#3528](https://github.com/cometbft/cometbft/issues/3528))
17+
- `[types]` Only check IFF vote is a non-nil Precommit if extensionsEnabled
18+
types ([\#3565](https://github.com/cometbft/cometbft/issues/3565))
19+
20+
### IMPROVEMENTS
21+
22+
- `[indexer]` Fixed ineffective select break statements; they now
23+
point to their enclosing for loop label to exit
24+
([\#3544](https://github.com/cometbft/cometbft/issues/3544))
25+
326
## v0.38.10
427

528
*July 16, 2024*

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ ifeq (linux/riscv64,$(findstring linux/riscv64,$(TARGETPLATFORM)))
6868
GOARCH=riscv64
6969
endif
7070

71-
#? all: Run target check, build, test and install
72-
all: check build test install
71+
#? all: Run target build, test and install
72+
all: build test install
7373
.PHONY: all
7474

7575
include tests.mk
@@ -327,12 +327,12 @@ build_c-amazonlinux:
327327
#? localnet-start: Run a 4-node testnet locally
328328
localnet-start: localnet-stop build-docker-localnode
329329
@if ! [ -f build/node0/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/cometbft:Z cometbft/localnode testnet --config /etc/cometbft/config-template.toml --o . --starting-ip-address 192.167.10.2; fi
330-
docker-compose up
330+
docker compose up -d
331331
.PHONY: localnet-start
332332

333333
#? localnet-stop: Stop testnet
334334
localnet-stop:
335-
docker-compose down
335+
docker compose down
336336
.PHONY: localnet-stop
337337

338338
#? build-contract-tests-hooks: Build hooks for dredd, to skip or add information on some steps

abci/types/types.pb.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

buf.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/networks/docker-compose.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ To change the number of validators / non-validators change the `localnet-start`
6464
```makefile
6565
localnet-start: localnet-stop
6666
@if ! [ -f build/node0/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/cometbft:Z cometbft/localnode testnet --v 5 --n 3 --o . --populate-persistent-peers --starting-ip-address 192.167.10.2 ; fi
67-
docker-compose up
67+
docker compose up -d
6868
```
6969

7070
The command now will generate config files for 5 validators and 3

mempool/clist_mempool.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,18 +377,19 @@ func (mem *CListMempool) RemoveTxByKey(txKey types.TxKey) error {
377377
func (mem *CListMempool) isFull(txSize int) error {
378378
memSize := mem.Size()
379379
txsBytes := mem.SizeBytes()
380-
recheckFull := mem.recheck.consideredFull()
381-
382-
if memSize >= mem.config.Size || int64(txSize)+txsBytes > mem.config.MaxTxsBytes || recheckFull {
380+
if memSize >= mem.config.Size || int64(txSize)+txsBytes > mem.config.MaxTxsBytes {
383381
return ErrMempoolIsFull{
384382
NumTxs: memSize,
385383
MaxTxs: mem.config.Size,
386384
TxsBytes: txsBytes,
387385
MaxTxsBytes: mem.config.MaxTxsBytes,
388-
RecheckFull: recheckFull,
389386
}
390387
}
391388

389+
if mem.recheck.consideredFull() {
390+
return ErrRecheckFull
391+
}
392+
392393
return nil
393394
}
394395

mempool/errors.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ var ErrTxNotFound = errors.New("transaction not found in mempool")
1111
// ErrTxInCache is returned to the client if we saw tx earlier
1212
var ErrTxInCache = errors.New("tx already exists in cache")
1313

14+
// ErrRecheckFull is returned when checking if the mempool is full and
15+
// rechecking is still in progress after a new block was committed.
16+
var ErrRecheckFull = errors.New("mempool is still rechecking after a new committed block, so it is considered as full")
17+
1418
// ErrTxTooLarge defines an error when a transaction is too big to be sent in a
1519
// message to other peers.
1620
type ErrTxTooLarge struct {

proto/tendermint/rpc/grpc/types.pb.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rpc/grpc/types.pb.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

state/indexer/block/kv/kv.go

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ func (idx *BlockerIndexer) Search(ctx context.Context, q *query.Query) ([]int64,
221221
// fetch matching heights
222222
results = make([]int64, 0, len(filteredHeights))
223223
resultMap := make(map[int64]struct{})
224+
225+
FOR_LOOP:
224226
for _, hBz := range filteredHeights {
225227
h := int64FromBytes(hBz)
226228

@@ -237,7 +239,7 @@ func (idx *BlockerIndexer) Search(ctx context.Context, q *query.Query) ([]int64,
237239

238240
select {
239241
case <-ctx.Done():
240-
break
242+
break FOR_LOOP
241243

242244
default:
243245
}
@@ -340,8 +342,7 @@ LOOP:
340342

341343
select {
342344
case <-ctx.Done():
343-
break
344-
345+
break LOOP
345346
default:
346347
}
347348
}
@@ -363,6 +364,7 @@ LOOP:
363364

364365
// Remove/reduce matches in filteredHashes that were not found in this
365366
// match (tmpHashes).
367+
FOR_LOOP:
366368
for k, v := range filteredHeights {
367369
tmpHeight := tmpHeights[k]
368370

@@ -373,8 +375,7 @@ LOOP:
373375

374376
select {
375377
case <-ctx.Done():
376-
break
377-
378+
break FOR_LOOP
378379
default:
379380
}
380381
}
@@ -461,6 +462,7 @@ func (idx *BlockerIndexer) match(
461462
}
462463
defer it.Close()
463464

465+
LOOP_EXISTS:
464466
for ; it.Valid(); it.Next() {
465467

466468
keyHeight, err := parseHeightFromEventKey(it.Key())
@@ -481,7 +483,7 @@ func (idx *BlockerIndexer) match(
481483

482484
select {
483485
case <-ctx.Done():
484-
break
486+
break LOOP_EXISTS
485487

486488
default:
487489
}
@@ -503,6 +505,7 @@ func (idx *BlockerIndexer) match(
503505
}
504506
defer it.Close()
505507

508+
LOOP_CONTAINS:
506509
for ; it.Valid(); it.Next() {
507510
eventValue, err := parseValueFromEventKey(it.Key())
508511
if err != nil {
@@ -528,7 +531,7 @@ func (idx *BlockerIndexer) match(
528531

529532
select {
530533
case <-ctx.Done():
531-
break
534+
break LOOP_CONTAINS
532535

533536
default:
534537
}
@@ -554,14 +557,15 @@ func (idx *BlockerIndexer) match(
554557

555558
// Remove/reduce matches in filteredHeights that were not found in this
556559
// match (tmpHeights).
560+
FOR_LOOP:
557561
for k, v := range filteredHeights {
558562
tmpHeight := tmpHeights[k]
559563
if tmpHeight == nil || !bytes.Equal(tmpHeight, v) {
560564
delete(filteredHeights, k)
561565

562566
select {
563567
case <-ctx.Done():
564-
break
568+
break FOR_LOOP
565569

566570
default:
567571
}

test/e2e/pkg/infra/docker/docker.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,21 +130,21 @@ services:
130130
// ExecCompose runs a Docker Compose command for a testnet.
131131
func ExecCompose(ctx context.Context, dir string, args ...string) error {
132132
return exec.Command(ctx, append(
133-
[]string{"docker-compose", "-f", filepath.Join(dir, "docker-compose.yml")},
133+
[]string{"docker", "compose", "-f", filepath.Join(dir, "docker-compose.yml")},
134134
args...)...)
135135
}
136136

137137
// ExecCompose runs a Docker Compose command for a testnet and returns the command's output.
138138
func ExecComposeOutput(ctx context.Context, dir string, args ...string) ([]byte, error) {
139139
return exec.CommandOutput(ctx, append(
140-
[]string{"docker-compose", "-f", filepath.Join(dir, "docker-compose.yml")},
140+
[]string{"docker", "compose", "-f", filepath.Join(dir, "docker-compose.yml")},
141141
args...)...)
142142
}
143143

144144
// ExecComposeVerbose runs a Docker Compose command for a testnet and displays its output.
145145
func ExecComposeVerbose(ctx context.Context, dir string, args ...string) error {
146146
return exec.CommandVerbose(ctx, append(
147-
[]string{"docker-compose", "-f", filepath.Join(dir, "docker-compose.yml")},
147+
[]string{"docker", "compose", "-f", filepath.Join(dir, "docker-compose.yml")},
148148
args...)...)
149149
}
150150

types/evidence.go

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ type DuplicateVoteEvidence struct {
3737
VoteB *Vote `json:"vote_b"`
3838

3939
// abci specific information
40-
TotalVotingPower int64
41-
ValidatorPower int64
42-
Timestamp time.Time
40+
TotalVotingPower int64 `json:"total_voting_power"`
41+
ValidatorPower int64 `json:"validator_power"`
42+
Timestamp time.Time `json:"timestamp"`
4343
}
4444

4545
var _ Evidence = &DuplicateVoteEvidence{}
@@ -207,13 +207,20 @@ func DuplicateVoteEvidenceFromProto(pb *cmtproto.DuplicateVoteEvidence) (*Duplic
207207
// and Amnesia. These attacks are exhaustive. You can find a more detailed overview of this at
208208
// cometbft/docs/architecture/adr-047-handling-evidence-from-light-client.md
209209
type LightClientAttackEvidence struct {
210-
ConflictingBlock *LightBlock
211-
CommonHeight int64
210+
ConflictingBlock *LightBlock `json:"conflicting_block"`
211+
CommonHeight int64 `json:"common_height"`
212212

213-
// abci specific information
214-
ByzantineValidators []*Validator // validators in the validator set that misbehaved in creating the conflicting block
215-
TotalVotingPower int64 // total voting power of the validator set at the common height
216-
Timestamp time.Time // timestamp of the block at the common height
213+
// ABCI specific information
214+
215+
// validators in the validator set that misbehaved in creating the conflicting
216+
// block
217+
ByzantineValidators []*Validator `json:"byzantine_validators"`
218+
219+
// total voting power of the validator set at the common height
220+
TotalVotingPower int64 `json:"total_voting_power"`
221+
222+
// timestamp of the block at the common height
223+
Timestamp time.Time `json:"timestamp"`
217224
}
218225

219226
var _ Evidence = &LightClientAttackEvidence{}

0 commit comments

Comments
 (0)