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

baseFeeScalar zero value does not translate to L1InfoTransaction on L2 #258

Closed
ezdac opened this issue Oct 14, 2024 · 3 comments
Closed
Assignees

Comments

@ezdac
Copy link

ezdac commented Oct 14, 2024

So I added the l1Fee to the gas calculation in the test again. And I set the blobbasefeeScalar and
basefeeScalar parameters to zero in the deploy config. (see #254 (comment) for context)

However the basefeeScalar zero value does not end up in the L1InfoTransaction that op-geth receives, and the receipts still have a non-zero value set for the L1BasefeeScalar.

I checked the SystemConfig contract, here both values are set to zero. However, e.g. one L1InfoTransaction on L2 I checked showed the following data, and the slice of data where the basefeeScalar value should be encoded is set to 1000000:

https://go.dev/play/p/8PN2lhQ-QGE

This is the same value that I could observe in the transaction receipts.

For now I don't know what's wrong here, but this is likely something that happens in the payload building in the L2 node.
Probably the SystemConfig update events are not read properly while building the payload attributes or the data is not encoded properly for the Ecotone encoding scheme.

Originally posted by @ezdac in #254 (comment)

@karlb
Copy link

karlb commented Oct 15, 2024

I can reproduce the issue in my local devnet. Strangely enough, I got the correct results in a very similar setup in https://github.com/celo-org/celo-blockchain-planning/issues/626#issuecomment-2393409274. I'll try to find out what's going on.

@karlb karlb self-assigned this Oct 15, 2024
@karlb
Copy link

karlb commented Oct 15, 2024

The deprecated gasPriceOracleScalar value gets into the BaseFeeScalar field in the L1Info. That seems wrong, but at least it explains why I got zero values out before, since I had the gasPriceOracleScalar set to zero too.

@karlb
Copy link

karlb commented Oct 15, 2024

This is a configuration issue. gasPriceOracleScalar must be zero if we want to use BaseFeeScalar and BlobBaseFeeScalar:

if d.GasPriceOracleScalar != 0 {
return common.BigToHash(big.NewInt(int64(d.GasPriceOracleScalar)))
}

Once gasPriceOracleScalar is zero, both base fee scalars get communicated correctly.

@karlb karlb closed this as completed Oct 15, 2024
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