plugeth/light
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
..
lightchain_test.go all: use unified emptyRootHash and emptyCodeHash (#26718) 2023-02-21 06:12:27 -05:00
lightchain.go core, les, light: implement timestamp based sethead and genesis rewinds 2023-01-03 12:57:07 +02:00
nodeset.go all: integrate the freezer with fast sync 2019-05-16 10:39:32 +03:00
odr_test.go core, core/types: plain Message struct (#25977) 2023-03-09 14:19:12 +01:00
odr_util.go core/types: add EffectiveGasPrice in Receipt (#26713) 2023-03-06 17:19:41 +01:00
odr.go all: refactor txpool into it's own package in prep for 4844 2022-10-24 16:35:53 +03:00
postprocess.go core/state, trie: remove unused error-return from trie Commit operation (#26641) 2023-02-09 08:56:59 -05:00
trie_test.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
trie.go core/state, trie: remove unused error-return from trie Commit operation (#26641) 2023-02-09 08:56:59 -05:00
txpool_test.go light: fix receiver name from Python style to Go (#26631) 2023-02-08 11:37:33 +02:00
txpool.go all: make timestamp-based fork checks based on uint64 (#26474) 2023-01-25 12:12:28 +01:00