Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction Details hardcoded to bellatrix #64

Open
tdahar opened this issue Jul 21, 2023 · 1 comment
Open

Transaction Details hardcoded to bellatrix #64

tdahar opened this issue Jul 21, 2023 · 1 comment

Comments

@tdahar
Copy link
Contributor

tdahar commented Jul 21, 2023

Description

Right now we request the transaction details using the bellatrix.Transaction. However, this structure might change in the future, so the details should be requested using a standard structure as a Hash.
#63 (review)

Proposal

In order to make the transaction request compatible with the rest of the tool, we intend to request the details inside the block, at the same time it is converted to an AgnosticBlock taking into account the current fork. Then, inside the block we would store an array of AgnosticTransaction.

// This Wrapper is meant to include all common objects across Ethereum Hard Fork Specs
type AgnosticExecutionPayload struct {
	FeeRecipient  bellatrix.ExecutionAddress
	GasLimit      uint64
	GasUsed       uint64
	Timestamp     uint64
	BaseFeePerGas [32]byte
	BlockHash     phase0.Hash32
	Transactions  []local_spec.AgnosticTransaction
	BlockNumber   uint64
	Withdrawals   []*capella.Withdrawal
}
@cortze
Copy link
Contributor

cortze commented Jul 21, 2023

I agree with this update. I'll also like to leave the APIClient interface as clean as possible. Right now, we have a lot of data parsing from transactions in an APIClient method, when the actual call to the EL node is only to fetch the transaction.Receipt from a given tx.Hash .

From my understanding, this data parsing should be part of the AgnosticTransaction, and should be identified/parsed when parsing the Block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants