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

feature(op-geth): add opbnb gasless solution #130

Merged
merged 35 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
04d0f76
feature(op-geth): add opbnb gasless solution
redhdx Jul 18, 2024
711fee4
fix(op-geth): fix ut for cycle import
redhdx Jul 18, 2024
5d1162c
Revert "fix(op-geth): fix ut for cycle import"
redhdx Jul 18, 2024
0b3189e
fix(op-geth): fix test for cycle import
redhdx Jul 18, 2024
ed4e69b
feature(op-geth): add some config
redhdx Jul 19, 2024
d38ca5f
fix(op-geth): fix nil issue
redhdx Jul 19, 2024
600e647
fix(op-geth): fix test issue
redhdx Jul 22, 2024
ba22582
feature(op-geth): refine code
redhdx Jul 24, 2024
ed8a579
feature(op-geth): refine code mainly simplify config
redhdx Jul 24, 2024
a4d0a85
feature(op-geth): change qa net chain config
redhdx Jul 24, 2024
8b8e3b4
feature(op-geth): refine code
redhdx Jul 24, 2024
ec06717
Merge branch 'develop' into feature/opbnb_for_gasless
redhdx Jul 24, 2024
12809f0
fix(op-geth): fix gasless l1 cost
redhdx Jul 24, 2024
cbb1c03
fix(op-geth): fix gasless l1 cost
redhdx Jul 24, 2024
6f7deff
fix(op-geth): fix gasless l1 cost receipt
redhdx Jul 24, 2024
e8d6512
feature(op-geth): refine gasless code
redhdx Jul 26, 2024
5f314a8
feature(op-geth): refine totalfees
redhdx Jul 26, 2024
ed7ab15
feature(op-geth): generate new gen_config.go
redhdx Jul 26, 2024
f0b8112
fix(op-geth): fix nil issue and add metrics
redhdx Jul 30, 2024
17986c9
fix(op-geth): fix gaslimit issue
redhdx Jul 30, 2024
3642aee
fix(op-geth): fix merge bundle logic
redhdx Jul 30, 2024
f343264
feature(op-geth): optimize bundle pool reset
redhdx Jul 31, 2024
0d3f46b
fix(op-geth): fix reset bundle
redhdx Jul 31, 2024
a249bc2
fix(op-geth): fix some issue and change some const value
redhdx Jul 31, 2024
a292ab1
fix(op-geth): fix ErrBundleGasPriceLow logic
redhdx Jul 31, 2024
bfdf54a
feature(op-geth): refine logic and fix issue
redhdx Aug 1, 2024
18b50d9
feature(op-geth): refine log print content
redhdx Aug 1, 2024
0b6ea28
fix(op-geth): fix time stop logic
redhdx Aug 1, 2024
24e8c85
fix(op-geth): fix issue
redhdx Aug 1, 2024
fdae74b
feature(op-geth): change BundleGasLimit
redhdx Aug 1, 2024
c5d81ed
feature(op-geth): change BundleGasLimit
redhdx Aug 1, 2024
eb5c5ed
feature(op-geth): change simulateGaslessBundle return logic
redhdx Aug 2, 2024
81a33bb
feature(op-geth): change simulateGaslessBundle return value
redhdx Aug 2, 2024
167d08f
fix(op-geth): fix sort bundles
redhdx Aug 5, 2024
6ccb086
feature(op-geth): add Wright hard fork time
redhdx Aug 5, 2024
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
3 changes: 3 additions & 0 deletions consensus/misc/eip1559/eip1559.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ func VerifyEIP1559Header(config *params.ChainConfig, parent, header *types.Heade
// CalcBaseFee calculates the basefee of the header.
// The time belongs to the new block to check if Canyon is activted or not
func CalcBaseFee(config *params.ChainConfig, parent *types.Header, time uint64) *big.Int {
if config.IsWright(time) {
return new(big.Int).SetUint64(params.OpBNBBaseFeeForGasLess)
}
// If the current block is the first EIP-1559 block, return the InitialBaseFee.
if !config.IsLondon(parent.Number) {
return new(big.Int).SetUint64(params.InitialBaseFee)
Expand Down
5 changes: 5 additions & 0 deletions core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ func (st *StateTransition) buyGas() error {
mgval = mgval.Mul(mgval, st.msg.GasPrice)
var l1Cost *big.Int
if st.evm.Context.L1CostFunc != nil && !st.msg.SkipAccountChecks {
if st.msg.GasPrice.Cmp(big.NewInt(0)) == 0 {
l1Cost = big.NewInt(0)
} else {
l1Cost = st.evm.Context.L1CostFunc(st.msg.RollupCostData, st.evm.Context.Time)
}
l1Cost = st.evm.Context.L1CostFunc(st.msg.RollupCostData, st.evm.Context.Time)
if l1Cost != nil {
mgval = mgval.Add(mgval, l1Cost)
Expand Down
Loading
Loading