-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(taiko-client): proposer profitability check #18548
feat(taiko-client): proposer profitability check #18548
Conversation
…/taiko-mono into proposer_profitability_check
…/taiko-mono into proposer_profitability_check
return totalGasConsumed, nil | ||
} | ||
|
||
func get75PercentOf(num *big.Int) *big.Int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 75 percent of base fee sharing is the config in contract, let's use the chain config instead of a constant value.
return nil, fmt.Errorf("getTransactionCost: failed to get gas price: %w", err) | ||
} | ||
|
||
estimatedGasUsage, err := p.rpc.L1.EstimateGas(p.ctx, ethereum.CallMsg{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidtaikocha I remembered that EstimateGas
for blob tx is not very accurate. Did I misremember?
Let me fix lint later. |
@@ -458,12 +453,23 @@ func (p *Proposer) ProposeTxListOntake( | |||
return errors.New("insufficient prover balance") | |||
} | |||
|
|||
txCandidate, err := p.txBuilder.BuildOntake(ctx, txListsBytesArray) | |||
txCandidate, cost, err := p.buildCheaperOnTakeTransaction(ctx, txListsBytesArray) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw it was always get cheaper txCandidate from buildCheaperOnTakeTransaction
.
How about making this feature optional?
After an internal discussion, we decided to only impl the calldata / blob switch part at first: #18690 , anyway thanks for the contribution :) |
OK, so will it be needed in the future, or don't you want this kind of profitability check? |
Our official proposer is mainly used as a fallback proposer role, so even when sometimes its unprofitable when proposing, our proposer will still keep proposing to make the chain "alive", so atm i think we won't impl this in this codebase, but i guess some proposers should have impled this in their private repo. |
No description provided.