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

fix: arbitrum block header #25

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion arb-gateway/src/ArbProofService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export class ArbProofService implements IProofService<ArbProvableBlock> {
const nodeIndex = await this.rollup.latestNodeCreated()
const [l2blockRaw, sendRoot] = await this.getL2BlockForNode(nodeIndex)

// https://github.com/OffchainLabs/go-ethereum/blob/b1622e6ac4bf3762aebde92a585de2889d90823f/core/types/block.go#L65
const blockarray = [
l2blockRaw.parentHash,
l2blockRaw.sha3Uncles,
Expand All @@ -112,7 +113,9 @@ export class ArbProofService implements IProofService<ArbProvableBlock> {
l2blockRaw.mixHash,
l2blockRaw.nonce,
toBeHex(l2blockRaw.baseFeePerGas)
]
].map((item) => {
return item == '0x00' ? "0x" : item
})

//Rlp encode the block to pass it as an argument
const rlpEncodedBlock = ethers.encodeRlp(blockarray)
Expand Down