Commit graph

211 commits

Author SHA1 Message Date
Chen Kai
a23eea817d feat:replace zrnt
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2024-04-03 16:06:37 +08:00
Chen Kai
7c6d0d318d
Merge branch 'ethereum:master' into portal 2024-03-22 10:21:00 +08:00
Felix Lange
bca6c40709
beacon/blsync: support for deneb fork (#29180)
This adds support for the Deneb beacon chain fork, and fork handling
in general, to the beacon chain light client implementation.

Co-authored-by: Zsolt Felfoldi <zsfelfoldi@gmail.com>
2024-03-20 19:22:44 +01:00
Chen Kai
b573ba01b0 update go.sum
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2024-03-20 15:38:50 +08:00
Martin HS
33a2d825f7 all: update to go version 1.22.1 (#28946)
Since Go 1.22 has deprecated certain elliptic curve operations, this PR removes
references to the affected functions and replaces them with a custom implementation
in package crypto. This causes backwards-incompatible changes in some places.

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Felix Lange <fjl@twurst.com>
2024-03-20 15:37:23 +08:00
Martin HS
ab49f228ad
all: update to go version 1.22.1 (#28946)
Since Go 1.22 has deprecated certain elliptic curve operations, this PR removes 
references to the affected functions and replaces them with a custom implementation
in package crypto. This causes backwards-incompatible changes in some places.

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Felix Lange <fjl@twurst.com>
2024-03-18 17:36:50 +01:00
Chen Kai
f949812d61
Merge branch 'ethereum:master' into portal 2024-03-18 18:32:54 +08:00
Martin HS
c611924727
go.mod: update protobuf (#29270) 2024-03-18 08:13:55 +01:00
Chen Kai
957cfb1bbe feat:update utp-go
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2024-03-15 22:30:01 +08:00
Chen Kai
06f269cbe8 Merge branch 'master' into portal1 2024-03-15 21:11:28 +08:00
Bin
57308beecf
go.mod: update golang.org/x/crypto from v0.17.0 to v0.21.0 (#29228) 2024-03-14 00:25:42 +01:00
Martin HS
d5bacfa4de
crypto/kz4844: pass blobs by ref (#29050)
This change makes use of the following underlying changes to the kzg-libraries in order to avoid passing large things on the stack:

- c-kzg: https://github.com/ethereum/c-kzg-4844/pull/393 and
- go-kzg: https://github.com/crate-crypto/go-kzg-4844/pull/63
2024-03-13 07:51:46 +01:00
thinkAfCod
5ca21c445b fix: update utp-go version 2024-03-09 11:32:37 +08:00
Chen Kai
69ed1c63e2 Merge branch 'master' into portal1 2024-03-08 16:29:34 +08:00
Felföldi Zsolt
aadcb88675
cmd/blsync, beacon/light: beacon chain light client (#28822)
Here we add a beacon chain light client for use by geth.

Geth can now be configured to run against a beacon chain API endpoint,
without pointing a CL to it. To set this up, use the `--beacon.api` flag. Information
provided by the beacon chain is verified, i.e. geth does not blindly trust the beacon
API endpoint in this mode. The root of trust are the beacon chain 'sync committees'.

The configured beacon API endpoint must provide light client data. At this time, only
Lodestar and Nimbus provide the necessary APIs.

There is also a standalone tool, cmd/blsync, which uses the beacon chain light client
to drive any EL implementation via its engine API.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2024-03-06 17:50:22 +01:00
Chen Kai
5fa84e3566 fix:fix hive rpc bug
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2024-03-06 21:34:13 +08:00
Martin HS
e73f55365c
accounts/usbwallet: update hid library (#29176) 2024-03-06 12:31:50 +02:00
Martin HS
899bb88a4b
accounts/usbwallet: revert #28945 (#29175) 2024-03-06 11:32:17 +02:00
Devon Bear
66e1a6ef49
go.mod: bump pebble db to official release (#29038)
bump pebble
2024-03-05 16:15:02 +02:00
Martin HS
96bf23f1ea
accounts/usbwallet: use updated hid (only) library (#28945)
* accounts/usbwallet: use updated hid (only) library

* deps: update karalabe/hid
2024-03-05 14:32:47 +01:00
thinkAfCod
f7b1f88adb fix: utp version 2024-03-04 13:42:18 +08:00
Chen Kai
d5ca1a8880 fix:update utpgo and change discv5 resp timeout
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2024-02-29 20:16:49 +08:00
Chen Kai
2d9017e6a4 fix:fix hive
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2024-02-28 20:16:45 +08:00
fearlseefe
ca22f0937d fix: valdate post merge block header 2024-02-28 10:04:18 +08:00
Chen Kai
b85b1b751f
Merge branch 'ethereum:master' into portal 2024-02-17 19:40:16 +08:00
Péter Szilágyi
3c30de219f
core/txpool/blobpool: update the blob db with corruption handling (#29001)
Updates billy to a more recent version which is more robust in the face of corrupt data (e.g. after a hard crash)
2024-02-16 16:33:14 +01:00
Chen Kai
9461701b0e Merge branch 'master' into portal1 2024-02-12 20:00:57 +08:00
lightclient
1f50aa7631
cmd,internal/era: implement export-history subcommand (#26621)
* all: implement era format, add history importer/export

* internal/era/e2store: refactor e2store to provide ReadAt interface

* internal/era/e2store: export HeaderSize

* internal/era: refactor era to use ReadAt interface

* internal/era: elevate anonymous func to named

* cmd/utils: don't store entire era file in-memory during import / export

* internal/era: better abstraction between era and e2store

* cmd/era: properly close era files

* cmd/era: don't let defers stack

* cmd/geth: add description for import-history

* cmd/utils: better bytes buffer

* internal/era: error if accumulator has more records than max allowed

* internal/era: better doc comment

* internal/era/e2store: rm superfluous reader, rm superfluous testcases, add fuzzer

* internal/era: avoid some repetition

* internal/era: simplify clauses

* internal/era: unexport things

* internal/era,cmd/utils,cmd/era: change to iterator interface for reading era entries

* cmd/utils: better defer handling in history test

* internal/era,cmd: add number method to era iterator to get the current block number

* internal/era/e2store: avoid double allocation during write

* internal/era,cmd/utils: fix lint issues

* internal/era: add ReaderAt func so entry value can be read lazily

Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>

* internal/era: improve iterator interface

* internal/era: fix rlp decode of header and correctly read total difficulty

* cmd/era: fix rebase errors

* cmd/era: clearer comments

* cmd,internal: fix comment typos

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2024-02-07 09:18:27 -07:00
Chen Kai
20e4628752
Merge branch 'ethereum:master' into portal 2024-02-05 21:44:53 +08:00
Martin HS
06a871136e
deps: update memsize (#28916) 2024-02-02 18:26:13 +02:00
Chen Kai
ee44050195
Merge branch 'ethereum:master' into portal 2024-01-24 10:11:19 +08:00
Guillaume Ballet
19d9977641
go.{mod,sum}: upgrade go-ole to support arm64 (#28859)
go.{mod,sum}: upgrade go-ole
2024-01-23 11:40:01 +01:00
fearlessfe
baf8e8aac7 feat: get header by block hash 2024-01-20 18:05:58 +08:00
fearlseefe
7fb680502e refactor: content storage
move ContentStorage interface to storage
2024-01-02 21:40:09 +08:00
thinkAfCod
b14abef0cb fix: update utp-go version and modify test case 2023-12-25 18:02:35 +08:00
Chen Kai
d04b685d31 Merge branch 'master' into portal1 2023-12-20 20:48:32 +08:00
pengzhen
b4d6ed2eee feat: finish accumulator 2023-12-19 21:38:43 +08:00
dependabot[bot]
0cc192bd3a
build(deps): bump golang.org/x/crypto from 0.15.0 to 0.17.0 (#28702)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-19 10:50:02 +01:00
fearlessfe
4fc88f8dbe feat: content storage
impl #5
2023-12-13 19:26:41 +08:00
thinkAfCod
da7196970f fix: update utp-go version and modify test case 2023-12-03 11:39:28 +08:00
Chen Kai
b724ba2b79 Merge branch 'opmaster' into portal1
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2023-12-01 15:55:50 +08:00
jwasinger
28e7371701
all: replace log15 with slog (#28187)
This PR replaces Geth's logger package (a fork of [log15](https://github.com/inconshreveable/log15)) with an implementation using slog, a logging library included as part of the Go standard library as of Go1.21.

Main changes are as follows:
* removes any log handlers that were unused in the Geth codebase.
* Json, logfmt, and terminal formatters are now slog handlers.
* Verbosity level constants are changed to match slog constant values.  Internal translation is done to make this opaque to the user and backwards compatible with existing `--verbosity` and `--vmodule` options.
* `--log.backtraceat` and `--log.debug` are removed.

The external-facing API is largely the same as the existing Geth logger.  Logger method signatures remain unchanged.

A small semantic difference is that a `Handler` can only be set once per `Logger` and not changed dynamically.  This just means that a new logger must be instantiated every time the handler of the root logger is changed.

----
For users of the `go-ethereum/log` module. If you were using this module for your own project, you will need to change the initialization. If you previously did 
```golang
log.Root().SetHandler(log.LvlFilterHandler(log.LvlInfo, log.StreamHandler(os.Stderr, log.TerminalFormat(true))))
```
You now instead need to do 
```golang
log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelInfo, true)))
```
See more about reasoning here: https://github.com/ethereum/go-ethereum/issues/28558#issuecomment-1820606613
2023-11-29 08:33:50 +01:00
Chen Kai
845e59dacb
Merge branch 'ethereum:master' into portal 2023-11-28 13:04:33 +08:00
Martin Holst Swende
5b57727d6d
go.mod: update uint256 to v1.2.4 (#28612) 2023-11-27 16:39:28 +02:00
Chen Kai
47b6e691e4 Merge branch 'portal' into feature_offer 2023-11-26 20:47:08 +08:00
Chen Kai
222faeecd6 fix:fix go.sum
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2023-11-26 20:31:20 +08:00
Chen Kai
96a89db758 feat:add offer handle method
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2023-11-26 20:25:53 +08:00
thinkAfCod
983999815a fix: modify max packet size 2023-11-26 20:25:53 +08:00
thinkAfCod
8eab6cdf1a fix: update lib of utp 2023-11-26 20:25:53 +08:00
grapebaba
0140e12cac feat:add find content
Signed-off-by: grapebaba <281165273@qq.com>
2023-11-26 20:25:50 +08:00