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

evm transaction context not correct when txn is type 3 (EIP-4844) #9722

Merged
merged 2 commits into from
Mar 15, 2024

Conversation

indanielo
Copy link
Contributor

evm transaction context not correct when txn is type 3 (EIP-4844)

evm transaction context not correct when txn is type 3 (EIP-4844)
@indanielo
Copy link
Contributor Author

indanielo commented Mar 15, 2024

I would suggest abstracting this code in core/evm.go, where the method that Erigon is already using for this purpose is located. Something like that:

// NewEVMTxContext creates a new transaction context for a single transaction.
func NewEVMTxContext(msg Message, txnHash *common.Hash) evmtypes.TxContext {
	if (txnHash == nil) {
		txnHash = &common.Hash{}
	}
	return evmtypes.TxContext{
		txnHash:    txnHash
		Origin:     msg.From(),
		GasPrice:   msg.GasPrice(),
		BlobHashes: msg.BlobHashes(),
	}
}

@yperbasis yperbasis added the dencun The Deneb/Cancun protocol upgrade label Mar 15, 2024
@yperbasis yperbasis enabled auto-merge (squash) March 15, 2024 10:57
@yperbasis yperbasis merged commit 9d44b16 into ledgerwatch:devel Mar 15, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dencun The Deneb/Cancun protocol upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants