Skip to content

Commit 9cd4ede

Browse files
committed
Merge branch 'master' into yzang/expose-readerlimit
* master: (57 commits) core/vm: fix EIP-7823 modexp input length check (ethereum#32363) rlp: remove workaround for Value.Bytes (ethereum#32433) consensus/misc/eip4844: use blob parameters of current header (ethereum#32424) crypto/bn256: refactor to use bitutil.TestBytes (ethereum#32435) core/vm: refactor to use bitutil.TestBytes (ethereum#32434) cmd/evm: use PathScheme in blockrunner (ethereum#32444) trie, core/state: add the transition tree (verkle transition part 2) (ethereum#32366) build: remove unused functions (ethereum#32393) crypto/secp256k1: use ReadBits from common/math (ethereum#32430) build: upgrade -dlgo version to Go 1.25.0 (ethereum#32412) .github: upgrade workflows to Go 1.25 (ethereum#32425) p2p: refactor to use time.Now().UnixMilli() in golang std lib (ethereum#32402) eth/syncer: fix typo (ethereum#32427) eth/tracers: Adds codeHash to prestateTracer's response (ethereum#32391) rlp: optimize intsize (ethereum#32421) node: remove unused err var (ethereum#32398) eth: abort `requiredBlocks` check if peer handler terminated (ethereum#32413) cmd: fix inconsistent function name in comment (ethereum#32411) trie: refactor to use slices.Concat (ethereum#32401) consensus: fix ambiguous invalid gas limit error (ethereum#32405) ...
2 parents a6d9aa5 + a9a19c4 commit 9cd4ede

File tree

133 files changed

+2353
-1248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+2353
-1248
lines changed

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Set up Go
2626
uses: actions/setup-go@v5
2727
with:
28-
go-version: 1.24
28+
go-version: 1.25
2929
cache: false
3030

3131
- name: Run linters
@@ -41,8 +41,8 @@ jobs:
4141
strategy:
4242
matrix:
4343
go:
44+
- '1.25'
4445
- '1.24'
45-
- '1.23'
4646
steps:
4747
- uses: actions/checkout@v4
4848
with:

accounts/abi/abigen/bind.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ import (
3333
"github.com/ethereum/go-ethereum/log"
3434
)
3535

36+
var (
37+
intRegex = regexp.MustCompile(`(u)?int([0-9]*)`)
38+
)
39+
3640
func isKeyWord(arg string) bool {
3741
switch arg {
3842
case "break":
@@ -299,7 +303,7 @@ func bindBasicType(kind abi.Type) string {
299303
case abi.AddressTy:
300304
return "common.Address"
301305
case abi.IntTy, abi.UintTy:
302-
parts := regexp.MustCompile(`(u)?int([0-9]*)`).FindStringSubmatch(kind.String())
306+
parts := intRegex.FindStringSubmatch(kind.String())
303307
switch parts[2] {
304308
case "8", "16", "32", "64":
305309
return fmt.Sprintf("%sint%s", parts[1], parts[2])

accounts/abi/reflect.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func ConvertType(in interface{}, proto interface{}) interface{} {
5353
// indirect recursively dereferences the value until it either gets the value
5454
// or finds a big.Int
5555
func indirect(v reflect.Value) reflect.Value {
56-
if v.Kind() == reflect.Ptr && v.Elem().Type() != reflect.TypeOf(big.Int{}) {
56+
if v.Kind() == reflect.Ptr && v.Elem().Type() != reflect.TypeFor[big.Int]() {
5757
return indirect(v.Elem())
5858
}
5959
return v
@@ -65,32 +65,32 @@ func reflectIntType(unsigned bool, size int) reflect.Type {
6565
if unsigned {
6666
switch size {
6767
case 8:
68-
return reflect.TypeOf(uint8(0))
68+
return reflect.TypeFor[uint8]()
6969
case 16:
70-
return reflect.TypeOf(uint16(0))
70+
return reflect.TypeFor[uint16]()
7171
case 32:
72-
return reflect.TypeOf(uint32(0))
72+
return reflect.TypeFor[uint32]()
7373
case 64:
74-
return reflect.TypeOf(uint64(0))
74+
return reflect.TypeFor[uint64]()
7575
}
7676
}
7777
switch size {
7878
case 8:
79-
return reflect.TypeOf(int8(0))
79+
return reflect.TypeFor[int8]()
8080
case 16:
81-
return reflect.TypeOf(int16(0))
81+
return reflect.TypeFor[int16]()
8282
case 32:
83-
return reflect.TypeOf(int32(0))
83+
return reflect.TypeFor[int32]()
8484
case 64:
85-
return reflect.TypeOf(int64(0))
85+
return reflect.TypeFor[int64]()
8686
}
87-
return reflect.TypeOf(&big.Int{})
87+
return reflect.TypeFor[*big.Int]()
8888
}
8989

9090
// mustArrayToByteSlice creates a new byte slice with the exact same size as value
9191
// and copies the bytes in value to the new slice.
9292
func mustArrayToByteSlice(value reflect.Value) reflect.Value {
93-
slice := reflect.MakeSlice(reflect.TypeOf([]byte{}), value.Len(), value.Len())
93+
slice := reflect.ValueOf(make([]byte, value.Len()))
9494
reflect.Copy(slice, value)
9595
return slice
9696
}
@@ -104,7 +104,7 @@ func set(dst, src reflect.Value) error {
104104
switch {
105105
case dstType.Kind() == reflect.Interface && dst.Elem().IsValid() && (dst.Elem().Type().Kind() == reflect.Ptr || dst.Elem().CanSet()):
106106
return set(dst.Elem(), src)
107-
case dstType.Kind() == reflect.Ptr && dstType.Elem() != reflect.TypeOf(big.Int{}):
107+
case dstType.Kind() == reflect.Ptr && dstType.Elem() != reflect.TypeFor[big.Int]():
108108
return set(dst.Elem(), src)
109109
case srcType.AssignableTo(dstType) && dst.CanSet():
110110
dst.Set(src)

accounts/abi/reflect_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,12 @@ func TestConvertType(t *testing.T) {
204204
var fields []reflect.StructField
205205
fields = append(fields, reflect.StructField{
206206
Name: "X",
207-
Type: reflect.TypeOf(new(big.Int)),
207+
Type: reflect.TypeFor[*big.Int](),
208208
Tag: "json:\"" + "x" + "\"",
209209
})
210210
fields = append(fields, reflect.StructField{
211211
Name: "Y",
212-
Type: reflect.TypeOf(new(big.Int)),
212+
Type: reflect.TypeFor[*big.Int](),
213213
Tag: "json:\"" + "y" + "\"",
214214
})
215215
val := reflect.New(reflect.StructOf(fields))

accounts/abi/type.go

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -238,29 +238,25 @@ func (t Type) GetType() reflect.Type {
238238
case UintTy:
239239
return reflectIntType(true, t.Size)
240240
case BoolTy:
241-
return reflect.TypeOf(false)
241+
return reflect.TypeFor[bool]()
242242
case StringTy:
243-
return reflect.TypeOf("")
243+
return reflect.TypeFor[string]()
244244
case SliceTy:
245245
return reflect.SliceOf(t.Elem.GetType())
246246
case ArrayTy:
247247
return reflect.ArrayOf(t.Size, t.Elem.GetType())
248248
case TupleTy:
249249
return t.TupleType
250250
case AddressTy:
251-
return reflect.TypeOf(common.Address{})
251+
return reflect.TypeFor[common.Address]()
252252
case FixedBytesTy:
253-
return reflect.ArrayOf(t.Size, reflect.TypeOf(byte(0)))
253+
return reflect.ArrayOf(t.Size, reflect.TypeFor[byte]())
254254
case BytesTy:
255-
return reflect.SliceOf(reflect.TypeOf(byte(0)))
256-
case HashTy:
257-
// hashtype currently not used
258-
return reflect.ArrayOf(32, reflect.TypeOf(byte(0)))
259-
case FixedPointTy:
260-
// fixedpoint type currently not used
261-
return reflect.ArrayOf(32, reflect.TypeOf(byte(0)))
255+
return reflect.TypeFor[[]byte]()
256+
case HashTy, FixedPointTy: // currently not used
257+
return reflect.TypeFor[[32]byte]()
262258
case FunctionTy:
263-
return reflect.ArrayOf(24, reflect.TypeOf(byte(0)))
259+
return reflect.TypeFor[[24]byte]()
264260
default:
265261
panic("Invalid type")
266262
}

accounts/keystore/keystore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ var (
5050
)
5151

5252
// KeyStoreType is the reflect type of a keystore backend.
53-
var KeyStoreType = reflect.TypeOf(&KeyStore{})
53+
var KeyStoreType = reflect.TypeFor[*KeyStore]()
5454

5555
// KeyStoreScheme is the protocol scheme prefixing account and wallet URLs.
5656
const KeyStoreScheme = "keystore"

beacon/merkle/merkle.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type Value [32]byte
3232
// Values represent a series of merkle tree leaves/nodes.
3333
type Values []Value
3434

35-
var valueT = reflect.TypeOf(Value{})
35+
var valueT = reflect.TypeFor[Value]()
3636

3737
// UnmarshalJSON parses a merkle value in hex syntax.
3838
func (m *Value) UnmarshalJSON(input []byte) error {

beacon/params/checkpoint_holesky.hex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0xd60e5310c5d52ced44cfb13be4e9f22a1e6a6dc56964c3cccd429182d26d72d0
1+
0x4bae4b97deda095724560012cab1f80a5221ce0a37a4b5236d8ab63f595f29d9

beacon/params/checkpoint_hoodi.hex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0x1bbf958008172591b6cbdb3d8d52e26998258e83d4bdb9eec10969d84519a6bd

beacon/params/checkpoint_mainnet.hex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0x02f0bb348b0d45f95a9b7e2bb5705768ad06548876cee03d880a2c9dabb1ff88
1+
0x2fe39a39b6f7cbd549e0f74d259de6db486005a65bd3bd92840dd6ce21d6f4c8

0 commit comments

Comments
 (0)