Skip to content

uncleEnv

Source (upstream pre-purge) Current
File miner/worker.go uncles_pow.go
Symbol environment uncleEnv
Ref dde2da0ef~1 etc/v1.17.3-full-node

Bridge struct with the uncle bookkeeping (header, uncles, ancestors, family) that the pre-purge environment carried inline; trimmed to the uncle fields, since block-building is delegated to the modern Miner.

3-way merge — purge → getc ← upstream

pre-purgecommon≈ adapted (origin inferred by similarity)fork-only
// uncleEnv holds the uncle bookkeeping for a block being sealed: the header of
// that block, the accepted uncle set, and the ancestor and family sets used to
// validate candidates.
type uncleEnv struct {
header *types.Header
uncles map[common.Hash]*types.Header
ancestors mapset.Set[common.Hash]
family mapset.Set[common.Hash]
}
core-geth validation — +6 -16 | | | |---|---| | File | [`worker.go`](https://github.com/etclabscore/core-geth/blob/v1.12.20/miner/worker.go) | | Symbol | `environment` | | Ref | `v1.12.20` |
--- a/core-geth/miner/worker.go
+++ b/etc/miner/uncles_pow.go
@@ -1,19 +1,9 @@
-// environment is the worker's current environment and holds all
-// information of the sealing block generation.
-type environment struct {
-   signer types.Signer
-
-   state     *state.StateDB          // apply state changes here
-   ancestors mapset.Set[common.Hash] // ancestor set (used for checking uncle parent validity)
-   family    mapset.Set[common.Hash] // family set (used for checking uncle invalidity)
-   tcount    int                     // tx count in cycle
-   gasPool   *core.GasPool           // available gas used to pack transactions
-   coinbase  common.Address
-
+// uncleEnv holds the uncle bookkeeping for a block being sealed: the header of
+// that block, the accepted uncle set, and the ancestor and family sets used to
+// validate candidates.
+type uncleEnv struct {
    header   *types.Header
-   txs      []*types.Transaction
-   receipts []*types.Receipt
    uncles   map[common.Hash]*types.Header
-   sidecars []*types.BlobTxSidecar
-   blobs    int
+   ancestors mapset.Set[common.Hash]
+   family    mapset.Set[common.Hash]
 }

← Miner