legacyeth

package
v1.6.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package legacyeth restores the ability to read Ethereum transactions that were written before the v1.6.0 migration.

Those transactions carry the type URL /cosmos.evm.vm.v1.MsgEthereumTx, which is still current, but the message body uses the pre-refactor field layout:

old MsgEthereumTx                 new MsgEthereumTx
  1 Any    data (TxData)            5 bytes      from
  2 double size (deprecated)        6 EthereumTx raw
  3 string hash
  4 string deprecated_from
  5 bytes  from

The SDK decoder resolves the type and then rejects field 1 as unknown, so the transaction is silently dropped from every read path that decodes it: eth_getBlockByNumber returns an empty transactions array, eth_getTransactionByHash returns null, and the derived roots and bloom are computed as if the block were empty — while eth_getLogs, which reads the event index and needs no decoding, still returns the logs. The result is a block that reports gas used by zero transactions, which no indexer can reconcile.

This package rewrites such a message into the current layout before handing it back to the standard decoder. It is a read-path shim: consensus never decodes these bytes again, and the rewritten form is only ever produced in memory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decoder

func Decoder(inner sdk.TxDecoder) sdk.TxDecoder

Decoder wraps inner so that a transaction the current layout cannot parse is retried through the legacy rewrite. On any failure the ORIGINAL error is returned, so a genuinely malformed transaction still reports what is wrong with it rather than a confusing message from the shim.

func WrapTxConfig

func WrapTxConfig(cfg client.TxConfig) client.TxConfig

WrapTxConfig returns cfg with a decoder that understands pre-v1.6.0 Ethereum transactions.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL