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

refactor(protocol): add an invocation delay #15553

Merged
merged 4 commits into from
Jan 24, 2024

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented Jan 24, 2024

The idea is to enhance the Bridge's security by enforcing a delay before a message can be actually invoked. If the invocation delay is set to 0 (by default), the bridge functions the same way as it used to be, but if a non-zero delay is configured, processMessage and recallMessage must be called twice for each message. The first call will verify the message is indeed received with a merkle proof and timestamp the message; the second call will actually invoke the message.

New tests for non-zero invocation delay will be added once we decided to proceed with this feature.

Copy link

vercel bot commented Jan 24, 2024

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 Jan 24, 2024 2:13am

@dantaik dantaik changed the title refactor(protocol): reuse messageStatus for recalled messages refactor(protocol): add an invocation delay Jan 24, 2024
@dantaik dantaik requested a review from Brechtpd January 24, 2024 02:06
@dantaik dantaik changed the base branch from alpha-6 to bridge_invocation_delay January 24, 2024 02:08
auto-merge was automatically disabled January 24, 2024 02:08

Merge commits are not allowed on this repository

@dantaik dantaik merged commit fc03149 into bridge_invocation_delay Jan 24, 2024
2 of 11 checks passed
@dantaik dantaik deleted the bridge_optimize_minor branch January 24, 2024 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants