plugeth/les
Roberto Bayardo 67ac5f0ae7
core, core/types: plain Message struct (#25977)
Here, the core.Message interface turns into a plain struct and
types.Message gets removed.

This is a breaking change to packages core and core/types. While we do
not promise API stability for package core, we do for core/types. An
exception can be made for types.Message, since it doesn't have any
purpose apart from invoking the state transition in package core.
types.Message was also marked deprecated by the same commit it
got added in, 4dca5d4db7 (November 2016).

The core.Message interface was added in December 2014, in commit
db494170dc, for the purpose of 'testing' state transitions. It's the
same change that made transaction struct fields private. Before that,
the state transition used *types.Transaction directly.

Over time, multiple implementations of the interface accrued across
different packages, since constructing a Message is required whenever
one wants to invoke the state transition. These implementations all
looked very similar, a struct with private fields exposing the fields
as accessor methods.

By changing Message into a struct with public fields we can remove all
these useless interface implementations. It will also hopefully
simplify future changes to the type with less updates to apply across
all of go-ethereum when a field is added to Message.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2023-03-09 14:19:12 +01:00
..
catalyst
checkpointoracle
downloader common/prque: generic priority queue (#26290) 2023-02-09 13:03:54 +02:00
fetcher all: use unified emptyRootHash and emptyCodeHash (#26718) 2023-02-21 06:12:27 -05:00
flowcontrol common/prque: generic priority queue (#26290) 2023-02-09 13:03:54 +02:00
utils all: remove deprecated uses of math.rand (#26710) 2023-02-16 14:36:58 -05:00
vflux all: remove deprecated uses of math.rand (#26710) 2023-02-16 14:36:58 -05:00
api_backend.go core, core/types: plain Message struct (#25977) 2023-03-09 14:19:12 +01:00
api_test.go all: remove deprecated uses of math.rand (#26710) 2023-02-16 14:36:58 -05:00
api.go
benchmark.go all: remove deprecated uses of math.rand (#26710) 2023-02-16 14:36:58 -05:00
bloombits.go
client_handler.go
client.go
commons.go all: remove support for Ropsten (#26644) 2023-02-09 10:03:00 +02:00
costtracker.go
distributor_test.go
distributor.go
enr_entry.go
fetcher_test.go
fetcher.go
handler_test.go all: change chain head markers from block to header (#26777) 2023-03-02 08:29:15 +02:00
metrics.go
odr_requests.go
odr_test.go core, core/types: plain Message struct (#25977) 2023-03-09 14:19:12 +01:00
odr.go
peer_test.go
peer.go
protocol.go
pruner_test.go
pruner.go
request_test.go
retrieve.go
server_handler.go
server_requests.go all: use unified emptyRootHash and emptyCodeHash (#26718) 2023-02-21 06:12:27 -05:00
server.go
servingqueue.go common/prque: generic priority queue (#26290) 2023-02-09 13:03:54 +02:00
state_accessor.go core, core/types: plain Message struct (#25977) 2023-03-09 14:19:12 +01:00
sync_test.go
sync.go
test_helper.go
txrelay.go
ulc_test.go
ulc.go