-
Notifications
You must be signed in to change notification settings - Fork 5
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
SYS-3560 Adds event listener feature to the node #418
Conversation
node/src/command.rs
Outdated
runner.async_run(|config| { | ||
// we don't need any of the components of new_partial, just a runtime, or a task | ||
// manager to do `async_run`. | ||
let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); |
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.
you now create the task_manager
inside the runner? why is this change needed?
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.
it doesn't compile with the previous code when you enable try-runtime. This is copied from Substrate
@@ -1092,4 +1096,8 @@ impl<T: Config> BridgeInterfaceNotification for Pallet<T> { | |||
|
|||
Ok(()) | |||
} | |||
|
|||
fn on_incoming_event_processed(event: &EthEvent) -> DispatchResult { | |||
Self::processed_event_handler(event) |
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 worth adding the feature guard here for Lift
and Growth
coming via this hook?
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.
No, from the pallet point of view we either process events coming from eth-bridge or not.
The runtime defines the filter and the rest of the components are just executing.
226e3ff
to
58bf60c
Compare
Introduces the data structures and the voting mechanism for accepting events ranges from ethereum. Ranges that are too big will be broken down into smaller partitions, voted upon individually, and accepted as one. Follow up commit will do the validate unsigned and processing of the partitions. Jira tickets: - SYS-3635 - SYS-3930
Updates the validate unsigned function to support submit_discovered_events extrinsic. Jira tickets: - SYS-3635 - SYS-3930
This PR introduces support for processing votes upon achieving consensus. It extends extrinsics and data structures accordingly. Once the final vote is cast, the voting round for the Ethereum range partition is finalized, and the partition is processed. Additionally, this PR extends the subscription mechanism of the eth-bridge pallet. By default, pallets ignore processed events, requiring the implementation of a handler to process them. Benchmarking for certain actions will be addressed in a separate PR. Jira Tasks: - SYS-3930 - SYS-3635
Signed-off-by: Ivan Cholakov <icholakov1@gmail.com> Co-authored-by: Thanos Doukoudakis <56822898+thadouk@users.noreply.github.com>
Signed-off-by: Ivan Cholakov <icholakov1@gmail.com> Co-authored-by: Thanos Doukoudakis <56822898+thadouk@users.noreply.github.com>
Adds a new endpoint that allows the chain to reach consenus over the initial ethereum range to be used. This allows to simplify the voting logic for active ranges, eliminating the special case of the first range. Jira ticket: - SYS-3930
Extends the runtime API for initial range consensus mechanism Jira task - SYS-3930
Adds basic unit tests that check the submit_ethereum_events interface Jira task: - SYS-3930 - SYS-3635
- General cleanup - Rename of storage items - Removal of mocks - Wire up with runtime, implementing different events filters for each runtime.
…397) This commit includes the integration of the initial range voting functionality with the client. It ports changes to integrate the runtime API for testing runtime behavior. Additionally, it refactors the runtime API to improve proof creation by relocating helper functions to primitive crates. Fixes genesis config for test runtime. Jira tasks: - SYS-3930 - SYS-3635
This commit addresses issues with extrinsic submission in the runtime: - Registers the extension to the instance submitting the extrinsic. - Updates signature validation. - Simplifies interface and error handling via the runtime API, following the report_equivocation style.
…o eth-bridge (#390) Co-authored-by: Thanos <56822898+thadouk@users.noreply.github.com> Co-authored-by: nahuseyoum <nahu.seyoum@aventus.io>
This commit allows the avn-event-hanlder to handle more graceful error. Also applies code formatting.
Signed-off-by: Ivan Cholakov <icholakov1@gmail.com> Co-authored-by: Ivan Cholakov <icholakov1@gmail.com> Co-authored-by: Thanos <56822898+thadouk@users.noreply.github.com> Co-authored-by: Michael <62653655+MBrozhko34@users.noreply.github.com>
Signed-off-by: Ivan Cholakov <icholakov1@gmail.com> Co-authored-by: Ivan Cholakov <icholakov1@gmail.com> Co-authored-by: Thanos <56822898+thadouk@users.noreply.github.com> Co-authored-by: Michael <62653655+MBrozhko34@users.noreply.github.com>
Adds handlers in Token manager and wire up for Runtime to process the first type of events from eth-bridge. Jira ticket: - SYS-4072
Use checked fucntions to do the mod calculations. Updates tests, benchmarks and resto of the code accordingly Restores batch value to tested.
An event is marked as processed once the event processing logic is completed. The processing outcome of the pallet does not affect this.
Co-authored-by: Nahu <39748285+nahuseyoum@users.noreply.github.com> Signed-off-by: Thanos Doukoudakis <56822898+thadouk@users.noreply.github.com>
Deprecates ethereum-events entry points that add manually events in the system. Moving forward the responsibility will be shifted to eth-bridge event scanning mechanism on Ethereum.
- Fixes an issue where the last block of a range was polled twice and included to the next range as well. - Addresses feature PR feedback - cleanup
Adds AvtLowerClaimedData in the types the client scans. Fixes the way the data field is constructed ensuring the data field is explicitly set as None when no data is present, to align with the runtime implementation.
58bf60c
to
3420b53
Compare
Proposed changes
Extends Ethereum bridge pallet to be bidirectional and listen to events emitted in the bridge contract.
The PR introduces:
avn-event-handler
service: a thread running in client space that acts as an oracle, discovering information from Ethereum and submitting the information back to the runtimeType of change/Merge
🚨What type of change is this PR?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR.Further comments