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

fix(zetaclient): add zetaclient evm outbound tx index by nonce to supplement outtx tracker #2735

Merged
merged 21 commits into from
Sep 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
064ec6a
zetaclient: cache outbound tx while scanning blocks
brewmaster012 Aug 16, 2024
e6091c4
PoC: no outbound tracker to validate the local indexing
brewmaster012 Aug 16, 2024
96353c7
Merge branch 'develop' into zetaclient-evm-index-by-nonce
ws4charlie Aug 19, 2024
1a88984
Update zetaclient/chains/evm/observer/inbound.go
brewmaster012 Aug 21, 2024
2469d77
Merge branch 'develop' into zetaclient-evm-index-by-nonce
brewmaster012 Aug 21, 2024
d6cba72
fixed rename
brewmaster012 Aug 23, 2024
9e08821
fixed rename
brewmaster012 Aug 23, 2024
f8264e1
revert the manual test in localnet e2e
brewmaster012 Aug 23, 2024
4af0d61
fix unit test
brewmaster012 Aug 23, 2024
8c8e675
Merge branch 'develop' into zetaclient-evm-index-by-nonce
brewmaster012 Aug 23, 2024
7c0c232
fix some logs/comments due to rename
brewmaster012 Aug 23, 2024
c140c4e
Update zetaclient/chains/evm/observer/inbound.go
brewmaster012 Aug 23, 2024
e787e70
check cache before calling RPC
brewmaster012 Aug 23, 2024
8664efc
Merge branch 'develop' of https://github.com/zeta-chain/node into zet…
ws4charlie Aug 30, 2024
1bed195
Merge branch 'develop' into zetaclient-evm-index-by-nonce
brewmaster012 Sep 5, 2024
0c73da6
Merge branch 'develop' into zetaclient-evm-index-by-nonce
brewmaster012 Sep 7, 2024
252311e
Merge branch 'develop' into zetaclient-evm-index-by-nonce
ws4charlie Sep 9, 2024
c0d19c9
use a separate function FilterTSSOutbound to scan TSS outbounds and s…
ws4charlie Sep 10, 2024
19699f3
replace manual evm rpc mock with mockery generated mock
ws4charlie Sep 11, 2024
243452b
Merge branch 'develop' of https://github.com/zeta-chain/node into zet…
ws4charlie Sep 11, 2024
cf8f943
Merge branch 'develop' into zetaclient-evm-index-by-nonce
ws4charlie Sep 11, 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
revert the manual test in localnet e2e
brewmaster012 committed Aug 23, 2024
commit f8264e14a937ece9b6671d20759e179de1c0c5df
1 change: 0 additions & 1 deletion zetaclient/chains/evm/observer/inbound.go
Original file line number Diff line number Diff line change
@@ -800,7 +800,6 @@ func (ob *Observer) ObserveTSSReceiveInBlockAndOutbound(ctx context.Context, blo
ob.SetTxNReceipt(nonce, receipt, txx)
}
}

}
return nil
}
1 change: 0 additions & 1 deletion zetaclient/chains/evm/signer/outbound_tracker_reporter.go
Original file line number Diff line number Diff line change
@@ -69,7 +69,6 @@ func (signer *Signer) reportToOutboundTracker(
continue
}

return nil
// report outbound hash to tracker
zetaHash, err := zetacoreClient.AddOutboundTracker(ctx, chainID, nonce, outboundHash, nil, "", -1)
if err != nil {

Unchanged files with check annotations Beta

// feed archived block and receipt
evmJSONRPC.WithBlock(block)
evmClient.WithReceipt(receipt)
err := ob.ObserveTSSReceiveInBlockAndOutTx(ctx, blockNumber)

Check failure on line 484 in zetaclient/chains/evm/observer/inbound_test.go

GitHub Actions / build-and-test

ob.ObserveTSSReceiveInBlockAndOutTx undefined (type *"github.com/zeta-chain/zetacore/zetaclient/chains/evm/observer".Observer has no field or method ObserveTSSReceiveInBlockAndOutTx)
require.NoError(t, err)
})
t.Run("should not observe on error getting block", func(t *testing.T) {
ob, _ := MockEVMObserver(t, chain, evmClient, evmJSONRPC, zetacoreClient, tss, lastBlock, chainParam)
err := ob.ObserveTSSReceiveInBlockAndOutTx(ctx, blockNumber)

Check failure on line 489 in zetaclient/chains/evm/observer/inbound_test.go

GitHub Actions / build-and-test

ob.ObserveTSSReceiveInBlockAndOutTx undefined (type *"github.com/zeta-chain/zetacore/zetaclient/chains/evm/observer".Observer has no field or method ObserveTSSReceiveInBlockAndOutTx)
// error getting block is expected because the mock JSONRPC contains no block
require.ErrorContains(t, err, "error getting block")
})
t.Run("should not observe on error getting receipt", func(t *testing.T) {
ob, _ := MockEVMObserver(t, chain, evmClient, evmJSONRPC, zetacoreClient, tss, lastBlock, chainParam)
evmJSONRPC.WithBlock(block)
err := ob.ObserveTSSReceiveInBlockAndOutTx(ctx, blockNumber)

Check failure on line 496 in zetaclient/chains/evm/observer/inbound_test.go

GitHub Actions / build-and-test

ob.ObserveTSSReceiveInBlockAndOutTx undefined (type *"github.com/zeta-chain/zetacore/zetaclient/chains/evm/observer".Observer has no field or method ObserveTSSReceiveInBlockAndOutTx)
// error getting block is expected because the mock evmClient contains no receipt
require.ErrorContains(t, err, "error getting receipt")
})