Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Upgrade] Go-Ethereum release v1.9.25 #1223

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
919229d
params: begin v1.9.25 release cycle
fjl Nov 12, 2020
a19b423
crypto/bn256: improve bn256 fuzzer (#21815)
holiman Nov 13, 2020
9ded4e3
crypto/bn256: better comments for u, P and Order (#21836)
MariusVanDerWijden Nov 13, 2020
0703c91
tests/fuzzers: improve the fuzzers (#21829)
holiman Nov 13, 2020
6f4cccf
core/vm, protocol_params: implement eip-2565 modexp repricing (#21607)
holiman Nov 13, 2020
2045a2b
core, all: split vm.Context into BlockContext and TxContext (#21672)
MariusVanDerWijden Nov 13, 2020
cf856ea
accounts/abi: template: set events Raw field in Parse methods (#21807)
nfeignon Nov 13, 2020
92c56eb
common: fix documentation of Address.SetBytes (#21814)
PascalDierich Nov 16, 2020
1ea7537
crypto/bn256: refine comments according to #19577, #21595, and #21836…
SadPencil Nov 17, 2020
844485e
consensus/ethash: fix usage of *reflect.SliceHeader (#21372)
prestonvanloon Nov 17, 2020
d513584
cmd/geth: remove retesteth
holiman Nov 17, 2020
db87223
crypto/secp256k1: add checking z sign in affineFromJacobian (#18419)
hbakhtiyor Nov 17, 2020
6b98580
cmd/geth: improve les test on windows (#21860)
holiman Nov 17, 2020
23524f8
all: disable recording preimage of trie keys (#21402)
rjl493456442 Nov 18, 2020
b9ff57c
metrics: fix the panic for reading empty cpu stats (#21864)
rjl493456442 Nov 18, 2020
2808046
Merge pull request #21861 from holiman/remove_retesteth
karalabe Nov 19, 2020
f1e1d9f
node: support expressive origin rules in ws.origins (#21481)
wbt Nov 19, 2020
6f88d65
trie, rpc, cmd/geth: fix tests on 32-bit and windows + minor rpc fixe…
holiman Nov 19, 2020
ebb9591
crypto/bn256: fix bn256Mul fuzzer to not hang on large input (#21872)
holiman Nov 20, 2020
3ef5277
p2p: avoid spinning loop on out-of-handles (#21878)
holiman Nov 20, 2020
bddf5aa
les/utils: protect against WeightedRandomSelect overflow (#21839)
zsfelfoldi Nov 23, 2020
f6e1aed
github: Add new style of issue-templates
ligi Nov 23, 2020
6104ab6
tests/fuzzers/bls1381: add bls fuzzer (#21796)
holiman Nov 23, 2020
ead8146
Merge pull request #21890 from ligi/issue_templates
karalabe Nov 23, 2020
6b58409
cmd/faucet: improve handling of facebook post url (#21838)
LieutenantRoger Nov 24, 2020
bddd103
les: fix GetProofsV2 bug (#21896)
zsfelfoldi Nov 24, 2020
7e7a3f0
github: Remove vulnerability.md (#21894)
ligi Nov 24, 2020
59b480a
cmd/devp2p/internal/ethtest: add 'large announcement' tests (#21792)
MariusVanDerWijden Nov 24, 2020
29efe1f
core/types: fixed typo (#21897)
MariusVanDerWijden Nov 25, 2020
c92faee
all: simplify nested complexity and if blocks ending with a return st…
alexprut Nov 25, 2020
f59ed35
graphql: always return 400 if errors are present in the response (#21…
atoulme Nov 25, 2020
810f9e0
all: remove redundant conversions and import names (#21903)
alexprut Nov 25, 2020
429e714
p2p/discover: fix deadlock in discv5 message dispatch (#21858)
nisdas Nov 25, 2020
fa572cd
crypto: signing builds with signify/minisign (#21798)
gballet Nov 27, 2020
b71334a
accounts, signer: fix Ledger Live account derivation path (clef) (#21…
svenski123 Nov 29, 2020
566cb4c
accounts/keystore: add missing function doc for SignText (#21914)
pmerkleplant Nov 30, 2020
aba0c23
cmd/geth: make tests run quicker + use less memory and disk (#21919)
holiman Nov 30, 2020
a1ddd9e
cmd/devp2p/internal/ethtest: add transaction tests (#21857)
MariusVanDerWijden Nov 30, 2020
e7db1db
p2p/nodestate: fix deadlock during shutdown of les server (#21927)
holiman Nov 30, 2020
a2795c8
les: fix nodiscover option (#21906)
zsfelfoldi Dec 1, 2020
908c180
params: update CHTs (#21941)
rjl493456442 Dec 2, 2020
e9e86ae
eth: fix error in tracing if reexec is set (#21830)
holiman Dec 2, 2020
0b2f144
go.mod: update github.com/golang/snappy(#21934)
holiman Dec 2, 2020
d7a64dc
cmd/devp2p: add node filter for snap + fix arg error (#21950)
holiman Dec 3, 2020
62cedb3
core/vm/runtime: remove duplicated line (#21956)
ziogaschr Dec 4, 2020
7770e41
core: improve contextual information on core errors (#21869)
holiman Dec 4, 2020
15339cf
cmd/geth: implement vulnerability check (#21859)
holiman Dec 4, 2020
581c028
les: cosmetic rewrite of the arm64 float bug workaround (#21960)
gballet Dec 7, 2020
6a4e730
crypto/secp256k1: add workaround for go mod vendor (#21735)
steveruckdashel Dec 8, 2020
ed0670c
accounts/abi/bind: allow specifying signer on transactOpts (#21356)
MariusVanDerWijden Dec 8, 2020
bd848aa
common: improve printing of Hash and Address (#21834)
lobatt Dec 8, 2020
40b6ccf
core,les: headerchain import in batches (#21471)
holiman Dec 9, 2020
915643a
cmd/geth: add test to verify regexps in version check (#21962)
holiman Dec 9, 2020
f935b1d
crypto/signify, build: fix archive signing with signify (#21977)
fjl Dec 9, 2020
817a3fb
p2p/enode: avoid crashing for invalid IP (#21981)
fjl Dec 9, 2020
9f6bb49
les, light: remove untrusted header retrieval in ODR (#21907)
rjl493456442 Dec 10, 2020
b44f24e
core, trie: speed up some tests with quadratic processing flaw (#21987)
holiman Dec 10, 2020
0045410
les: introduce forkID (#21974)
rjl493456442 Dec 10, 2020
1d1f5fe
build: upgrade to Go 1.15.6 (#21986)
fjl Dec 11, 2020
e787272
params: go-ethereum v1.9.25 stable
fjl Dec 11, 2020
a2e5c23
Merge branch 'master' into upgrade/go-ethereum/v1.9.25-2021629165723
baptiste-b-pegasys Jun 30, 2021
e1c2ee2
fix: merge
baptiste-b-pegasys Jun 30, 2021
f5b4406
fix: review GoQ versions
baptiste-b-pegasys Jun 30, 2021
3d961be
fix: GoQuorum signer
baptiste-b-pegasys Jun 30, 2021
d7e51ed
fix: state processor, missing err formatting
baptiste-b-pegasys Jun 30, 2021
88a5a9a
fix: restore tx GoQ modification
baptiste-b-pegasys Jun 30, 2021
f2f0f6b
fix: work with eip155 & psm tests
baptiste-b-pegasys Jun 30, 2021
358cba8
fix: cmd geth tests
baptiste-b-pegasys Jul 1, 2021
2149d5e
Merge branch 'master' into upgrade/go-ethereum/v1.9.25-2021629165723
baptiste-b-pegasys Jul 1, 2021
56ac367
fix: format (lint)
baptiste-b-pegasys Jul 1, 2021
72b09ad
fix: copy default value, don't erase it
baptiste-b-pegasys Jul 1, 2021
43261ed
Merge branch 'master' into upgrade/go-ethereum/v1.9.25-2021629165723
baptiste-b-pegasys Jul 28, 2021
3f48409
fix: cache config -> trie Config
baptiste-b-pegasys Jul 28, 2021
e2c853e
fix: unit test restored, check another error
baptiste-b-pegasys Jul 28, 2021
fdfb5ef
refactor: remove unused parameters
baptiste-b-pegasys Jul 28, 2021
6f24cf2
fix: configure with default cache config
baptiste-b-pegasys Jul 28, 2021
f82b3ca
Merge branch 'master' into upgrade/go-ethereum/v1.9.25-2021629165723
baptiste-b-pegasys Aug 16, 2021
057f9ca
fix: merge of master
baptiste-b-pegasys Aug 16, 2021
16eb371
Merge branch 'master' into upgrade/go-ethereum/v1.9.25-2021629165723
baptiste-b-pegasys Aug 19, 2021
ceb1f73
Merge branch 'master' into upgrade/go-ethereum/v1.9.25-2021629165723
baptiste-b-pegasys Aug 19, 2021
a1890de
Merge branch 'master' into upgrade/go-ethereum/v1.9.25-2021629165723
baptiste-b-pegasys Aug 25, 2021
09e33d1
Merge branch 'master' into upgrade/go-ethereum/v1.9.25-2021629165723
ricardolyn Aug 30, 2021
f8613cf
Merge branch 'master' into upgrade/go-ethereum/v1.9.25-2021629165723
ricardolyn Aug 31, 2021
8e73b07
go 1.15.6
baptiste-b-pegasys Aug 31, 2021
3e39272
fix: for review
baptiste-b-pegasys Aug 31, 2021
0067960
revert: unnecessary change
baptiste-b-pegasys Aug 31, 2021
f2e60a6
fix: remove comment
baptiste-b-pegasys Aug 31, 2021
7897ab3
fix: review of variable name
baptiste-b-pegasys Aug 31, 2021
ae50ace
fix: use the ChainContext interface
baptiste-b-pegasys Aug 31, 2021
12a2e39
fix: null pointer
baptiste-b-pegasys Aug 31, 2021
341635d
fix: don't check nil pointer
baptiste-b-pegasys Sep 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tests/fuzzers/bls1381: add bls fuzzer (#21796)
* added bls fuzzer

* crypto/bls12381: revert bls-changes, fixup fuzzer tests

* fuzzers: split bls fuzzing into 8 different units

* fuzzers/bls: remove (now stale) corpus

* crypto/bls12381: added blsfuzz corpus

* fuzzers/bls12381: fix the bls corpus

* fuzzers: fix oss-fuzz script

* tests/fuzzers: fixups on bls corpus

* test/fuzzers: remove leftover corpus

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
  • Loading branch information
holiman and MariusVanDerWijden authored Nov 23, 2020
commit 6104ab6b6d201df9e9d6372d1c35835d10c8f6ff
9 changes: 9 additions & 0 deletions crypto/bls12381/fp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,15 @@ func BenchmarkMultiplication(t *testing.B) {
}
}

func BenchmarkInverse(t *testing.B) {
a, _ := new(fe).rand(rand.Reader)
b, _ := new(fe).rand(rand.Reader)
t.ResetTimer()
for i := 0; i < t.N; i++ {
inverse(a, b)
}
}

func padBytes(in []byte, size int) []byte {
out := make([]byte, size)
if len(in) > size {
Expand Down
19 changes: 18 additions & 1 deletion oss-fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,20 @@ function compile_fuzzer {
path=$SRC/go-ethereum/$1
func=$2
fuzzer=$3
echo "Building $fuzzer"
corpusfile="${path}/testdata/${fuzzer}_seed_corpus.zip"
echo "Building $fuzzer (expecting corpus at $corpusfile)"
(cd $path && \
go-fuzz -func $func -o $WORK/$fuzzer.a . && \
echo "First stage built OK" && \
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE $WORK/$fuzzer.a -o $OUT/$fuzzer && \
echo "Second stage built ok" )

## Check if there exists a seed corpus file
if [ -f $corpusfile ]
then
cp $corpusfile $OUT/
echo "Found seed corpus: $corpusfile"
fi
}

compile_fuzzer common/bitutil Fuzz fuzzBitutilCompress
Expand All @@ -51,6 +58,16 @@ compile_fuzzer tests/fuzzers/rlp Fuzz fuzzRlp
compile_fuzzer tests/fuzzers/trie Fuzz fuzzTrie
compile_fuzzer tests/fuzzers/stacktrie Fuzz fuzzStackTrie

compile_fuzzer tests/fuzzers/bls12381 FuzzG1Add fuzz_g1_add
compile_fuzzer tests/fuzzers/bls12381 FuzzG1Mul fuzz_g1_mul
compile_fuzzer tests/fuzzers/bls12381 FuzzG1MultiExp fuzz_g1_multiexp
compile_fuzzer tests/fuzzers/bls12381 FuzzG2Add fuzz_g2_add
compile_fuzzer tests/fuzzers/bls12381 FuzzG2Mul fuzz_g2_mul
compile_fuzzer tests/fuzzers/bls12381 FuzzG2MultiExp fuzz_g2_multiexp
compile_fuzzer tests/fuzzers/bls12381 FuzzPairing fuzz_pairing
compile_fuzzer tests/fuzzers/bls12381 FuzzMapG1 fuzz_map_g1
compile_fuzzer tests/fuzzers/bls12381 FuzzMapG2 fuzz_map_g2

# This doesn't work very well @TODO
#compile_fuzzertests/fuzzers/abi Fuzz fuzzAbi

101 changes: 101 additions & 0 deletions tests/fuzzers/bls12381/bls_fuzzer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// Copyright 2020 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// The go-ethereum library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.

package bls

import (
"bytes"
"fmt"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/vm"
)

const (
blsG1Add = byte(10)
blsG1Mul = byte(11)
blsG1MultiExp = byte(12)
blsG2Add = byte(13)
blsG2Mul = byte(14)
blsG2MultiExp = byte(15)
blsPairing = byte(16)
blsMapG1 = byte(17)
blsMapG2 = byte(18)
)

func FuzzG1Add(data []byte) int { return fuzz(blsG1Add, data) }
func FuzzG1Mul(data []byte) int { return fuzz(blsG1Mul, data) }
func FuzzG1MultiExp(data []byte) int { return fuzz(blsG1MultiExp, data) }
func FuzzG2Add(data []byte) int { return fuzz(blsG2Add, data) }
func FuzzG2Mul(data []byte) int { return fuzz(blsG2Mul, data) }
func FuzzG2MultiExp(data []byte) int { return fuzz(blsG2MultiExp, data) }
func FuzzPairing(data []byte) int { return fuzz(blsPairing, data) }
func FuzzMapG1(data []byte) int { return fuzz(blsMapG1, data) }
func FuzzMapG2(data []byte) int { return fuzz(blsMapG2, data) }

func checkInput(id byte, inputLen int) bool {
switch id {
case blsG1Add:
return inputLen == 256
case blsG1Mul:
return inputLen == 160
case blsG1MultiExp:
return inputLen%160 == 0
case blsG2Add:
return inputLen == 512
case blsG2Mul:
return inputLen == 288
case blsG2MultiExp:
return inputLen%288 == 0
case blsPairing:
return inputLen%384 == 0
case blsMapG1:
return inputLen == 64
case blsMapG2:
return inputLen == 128
}
panic("programmer error")
}

// The fuzzer functions must return
// 1 if the fuzzer should increase priority of the
// given input during subsequent fuzzing (for example, the input is lexically
// correct and was parsed successfully);
// -1 if the input must not be added to corpus even if gives new coverage; and
// 0 otherwise
// other values are reserved for future use.
func fuzz(id byte, data []byte) int {
// Even on bad input, it should not crash, so we still test the gas calc
precompile := vm.PrecompiledContractsYoloV2[common.BytesToAddress([]byte{id})]
gas := precompile.RequiredGas(data)
if !checkInput(id, len(data)) {
return 0
}
// If the gas cost is too large (25M), bail out
if gas > 25*1000*1000 {
return 0
}
cpy := make([]byte, len(data))
copy(cpy, data)
_, err := precompile.Run(cpy)
if !bytes.Equal(cpy, data) {
panic(fmt.Sprintf("input data modified, precompile %d: %x %x", id, data, cpy))
}
if err != nil {
return 0
}
return 1
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.