Skip to content

Instrumented celo client #48

@TPXP

Description

@TPXP

Rationale

Hi, I'm working on migrating our existing thegraph block source to firehose and am facing some issues with the celo chain.

It is forked from op-geth, and depends on an up to date version of geth, enabling us to use the go-ethereum tracing APIs.

After reading README.fh.md, I tried to merge firehose-fh3.0 changes inside the latest celo release branch (celo-v2.1.3) but, when trying to compile, it (rightfully) reports the celo-specific transaction type 123 as not being handled.

go run build/ci.go install ./cmd/geth
panic:
	 If you see this panic message it comes from a sanity check of Firehose instrumentation
	 around Ethereum transaction types.

	 Over time Ethereum added new transaction types but there is no easy way for Firehose to
	 report a compile time check that a new transaction's type must be handled. As such we
	 have a runtime check at initialization of the process that encode/decode each possible
	 transaction's receipt and check proper handling.

	 This panic means that a transaction that Firehose don't know about has most probably
	 been added and you must take **great care** to instrument it. One of the most important place
	 to look is in 'firehose.StartTransaction' where it should be properly handled. Think
	 carefully read the EIP and ensure that any new "semantic" the transactions type's is
	 bringing is handled and instrumented it might affect Block and other execution units also .

	 For example when London fork appeared semantic of 'GasPrice' changed and it required
	 a different computation for 'GasPrice' when 'DynamicFeeTx' transaction were added. If you determined
	 it was indeed a new transaction's type fix 'firehoseKnownTxTypes' variable above to include it
	 as a known Firehose type after proper instrumentation of course .

	 It's also possible the test itself is now flaky we do 'receipt := types.Receipt Type: <type> '
	 then 'buffer := receipt.EncodeRLP ... ' and then 'receipt.DecodeRLP buffer '. This should catch
	 new transaction types but could be now generate false positive.

	 Received error: unknown tx type value 123: firehose unknown tx type

Implementation

This is probably just about adding another handler for celo-specific 123 and 124 transaction types, which looks like something I shouldn't try to do myself according to the build error 😜

Some links you may find useful:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions