Closed cyberhorsey closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
bridge-ui-v2-a6 | ✅ Ready (Inspect) | Visit Preview | Feb 7, 2024 8:38pm |
Attention: Patch coverage is 19.69197%
with 730 lines
in your changes are missing coverage. Please review.
Project coverage is 25.73%. Comparing base (
f53766b
) to head (bf7d0f9
). Report is 110 commits behind head on main.:exclamation: Current head bf7d0f9 differs from pull request most recent head 0c55e79. Consider uploading reports for the commit 0c55e79 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@dantaik @Brechtpd is calling "bridge.isMessageSent" on the source chain a good enough "watchdog check" when we get a MessageReceived event on the destination chain?
Or should I actually look up in the database that we found an existing MessageSent
event from the source chain, as well?
@dantaik @Brechtpd is calling "bridge.isMessageSent" on the source chain a good enough "watchdog check" when we get a MessageReceived event on the destination chain?
Or should I actually look up in the database that we found an existing
MessageSent
event from the source chain, as well?
I think they are pretty much identical really looking at the code because done directly together, and the isMessageSent
code is very easy so extremely low chance there could be some bug related with just that code. So depending on isMessageSent
sounds good to me.
@dantaik @Brechtpd is calling "bridge.isMessageSent" on the source chain a good enough "watchdog check" when we get a MessageReceived event on the destination chain? Or should I actually look up in the database that we found an existing
MessageSent
event from the source chain, as well?I think they are pretty much identical really looking at the code because done directly together, and the
isMessageSent
code is very easy so extremely low chance there could be some bug related with just that code. So depending onisMessageSent
sounds good to me.
OK sounds good, thats what I'm doing already, so this should be sufficient. When we deploy an internal devnet we can see how it operates.
The updates focus on refining the ABI definitions across various vaults (ERC1155, ERC20, ERC721) and enhancing cross-chain synchronization and signal service functionalities. New features include message handling, proof retrieval, and suspended transactions management. The relayer's efficiency and functionality are improved through restructured event indexing, simplified ABI definitions, and the introduction of watchdog capabilities for monitoring and processing messages between Ethereum chains.
Files | Change Summary |
---|---|
.../erc1155vault/ERC1155Vault.go .../erc20vault/ERC20Vault.go .../erc721vault/ERC721Vault.go |
Updated ABI definitions and adjusted event/function signatures. |
.../icrosschainsync/ICrossChainSync.go .../signalservice/SignalService.go |
Renamed fields, streamlined ABI definitions, and updated events. |
.../bridge.go .../processor/... .../watchdog/watchdog.go |
Enhanced message handling, proof retrieval, and watchdog functionality. |
.../cmd/flags/... .../indexer/config.go .../event.go |
Introduced new flags, EventName configurations, and variables. |
.../migrations/... .../pkg/repo/suspended_transaction.go .../suspended_transaction.go |
Managed suspended transactions with new SQL script and repository. |
.../pkg/encoding/... .../pkg/proof/... |
Improved encoding and proof handling with updated structs and tests. |
.../pkg/http/... .../pkg/mock/... .../pkg/utils/gas.go |
Added HTTP routes, mock methods, and gas-related operations. |
.../prometheus.go |
Introduced a new metric for tracking suspended transactions. |
"In the digital realm, where code does weave,
A rabbit hopped, changes to conceive.
🐰 With every line, a new world takes shape,
Bonds of chains, in ether, escape.
Watchdogs guard, while vaults align,
Across the blocks, our paths entwine."
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Lots of files for bridge-ui-v2 that should not be committed. I guess because dave renamed the package to
bridge-ui
.
Gotcha, bad merge from main then. I will remove the whole folder!
@cyberhorsey shall we merge this PR?
@cyberhorsey shall we merge this PR?
No, let me deploy it and work out any kinks today.
FYI This is just waiting for some changes I've asked Ruby to do with regards to ERC20/721/1155s (now that we have a generic invocation method, the previous method of checking which type of token we have no longer works).
1) Update the relayer
indexer
subcommand to be able to index eitherMessageSent
orMessageReceived
, add the event name to the queue name to have separate queues for each flow. We will now deploy two relayer indexers for each source-dest chain, to feed either queue (to be either Processed, or checked if they need to be Suspended).2) Update the relayer
processor
to be able to handle the the newtwo-step
bridge, as well as full merkle proofs: if aproofReceipt
exists onchain, we are in the second step, if it doesnt, we are in the first step. The processor needs to be able to wait after sending the "MessageReceive" call if we are in the first step, and wait to finalize it. Ifi t is in the "MessageExecuted" step, the relayer can return early and acknowledge the queue message.If a relayer exits early after processing a call in the first step, the message needs to be unacknowledged and go back onto the queue, to repeat the process, except detect it now has a ProofReceipt and can be processed without a proof.
3) Add a new
watchdog
subcommand, which reads from the newMessageReceived
queue, and callsisMessageSent
on the source bridge. If it exists, acknowledge the queue message succesfully. If it doesn't exist, we need to transactsuspend message
on chain for this transaction, and add that to the database for querying via a UI.4) Add a new migration, repository, interface, implementation, and route to the relayer
API
subcommand for:GET /suspendedTransactions
- list all suspended transactions in a paginated response.5) increment a Prometheus counter when we suspend, so we can use this for an alert to alert David and I.
6) Update proof changes with latest signal service/bridge code.
TODO:
Summary by CodeRabbit
suspended_transactions
table.