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

[BCI-3573] - Remove dependence on FinalityDepth in EVM TXM code #13794

Merged
merged 55 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
99cb0b6
removing finality within common/txmgr
Farber98 Jul 3, 2024
72f430e
remove finality from common/txmgr comment
Farber98 Jul 3, 2024
2de27e3
latestFinalizedBlockNum support within evm/txmgr txstore
Farber98 Jul 3, 2024
fe42945
refactor tests after evm/txmgr txstore changes
Farber98 Jul 3, 2024
1d14c4b
mocks for both common and core/evm
Farber98 Jul 3, 2024
6222291
remove comments that are still referencing to finalityDepth within ev…
Farber98 Jul 4, 2024
8e01631
add changeset
Farber98 Jul 9, 2024
b8fead5
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm the…
Farber98 Jul 10, 2024
55b069f
error if no LatestFinalizedHead was found
Farber98 Jul 11, 2024
43b3428
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
Farber98 Jul 11, 2024
9a97763
fix mocks version
Farber98 Jul 11, 2024
8ed35fe
fix mocks version
Farber98 Jul 11, 2024
09c3704
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
Farber98 Jul 11, 2024
1a694f7
mock versioning
Farber98 Jul 11, 2024
7f1b8b5
mock version
Farber98 Jul 11, 2024
e9c8daa
mock version
Farber98 Jul 11, 2024
fdb0d33
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
Farber98 Jul 11, 2024
5f13155
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
Farber98 Jul 12, 2024
b151dbe
mock version
Farber98 Jul 12, 2024
552a89f
mock version
Farber98 Jul 12, 2024
551a8c0
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
Farber98 Jul 12, 2024
7163d10
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
Farber98 Jul 30, 2024
8e91a75
inject head tracker trimmed API
Farber98 Jul 31, 2024
cb57245
fix tests
Farber98 Jul 31, 2024
1188b4b
mocks
Farber98 Jul 31, 2024
a4bb842
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
Farber98 Jul 31, 2024
a0673ce
remove unnecesary tests as finalized head is guaranteed
Farber98 Jul 31, 2024
b10c57d
ht in shell local
Farber98 Jul 31, 2024
a891e36
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
Farber98 Jul 31, 2024
62278e0
remove evm dep from confirmer and use generics instead
Farber98 Aug 1, 2024
2adcd80
make markOldTxesMissingReceiptAsErrored condition inclusive
Farber98 Aug 1, 2024
4fb2252
use already initialized head tracker within shell local
Farber98 Aug 1, 2024
f4ca5d9
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
Farber98 Aug 1, 2024
73aa556
fix mocking, fix unit test
huangzhen1997 Aug 2, 2024
9d99a29
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
huangzhen1997 Aug 2, 2024
242f41c
fix a potential bug
huangzhen1997 Aug 5, 2024
6a361f5
fix bug
huangzhen1997 Aug 5, 2024
f53f260
refactor
huangzhen1997 Aug 5, 2024
b7b7e56
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
huangzhen1997 Aug 5, 2024
6e71ff5
address comments
huangzhen1997 Aug 5, 2024
4663172
fix lint
huangzhen1997 Aug 5, 2024
805975d
rename
huangzhen1997 Aug 6, 2024
14bb96b
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
huangzhen1997 Aug 6, 2024
31d4569
have log back
huangzhen1997 Aug 6, 2024
cdeee6a
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
huangzhen1997 Aug 6, 2024
cebf699
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
huangzhen1997 Aug 6, 2024
0f98a46
update comments
huangzhen1997 Aug 6, 2024
dbbac95
remove nil check
huangzhen1997 Aug 6, 2024
14a5668
minor
huangzhen1997 Aug 6, 2024
2e1e92a
resolve merge conflicts
huangzhen1997 Aug 6, 2024
ebe7d59
fix test
huangzhen1997 Aug 6, 2024
e59e259
grammar
huangzhen1997 Aug 6, 2024
d70f6af
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
huangzhen1997 Aug 6, 2024
b0ed1e0
rephrase
huangzhen1997 Aug 6, 2024
5a079e9
Merge branch 'develop' into BCI-3573-remove-finalitydepth-evm-txm
huangzhen1997 Aug 9, 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
Prev Previous commit
Next Next commit
update comments
  • Loading branch information
huangzhen1997 committed Aug 6, 2024
commit 0f98a461e868341068a8cdf9a8db6840e71d57e8
2 changes: 1 addition & 1 deletion common/txmgr/confirmer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ func (ec *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) han
}
}

// EnsureConfirmedTransactionsInLongestChain finds all confirmed txes up to the LatestFinalizedHead
// EnsureConfirmedTransactionsInLongestChain finds all confirmed txes up to the earliest head
// of the given chain and ensures that every one has a receipt with a block hash that is
// in the given chain.
//
Expand Down
8 changes: 4 additions & 4 deletions core/chains/evm/txmgr/evm_tx_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ func (o *evmTxStore) SaveFetchedReceipts(ctx context.Context, r []*evmtypes.Rece
// decision to give up). This is done in the EthResender.
//
// We will continue to try to fetch a receipt for these attempts until all
// attempts are below the LatestFinalizedBlockNum from current head.
// attempts are equal to or below the LatestFinalizedBlockNum from current head.
func (o *evmTxStore) MarkAllConfirmedMissingReceipt(ctx context.Context, chainID *big.Int) (err error) {
var cancel context.CancelFunc
ctx, cancel = o.stopCh.Ctx(ctx)
Expand Down Expand Up @@ -1444,7 +1444,7 @@ ORDER BY nonce ASC

// markOldTxesMissingReceiptAsErrored
//
// Once eth_tx has all of its attempts broadcast before latestFinalizedBlockNum
// Once eth_tx has all of its attempts broadcast equal to or before latestFinalizedBlockNum
// without receiving any receipts, we mark it as fatally errored (never sent).
//
// The job run will also be marked as errored in this case since we never got a
Expand All @@ -1453,8 +1453,8 @@ func (o *evmTxStore) MarkOldTxesMissingReceiptAsErrored(ctx context.Context, blo
var cancel context.CancelFunc
ctx, cancel = o.stopCh.Ctx(ctx)
defer cancel()
// Any 'confirmed_missing_receipt' eth_tx with all attempts older than latestFinalizedBlockNum will be marked as errored
// We will not try to query for receipts for this transaction any more
// Any 'confirmed_missing_receipt' eth_tx with all attempts equal to or older than latestFinalizedBlockNum will be marked as errored
// We will not try to query for receipts for this transaction anymore
if latestFinalizedBlockNum <= 0 {
return nil
}
Expand Down
Loading