Commit graph

51 commits

Author SHA1 Message Date
Daniel Liu
13d39173b3 accounts/usbwallet: update hid library (#29176) 2025-01-24 16:54:12 +08:00
Daniel Liu
4e951ed8fe all: use github.com/deckarep/golang-set/v2 (generic set) (#26159) 2025-01-24 16:54:11 +08:00
Daniel Liu
4081ed926a accounts/keystore: replace inotify with fsnotify (#26176) 2025-01-24 16:54:11 +08:00
Daniel Liu
c75ba99267 accounts/keystore: use github.com/google/uuid (#22217)
This replaces the github.com/pborman/uuid dependency with
github.com/google/uuid because the former is only a wrapper for
the latter (since v1.0.0).

Co-authored-by: Felix Lange <fjl@twurst.com>
2025-01-24 16:18:30 +08:00
Daniel Liu
f8c67edb64 accounts/scwallet: use go-ethereum crypto instead of go-ecdh (#22212)
* accounts/scwallet: use go-ethereum crypto instead of go-ecdh

github.com/wsddn/go-ecdh is a wrapper package for ECDH functionality
with any elliptic curve.

Since 'generic' ECDH is not required in accounts/scwallet (the curve is
always secp256k1), we can just use the standard library functionality
and our own crypto libraries to perform ECDH and save a dependency.

* Update accounts/scwallet/securechannel.go

Co-authored-by: Guillaume Ballet <gballet@gmail.com>

* Use the correct key

Co-authored-by: Guillaume Ballet <gballet@gmail.com>
2025-01-24 16:18:30 +08:00
Daniel Liu
7c3c703559 tests/fuzzers/abi: add fuzzer for fuzzing package accounts/abi (#21217)
* tests/fuzzers/abi: added abi fuzzer

* accounts/abi: fixed issues found by fuzzing

* tests/fuzzers/abi: update fuzzers, added repro test

* tests/fuzzers/abi: renamed abi_fuzzer to abifuzzer

* tests/fuzzers/abi: updated abi fuzzer

* tests/fuzzers/abi: updated abi fuzzer

* accounts/abi: minor style fix

* go.mod: added go-fuzz dependency

* tests/fuzzers/abi: updated abi fuzzer

* tests/fuzzers/abi: make linter happy

* tests/fuzzers/abi: make linter happy

* tests/fuzzers/abi: comment out false positives
2025-01-24 16:18:29 +08:00
Daniel Liu
2e21b96101 accounts/usbwallet: add webusb trezor support (#19588) 2025-01-24 16:18:29 +08:00
Daniel Liu
2999bea17f accounts: smartcard wallet without the dependency on libpcsclite (#19273) 2025-01-24 16:18:29 +08:00
Daniel Liu
588f61661c build: add imports for go generate tools (#24682) 2025-01-20 11:52:59 +08:00
Daniel Liu
1d5d2f1349 build: add 'go generate' checker 2025-01-16 08:21:42 +08:00
Daniel Liu
15be5ba464 crypto: use decred secp256k1 directly (#30595) 2025-01-04 11:00:57 +08:00
Daniel Liu
57eb92da1c common/prque: remove dependency on golang.org/exp (#29314) 2024-12-28 09:06:31 +08:00
Felföldi Zsolt
f74cccd1cb beacon/types: add beacon chain data types (#27292)
* beacon/types: add beacon chain data types

* beacon/merkle: added comments

* go.mod: cleanups

---------

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2024-12-28 09:06:31 +08:00
Péter Szilágyi
39e9d8f94d common/prque: generic priority queue (#26290) 2024-12-28 09:06:31 +08:00
Daniel Liu
6f19ace5e2 common/mclock: remove dependency on github.com/aristanetworks/goarista (#22211) 2024-12-28 09:06:30 +08:00
Daniel Liu
82ff8c19a0 all: remove uses of untyped golang-lru 2024-12-21 14:39:26 +08:00
Daniel Liu
c7565af9b8 metrics: remove dependency on golang.org/exp (#29314) 2024-12-13 14:00:14 +08:00
Daniel Liu
e524043a3b metrics: use slices package for sorting (#27493 #27909)
Co-authored-by: Felix Lange <fjl@twurst.com>
2024-12-13 14:00:13 +08:00
Daniel Liu
6e055a601d metrics/influxdb: reuse code between v1 and v2 reporters (#26963) 2024-12-13 14:00:13 +08:00
Daniel Liu
29b72dbba6 metrics/influxdb: support V2 (#23194) 2024-12-13 14:00:12 +08:00
Daniel Liu
d7d54b00f7 metrics: replace gosigar with gopsutil (#21041) 2024-12-13 14:00:12 +08:00
Daniel Liu
1eb2ed8293 core, metrics, p2p: expose various counter metrics for grafana (#19692) 2024-12-13 14:00:11 +08:00
Daniel Liu
824dea669c crypto/kzg4844: use the new trusted setup file and format (#28383) 2024-12-09 17:49:00 +08:00
Daniel Liu
8f57d6caea go.mod: upgrade c-kzg-4844 (#27907) 2024-12-09 17:49:00 +08:00
Daniel Liu
541ddee235 go.mod: update kzg libraries to use big-endian (#27510) 2024-12-09 17:49:00 +08:00
Daniel Liu
ed03a99770 crypto/kzg4844: upgrade c-kzg-4844 to v0.2.0 (#27257) 2024-12-09 17:49:00 +08:00
Daniel Liu
bedd571091 crypto/kzg4844: pull in the C and Go libs for KZG cryptography (#27155) 2024-12-09 17:49:00 +08:00
Daniel Liu
cb3edac2c7 crypto: use btcec/v2 for no-cgo (#24533) 2024-12-09 17:49:00 +08:00
Daniel Liu
5ee26e04ed crypto/secp256k1: fix undefined behavior in BitCurve.Add (#22621) 2024-12-09 17:49:00 +08:00
Daniel Liu
7711f4b76d tests/fuzzers: crypto/bn256 tests against gnark-crypto (#22755) 2024-12-09 17:49:00 +08:00
Daniel Liu
ae95ceac41 bn256: added consensys/gurvy bn256 implementation (#21812) 2024-12-09 17:49:00 +08:00
Daniel Liu
d3fc08db1d update golang.org/x/crypto to v0.29.0 2024-12-09 17:48:59 +08:00
Daniel Liu
dcab7e8efb cmd: migrate to urfave/cli/v2 (#24751) 2024-11-25 16:39:29 +08:00
Daniel Liu
ec4ca1ed6a all: replace log15 with slog (#28187) 2024-11-15 10:02:42 +08:00
Daniel Liu
d773520298 go.mod: update fastcache to v1.12.2 2024-08-25 16:41:06 +08:00
JukLee0ira
d6737b69e6 rpc:remove package ethereum/go-ethereum 2024-05-13 19:51:50 +08:00
Daniel Liu
ec50ca36d9 core, eth, trie: use common/prque (#17508) 2024-05-09 18:38:27 +08:00
Paweł Bylica
192edc0c63 core/vm: use uint256 in EVM implementation (#20787)
* core/vm: use fixed uint256 library instead of big

* core/vm: remove intpools

* core/vm: upgrade uint256, fixes uint256.NewFromBig

* core/vm: use uint256.Int by value in Stack

* core/vm: upgrade uint256 to v1.0.0

* core/vm: don't preallocate space for 1024 stack items (only 16)

Co-authored-by: Martin Holst Swende <martin@swende.se>
2024-03-01 14:13:23 +08:00
Liam Lai
abd3c70dc4 use right go package 2023-11-21 00:41:57 +11:00
Liam Lai
824d7b232f resolve conflict 2023-11-20 23:53:49 +11:00
Banana-J
39f6e6ee56
upgrade the websocket in xdpos (#349) 2023-11-06 15:37:14 +11:00
Wang Gerui
5cfa0ea8bf fix error during cherry-picking 2023-11-02 00:59:16 +08:00
Guillaume Ballet
6743853dca console, internal/jsre: use github.com/dop251/goja (#20470)
This replaces the JavaScript interpreter used by the console with goja,
which is actively maintained and a lot faster than otto. Clef still uses otto
and eth/tracers still uses duktape, so we are currently dependent on three
different JS interpreters. We're looking to replace the remaining uses of otto
soon though.
2023-11-02 00:43:55 +08:00
Wang Gerui
29123c5d28 bump go to 1.21 in go.mod & go.sum 2023-10-23 23:43:43 +08:00
Liam
50ae0c95fd
xin-197 xin-198 fix devnet issues (#99)
* xin-197 xin-198 fix devnet issues

* update log
2022-06-05 11:06:32 +02:00
Liam
6c5fe34615 v2 miner function implementation and happy path (#22)
* New struct in consensus/XDPoS/utils/types.go, util functions, and test. (#14)

* define vote, timeout, sync info, qc, tc, extra fields in types.go, add test in types_test.go

* add json tag in types.go, refine encoder decoder of extra fields

* refactor types.go utils.go

* re-write types, comments

* add Hash SigHash for types, and tests

* define Round type

* remove unnecessary logs

* add v2 engine functions placeholder

* typo fix on the consensus v2 function placeholders

* add countdown timer

* make initilised private to countdown

* add v2 specific config struct

* rename some config variables

* Implement BFT Message receiver (#13)

* fix or skip tests due to PR-136 changes

* add bft receiver functions

* add bft receiver functions

* rename tc to TimeoutCert

* implement more functions

* New struct in consensus/XDPoS/utils/types.go, util functions, and test. (#14)

* define vote, timeout, sync info, qc, tc, extra fields in types.go, add test in types_test.go

* add json tag in types.go, refine encoder decoder of extra fields

* refactor types.go utils.go

* re-write types, comments

* add Hash SigHash for types, and tests

* define Round type

* remove unnecessary logs

* add temp functions

* add v2 engine functions placeholder

* typo fix on the consensus v2 function placeholders

* add countdown timer

* make initilised private to countdown

* push verify function

* add test on receiving vote

* revert type change

* add async on broadcast function

* add quit initial

* fix test

Co-authored-by: Jianrong <wjrjerome@gmail.com>
Co-authored-by: wgr523 <wgr523@gmail.com>

* generate and verify timeout message

* Consensus V2 variable, timeout pool (#19)

* fill in XDPoS_v2 variables and processQC/TC

* add timeout pool, refine engine variables

* refactor type functions

* solve a small pointer bug

* create general pool and its test, refine engine

* refine pool, add xdpos v2 config cert threshold

* refine config

* vote and timeout handlers

* fix pool test

* bft miner preparation

* review comment improvement

* update

* relocate tests

* add and remove comment

* fix the syntax error

* update network layer and add handler functions (#23)

* update network layer and add handler functions

* fix test syntax error

* add ProcessQC implementation

* add ProcessQC tests

* add snapshot test

* add wait qc process

* remove testing files

* add route snapshot

* fix merge issue

* add default v2 behaviour (#24)

* add v2 ecrecover functions and refactor test

* fix all the tests

* put minimun lock variable

* debugging prepare and seal v2 blocks

* Trigger proposeBlockHandler after v2 block received and verified in fetcher

* skip snapshot apply related tests

* update test check

* rename bfter to bft handler and ignore normal behviour

* fix bugs during local 4 node run

* fix test

* fix sync info test

* fix bugs during local 4 node run

* rebase and fix bug

* remove hook validators function"

Co-authored-by: wgr523 <wgr523@gmail.com>
Co-authored-by: Jianrong <wjrjerome@gmail.com>
2021-12-30 11:45:18 +11:00
Jianrong
0eb2504db3 Add 1 test for adaptor to switch from v1 to v2 2021-10-17 11:20:57 +11:00
Jianrong
c8ee8e1936 add a simple test to verify DB is the same across different engine versions 2021-10-16 13:22:48 +11:00
Jianrong
e34311ff45 Remove unused consensus v1 methods 2021-10-10 16:04:34 +11:00
Jianrong
fcbc5a28e1 refactor XDPoS to accommodate multiple consensus engine versions 2021-10-10 16:02:16 +11:00