Commit Graph

1541 Commits

Author SHA1 Message Date
Somnath Banerjee
adef971995
Txpool upgrades for EIP-4844 Blob Transactions (#1075)
EIP-4844 proposed the new (type-3) Blob Transactions which are expensive
(because blobs are big etc.). The tx-pool should be tightened to
alleviate spam and dos attacks by way of these new transactions.

### Changes
**Keep blob txs cached**
During new block, don't delete mined blobTxs, instead cache it till they
are finalized. This is to avoid fetching them again for unwind. During
unwind, if it's a previously seen blobTxn, try to fetch it from memory.

**Pool config**
BlobSlots: Similar to AccountSlots - limits how many blobs a single
account is allowed to have until it's marked as spamming.
Blob txn priceBump: It's an added field in pool config (with a flag).
Defaults to 100%, since blob txs of equal fee are costlier to
process/execute

---------

Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2023-09-10 10:23:46 +00:00
Mark Holt
7f9f12acab
Added BorFinality to kv table definitions to support polygon milestones (#1116) 2023-09-10 08:49:51 +00:00
alex.sharov
0d0bcd0071 Merge branch 'stable' 2023-09-10 15:48:07 +07:00
Alex Sharov
3cee4ac5c8
Downloader: don't fail when see unusual file, skip it (backward/forward compatibility) (#1117) 2023-09-10 15:46:27 +07:00
alex.sharov
fe2e33ebef Merge branch 'stable' 2023-09-09 19:12:07 +07:00
Giulio rebuffo
3ca4d8d6a3
Added Bytes64 (#1115) 2023-09-08 20:40:35 +00:00
Alex Sharov
4fe525e87a
grpc v1.58 (#1114) 2023-09-08 05:32:50 +00:00
Somnath Banerjee
2d6e293a15
Reduce SyncToNewPeersEvery (#1111)
The default 2 min SyncToNewPeersEvery seems like too big a value for txn
propagation. So, changing the default to something like 5 sec w/o
introducing a flag.
2023-09-06 14:18:19 +00:00
Park Changwan
84c7a0f089
Add addPeer RPC (#1033)
This PR mirrors https://github.com/testinprod-io/erigon-lib/pull/12.

Library implementation for `admin_addPeer` method.
RPC Spec: Refer to
https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-admin.

Requires https://github.com/ledgerwatch/interfaces/pull/174.

After https://github.com/ledgerwatch/interfaces/pull/174 is merged, will
update interfaces version, removing `replace` at `go.mod`.

---------

Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2023-09-06 08:31:05 +00:00
Alex Sharov
cf6e038577
compress.Next: return empty byte slice instead of nil when wordLen == 0 (#1085) 2023-09-06 08:03:09 +00:00
Alex Sharov
a6ad145f1f
etl: do sort and file flush in another goroutine (#1052)
- if provider is in-memory: do sort+flush in same goroutine
- if provider is file-based: do sort+flush in another goroutine, and
Load method will wait for unfinished goroutines and return error if one
happened inside goroutine. Also in this case do pre-palloc of new buffer
with `prevBufSize/8` size - because can't re-use prev buffer in this
case.

Reason: E4 has 8 etl collectors in same time (for
domains/history/inverted_indices) and `sort.Stable` is kind-of
bottleneck.
2023-09-06 07:51:09 +00:00
Alex Sharov
2e429836f0
deps up (after release) (#1110) 2023-09-06 07:43:44 +00:00
Alex Sharov
31687f4ce9
txpool: switch db to durable mode - with fsync outside of pool's global lock (#1109) 2023-09-06 07:26:36 +00:00
alex.sharov
f30a800889 save 2023-09-06 14:13:07 +07:00
alex.sharov
57f16884b8 Merge branch 'stable' 2023-09-06 10:24:24 +07:00
Alex Sharov
dde477f603
shutdown deadlock (#1107) 2023-09-06 10:19:00 +07:00
Giulio rebuffo
79eb6ed6c5
Better types for beacon (#1106) 2023-09-05 17:03:06 +00:00
Giulio rebuffo
975de7cc74
added beacon primitives types (#1098) 2023-09-05 16:00:49 +00:00
Alex Sharov
e4c6944828
Restore genesis reads code - remote rpc case. Remove ctx parameter from baseApi func (tx already has internal ctx) (#1096) 2023-09-04 05:42:02 +00:00
alex.sharov
568d783b0d save 2023-09-04 10:44:09 +07:00
Andrew Ashikhmin
82448e2ede
Revert most txpool errors to Warn (#1095)
Less radical variant of PR #1094
2023-09-01 17:03:41 +00:00
Giulio rebuffo
b08f183139
demoted txpool logs to Debug instead of Warn (#1094) 2023-09-01 15:28:06 +00:00
alex.sharov
21f96bf792 up linter version 2023-09-01 10:59:27 +07:00
Alex Sharov
88e9d7a4d3
mdbx: m1 segfault (#1093) 2023-08-31 11:35:50 +00:00
battlmonstr
a019c295fa
doc: third-party readme and license files (#1091) 2023-08-30 08:12:06 +00:00
Alex Sharov
34cb8007ae
Compress: graceful shutdown support (#1090) 2023-08-30 03:20:40 +00:00
battlmonstr
e3850da16f
ci: check source code licenses compatibility (#1089)
When it fails, it looks like this:

https://github.com/ledgerwatch/erigon-lib/actions/runs/6014808505/job/16315357613
2023-08-30 03:16:39 +00:00
Mark Holt
c2851b6ae7
Added Mdbx sizing to txpool config (#1086)
Added 

 ```
MdbxPageSize          datasize.ByteSize
MdbxDBSizeLimit       datasize.ByteSize
MdbxGrowthStep        datasize.ByteSize
```
to allow txpool db to be configured.
2023-08-26 07:45:09 +00:00
Giulio rebuffo
bae527eba9
Ranges in execution.proto (#1087) 2023-08-26 00:26:29 +00:00
Alex Sharov
0cdb085f51
Torrent: add trackers list (#1084) 2023-08-25 03:45:05 +00:00
alex.sharov
c344806b10 rename torquem-ch project 2023-08-24 18:10:47 +07:00
Alex Sharov
3c4b0d425b
move mdbx to new org (#1083) 2023-08-24 11:00:21 +00:00
Alex Sharov
ec899e41a1
metrics: prevent commit metrics duplication (#1082) 2023-08-24 02:24:09 +00:00
Alex Sharov
ac13f4307b
torrent lib to support go21 (#1081) 2023-08-23 00:15:40 +00:00
ledgerwatch
3aa5249d48
Add BorEvents snapshot type (#1051)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-08-18 15:33:09 +00:00
Somnath Banerjee
f84bd53b26
Fix broadcast issue for blob transactions (#1080) 2023-08-18 13:36:20 +00:00
Alex Sharov
0f311abd0e
Update README.md (#1079) 2023-08-18 07:29:13 +00:00
Alex Sharov
fdd39828c3
log file unmap/close errors (#1036) 2023-08-12 20:14:40 +00:00
Alex Sharov
de16cd6462
up 'x' packages versions (#1076) 2023-08-12 05:58:30 +00:00
Giulio rebuffo
36aec4c6fe
added sentinel direct (#1077) 2023-08-11 23:54:55 +00:00
Giulio rebuffo
1881b491b8
Gnosis fields for execution.proto (#1072) 2023-08-11 21:07:33 +00:00
Alex Sharov
8d0bcd06ea
tmpdb: move to tmpdir (#1074) 2023-08-11 19:06:05 +00:00
alex.sharov
309e0bdc6c pool: don't warn at Ctrl+C 2023-08-11 11:58:25 +06:00
Alex Sharov
a17eaecf00
Recsplit: cancelable build (#1073) 2023-08-11 05:54:56 +00:00
Andrew Ashikhmin
563a68124b
interfaces: Add parent_beacon_block_root (EIP-4788) (#1069)
Pick up https://github.com/ledgerwatch/interfaces/pull/187
2023-08-06 09:40:03 +00:00
Giulio rebuffo
6fc9f7e28b
removed missingHash (#1071) 2023-08-06 00:27:54 +00:00
Giulio rebuffo
3f118dbda5
save (#1070) 2023-08-05 00:27:17 +00:00
Giulio rebuffo
73d985faf4
Added memory diff to memory mutation (#1068) 2023-08-04 11:25:22 +00:00
Andrew Ashikhmin
0a6037d12f
OverrideShanghaiTime -> OverrideCancunTime (#1067) 2023-08-03 13:37:28 +00:00
racytech
d4f8da719e
init kzg ctx from file (trusted_setup.json) (#1066) 2023-08-03 06:35:10 +00:00