Skip to content

Commit ab92718

Browse files
authored
Merge pull request #1759 from 0xPolygon/v2.2.11-candidate
v2.2.11 to master
2 parents 0e508e4 + f5187b9 commit ab92718

File tree

26 files changed

+632
-80
lines changed

26 files changed

+632
-80
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
3333
- uses: actions/setup-go@v5
3434
with:
35-
go-version: 1.24.3
35+
go-version: 1.24.6
3636

3737
- name: Install dependencies on Linux
3838
if: runner.os == 'Linux'
@@ -64,7 +64,7 @@ jobs:
6464
6565
- uses: actions/setup-go@v5
6666
with:
67-
go-version: 1.24.3
67+
go-version: 1.24.6
6868

6969
- name: Install dependencies on Linux
7070
if: runner.os == 'Linux'
@@ -92,7 +92,7 @@ jobs:
9292
9393
- uses: actions/setup-go@v5
9494
with:
95-
go-version: 1.24.3
95+
go-version: 1.24.6
9696

9797
- name: Install dependencies on Linux
9898
if: runner.os == 'Linux'
@@ -143,7 +143,7 @@ jobs:
143143
144144
- uses: actions/setup-go@v5
145145
with:
146-
go-version: 1.24.3
146+
go-version: 1.24.6
147147

148148
- name: Install dependencies on Linux
149149
if: runner.os == 'Linux'

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Go
2424
uses: actions/setup-go@v5
2525
with:
26-
go-version: 1.24.3
26+
go-version: 1.24.6
2727
cache: false
2828

2929
- name: Run linters

.github/workflows/govulncheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
steps:
99
- uses: actions/setup-go@v5
1010
with:
11-
go-version: '1.24.3'
11+
go-version: '1.24.6'
1212
check-latest: true
1313
- uses: actions/checkout@v4
1414
- uses: technote-space/get-diff-action@v6

.github/workflows/packager_deb.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up Go
2525
uses: actions/setup-go@master
2626
with:
27-
go-version: 1.24.3
27+
go-version: 1.24.6
2828
# Variables
2929
- name: Adding TAG to ENV
3030
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Go
2222
uses: actions/setup-go@master
2323
with:
24-
go-version: 1.24.3
24+
go-version: 1.24.6
2525

2626
- name: Prepare
2727
id: prepare

core/rawdb/milestone.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,27 @@ func (m *Milestone) block() (uint64, common.Hash) {
5252
return m.Block, m.Hash
5353
}
5454

55+
// PurgeWhitelistedEntriesFromDb removes all entries related to whitelisted checkpoint
56+
// and milestone from the database. It doesn't return any error back to the caller.
57+
func PurgeWhitelistedEntriesFromDb(db ethdb.KeyValueWriter) {
58+
err := db.Delete(lastMilestone)
59+
if err != nil {
60+
log.Error("Error deleting last milestone entry", "err", err)
61+
}
62+
err = db.Delete(lockFieldKey)
63+
if err != nil {
64+
log.Error("Error deleting lock field entry", "err", err)
65+
}
66+
err = db.Delete(futureMilestoneKey)
67+
if err != nil {
68+
log.Error("Error deleting future milestone field entry", "err", err)
69+
}
70+
err = db.Delete(lastCheckpoint)
71+
if err != nil {
72+
log.Error("Error deleting last checkpoint entry", "err", err)
73+
}
74+
}
75+
5576
func ReadFinality[T BlockFinality[T]](db ethdb.KeyValueReader) (uint64, common.Hash, error) {
5677
lastTV, key := getKey[T]()
5778

core/txpool/legacypool/list.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,9 @@ func (l *pricedList) Discard(slots int) (types.Transactions, bool) {
713713
l.reheapMu.Lock()
714714
defer l.reheapMu.Unlock()
715715

716+
if slots < 0 {
717+
slots = 0
718+
}
716719
drop := make(types.Transactions, 0, slots) // Remote underpriced transactions to drop
717720

718721
for slots > 0 {

docs/cli/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040

4141
- [```peers status```](./peers_status.md)
4242

43+
- [```purge-whitelisted-entries```](./purge-whitelisted-entries.md)
44+
4345
- [```removedb```](./removedb.md)
4446

4547
- [```server```](./server.md)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Purge whitelisted entries
2+
3+
The ```bor purge-whitelisted-entries``` command will remove locally whitelisted checkpoint and milestone entries from the database.
4+
5+
## Options
6+
7+
- ```datadir```: Path of the data directory to store information
8+
9+
- ```keystore```: Path of the data directory to store keys

docs/cli/server.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ The ```bor server``` command runs the Bor client.
4040

4141
- ```dev.period```: Block period to use in developer mode (0 = mine only if transaction pending) (default: 0)
4242

43+
- ```disable-blind-fork-validation```: Disable additional fork validation and accept blind forks without tracing back to last whitelisted entry (default: false)
44+
4345
- ```disable-bor-wallet```: Disable the personal wallet endpoints (default: true)
4446

4547
- ```eth.requiredblocks```: Comma separated block number-to-hash mappings to require for peering (<number>=<hash>)
@@ -76,6 +78,8 @@ The ```bor server``` command runs the Bor client.
7678

7779
- ```log-level```: Log level for the server (trace|debug|info|warn|error|crit), will be deprecated soon. Use verbosity instead
7880

81+
- ```max-blind-fork-validation-limit```: Maximum number of blocks to traverse back in the database when validating blind forks (default: 256)
82+
7983
- ```parallelevm.enable```: Enable Block STM (default: true)
8084

8185
- ```parallelevm.enforce```: Enforce block processing via Block STM (default: false)

0 commit comments

Comments
 (0)