-
Notifications
You must be signed in to change notification settings - Fork 182
[SC] Sync of KIP71-related values #1427
[SC] Sync of KIP71-related values #1427
Conversation
back propragation
by `ErrGasPriceBelowBaseFee`
API tha tmanually requests to sync is added too
|
||
logger.Error("Bridge tx is removed which has lower gasPrice than UpperBoundBaseFee") | ||
// Remove the tx and delegate re-execution of the tx by Value Transfer Recovery feature | ||
if err := sbh.subbridge.GetBridgeTxPool().RemoveTx(tx); err != nil { |
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.
Is it possible to perform vtrecovery logic with just removing? I'm just curious.
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 value transfer recovery (VTR) finds unhandled events from the counterpart chain. As the event was not handled by the parent chain, the VTR finds unhandled events and regenerates the corresponding txs.
- The received invalid txs must be removed because they live in bridgeTxPool forever and consumes unnecessary resending overhead. (i.e.,
txPending
is counted)
By the way, any reason of removing gen_config.go? |
The |
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.
LGTM, fix the linter problem
@hqjang-pepper, As the target branch to be merged is |
@kjeom PTAL |
Co-authored-by: Jamie <32922423+jimni1222@users.noreply.github.com>
@2dvorak, Please take a look again. |
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.
LGTM Thank you for changings!
LGTM.
|
@kjeom Added. |
Proposed changes
This change syncs parent chain's important values (gasPrice and KIP71-related values) when a bridge tx is failed by the
ErrGasPriceBelowBaseFee
error. Also, that tx is removed from bridgeTxPool and delegates its reconstruction of valid tx with syncedgasPrice
to Value Transfer Recovery feature. TheUpperBoundBaseFee
becomesgasPrice
in construction of value transfer transaction.gen_config.go
and its generate code were removed.## Types of changesNeed for New Test Environment
cc @2dvorak, @henry-will
Of the lack of a simulation environment such as the simulated backend, testing only one chain with one contract, etc, I faced the need for a real testing environment (two or more chains, two or more contracts, and a real chain pipeline). Consideration of reliable testing seems required.
Please put an x in the boxes related to your change.
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
$ make test
)Related issues
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...