Skip to content

Event Listener Upgrade + Wrapper Types + sdk::main macro#333

Merged
drewstone merged 32 commits into
mainfrom
event-listener-docs
Oct 10, 2024
Merged

Event Listener Upgrade + Wrapper Types + sdk::main macro#333
drewstone merged 32 commits into
mainfrom
event-listener-docs

Conversation

@tbraun96

@tbraun96 tbraun96 commented Oct 2, 2024

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread docs/event_listeners.md Outdated
Comment thread docs/event_listeners.md Outdated
Comment thread docs/event_listeners.md
Comment thread docs/event_listeners.md
Comment thread docs/event_listeners.md Outdated
drewstone and others added 3 commits October 2, 2024 23:32
Co-authored-by: Alex <69764315+Serial-ATA@users.noreply.github.com>
Co-authored-by: Alex <69764315+Serial-ATA@users.noreply.github.com>
Co-authored-by: Alex <69764315+Serial-ATA@users.noreply.github.com>
Comment thread sdk/src/event_listener/substrate.rs Outdated
@drewstone

Copy link
Copy Markdown
Contributor

Points of feedback from meeting:

  1. Event listener is required, move existing defaults out and into the SDK as options to choose from out of the box.
  2. Aim for as little extra code as needed on Blueprint developer for specifying their event listeners. Less is more.
  3. Docs for each section of event listeners: EVM Contract listeners, Tangle listener, Periodic Listeners, and ways to extend and build Custom Listeners on top of this.
  4. Docs inside tangle-docs.

@shekohex shekohex left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is still more work to be done here for sure, but I believe we are deviating from the original goal of this PR which is to support other even watchers other than the default ones (Substrate, EVM), and other types of Event Handlers, so why not adopting what we currently have and add more events watcher, like the common ones we see would be good for other blueprints?

Comment thread macros/blueprint-proc-macro/src/job.rs Outdated
Comment thread macros/blueprint-proc-macro/src/job.rs Outdated
@tbraun96

tbraun96 commented Oct 4, 2024

Copy link
Copy Markdown
Contributor Author

There is still more work to be done here for sure, but I believe we are deviating from the original goal of this PR which is to support other even watchers other than the default ones (Substrate, EVM), and other types of Event Handlers, so why not adopting what we currently have and add more events watcher, like the common ones we see would be good for other blueprints?

My latest commit after your comment addresses this concern.

@drewstone drewstone changed the base branch from main to drew/gadget-runner October 7, 2024 15:45
@drewstone drewstone changed the base branch from drew/gadget-runner to main October 7, 2024 15:45
@tbraun96 tbraun96 changed the title Event listener Docs + Wrapper Types Event Listener Upgrade + Wrapper Types + sdk::main macro Oct 8, 2024
@drewstone drewstone merged commit 8ee8790 into main Oct 10, 2024
@drewstone drewstone deleted the event-listener-docs branch October 13, 2024 18:07
Serial-ATA added a commit that referenced this pull request Oct 15, 2024
It was (mistakenly?) removed in #333. Went ahead and added a default path for blueprint manager as well.
drewstone pushed a commit that referenced this pull request Oct 15, 2024
It was (mistakenly?) removed in #333. Went ahead and added a default path for blueprint manager as well.
drewstone added a commit that referenced this pull request Oct 19, 2024
* chore: bump rustdoc-types (#348)

Also pin to the latest nightly

* fix: load substrate signer from env correctly (#349)

* fix: add `data_dir` back to `GadgetConfiguration` (#350)

It was (mistakenly?) removed in #333. Went ahead and added a default path for blueprint manager as well.

* Multi job runner + SDK main macro (#346)

* feat: use aggregator and separate out from the blueprint job

* fix: uncomment generate_json (#358)

* fix: updates using aggregator

* fix: solve registry error in aggregator

* fix: prevent duplicates

* fix: got test working

* fix: fmt and clippy cleanup

* feat(cli): support custom repo and path sources (#360)

* feat: added test in eigen IS blueprint, cleaned up testing code for it

* Event Workflows (phase 1: Custom listeners) (#359)

* Add wrapper types + trait structure to enforce structure for event flows

* Decoupling/refactor and ensure integration test passes

* periodic web poller working and further refactor of macro code

* Everything compiling, integration test passes

* fix(sdk)!: downgrade substrate dependencies for now

It's currently impossible to use some APIs downstream, since they expose `sp_core` (v0.34.0) types instead of the `sdk::keystore::sp_core_subxt` (v0.31.0) types. Cargo will refuse to build blueprints using them. I just got rid of the `sdk::keystore::sp_core_subxt` hack and downgraded all of the dependencies necessary (I think).

This won't be an issue once #318 is taken care of.

* feat(sdk): re-export `libp2p`

---------

Co-authored-by: Alex <69764315+Serial-ATA@users.noreply.github.com>
Co-authored-by: Thomas Braun <38082993+tbraun96@users.noreply.github.com>
Co-authored-by: Tjemmmic <mdtjemmes@proton.me>
drewstone added a commit that referenced this pull request Oct 23, 2024
* feat: add eigenlayer context

* merge: combine context and proc macro tests

* fix: removing unused code and fixing test

* fix: move static vars to the lib

* fix: move static vars to the lib

* chore: debug

* fix: lint and fmt to keep things clean

* chore: add logging for debugging

* fix: identified issue

* fix: start on proc macro for abi grabbing

* fix: compiles and deploys tasks, event listener not firing

* chore: separate event listener files out

* fix: spelling and blocks to mine

* fix: more logging

* chore: remove logs, evm event listener is broke

* fix: remove one loop from event listening flow, polling seems to work, event catching not

* Fix: Got back to original signing bug

* Fix: Fixed address change - back to signature invalid revert

* Fix: Correctly pulls task index from events

* fix: use EL convert to g1/g2 point

* Use incredible squaring aggregator (#364)

* chore: bump rustdoc-types (#348)

Also pin to the latest nightly

* fix: load substrate signer from env correctly (#349)

* fix: add `data_dir` back to `GadgetConfiguration` (#350)

It was (mistakenly?) removed in #333. Went ahead and added a default path for blueprint manager as well.

* Multi job runner + SDK main macro (#346)

* feat: use aggregator and separate out from the blueprint job

* fix: uncomment generate_json (#358)

* fix: updates using aggregator

* fix: solve registry error in aggregator

* fix: prevent duplicates

* fix: got test working

* fix: fmt and clippy cleanup

* feat(cli): support custom repo and path sources (#360)

* feat: added test in eigen IS blueprint, cleaned up testing code for it

* Event Workflows (phase 1: Custom listeners) (#359)

* Add wrapper types + trait structure to enforce structure for event flows

* Decoupling/refactor and ensure integration test passes

* periodic web poller working and further refactor of macro code

* Everything compiling, integration test passes

* fix(sdk)!: downgrade substrate dependencies for now

It's currently impossible to use some APIs downstream, since they expose `sp_core` (v0.34.0) types instead of the `sdk::keystore::sp_core_subxt` (v0.31.0) types. Cargo will refuse to build blueprints using them. I just got rid of the `sdk::keystore::sp_core_subxt` hack and downgraded all of the dependencies necessary (I think).

This won't be an issue once #318 is taken care of.

* feat(sdk): re-export `libp2p`

---------

Co-authored-by: Alex <69764315+Serial-ATA@users.noreply.github.com>
Co-authored-by: Thomas Braun <38082993+tbraun96@users.noreply.github.com>
Co-authored-by: Tjemmmic <mdtjemmes@proton.me>

* fix: remappings out of date

* fix: remove eigenlayer-middleware from tangle blueprint git modules

* chore: close handles once test completes, rpc server still not shutting down

* fix: remove broken invalid test cases

* fix: proc macro doc fixes to avoid more maintenance

---------

Co-authored-by: Tjemmmic <mdtjemmes@proton.me>
Co-authored-by: Alex <69764315+Serial-ATA@users.noreply.github.com>
Co-authored-by: Thomas Braun <38082993+tbraun96@users.noreply.github.com>
This was referenced Oct 23, 2024
drewstone added a commit that referenced this pull request Oct 25, 2024
* feat: add eigenlayer context

* merge: combine context and proc macro tests

* fix: removing unused code and fixing test

* fix: move static vars to the lib

* fix: move static vars to the lib

* chore: debug

* fix: lint and fmt to keep things clean

* chore: add logging for debugging

* fix: identified issue

* fix: start on proc macro for abi grabbing

* fix: compiles and deploys tasks, event listener not firing

* chore: separate event listener files out

* fix: spelling and blocks to mine

* fix: more logging

* chore: remove logs, evm event listener is broke

* fix: remove one loop from event listening flow, polling seems to work, event catching not

* Fix: Got back to original signing bug

* Fix: Fixed address change - back to signature invalid revert

* Fix: Correctly pulls task index from events

* fix: use EL convert to g1/g2 point

* feat: use aggregator and separate out from the blueprint job

* fix: updates using aggregator

* fix: solve registry error in aggregator

* fix: prevent duplicates

* fix: got test working

* fix: fmt and clippy cleanup

* feat: added test in eigen IS blueprint, cleaned up testing code for it

* feat: convert aggregator process_new_jobs to blueprint

* Use incredible squaring aggregator (#364)

* chore: bump rustdoc-types (#348)

Also pin to the latest nightly

* fix: load substrate signer from env correctly (#349)

* fix: add `data_dir` back to `GadgetConfiguration` (#350)

It was (mistakenly?) removed in #333. Went ahead and added a default path for blueprint manager as well.

* Multi job runner + SDK main macro (#346)

* feat: use aggregator and separate out from the blueprint job

* fix: uncomment generate_json (#358)

* fix: updates using aggregator

* fix: solve registry error in aggregator

* fix: prevent duplicates

* fix: got test working

* fix: fmt and clippy cleanup

* feat(cli): support custom repo and path sources (#360)

* feat: added test in eigen IS blueprint, cleaned up testing code for it

* Event Workflows (phase 1: Custom listeners) (#359)

* Add wrapper types + trait structure to enforce structure for event flows

* Decoupling/refactor and ensure integration test passes

* periodic web poller working and further refactor of macro code

* Everything compiling, integration test passes

* fix(sdk)!: downgrade substrate dependencies for now

It's currently impossible to use some APIs downstream, since they expose `sp_core` (v0.34.0) types instead of the `sdk::keystore::sp_core_subxt` (v0.31.0) types. Cargo will refuse to build blueprints using them. I just got rid of the `sdk::keystore::sp_core_subxt` hack and downgraded all of the dependencies necessary (I think).

This won't be an issue once #318 is taken care of.

* feat(sdk): re-export `libp2p`

---------

Co-authored-by: Alex <69764315+Serial-ATA@users.noreply.github.com>
Co-authored-by: Thomas Braun <38082993+tbraun96@users.noreply.github.com>
Co-authored-by: Tjemmmic <mdtjemmes@proton.me>

* fix: merge fix-el branch

* feat: use aggregator blueprint

* fix: remappings out of date

* fix: remove eigenlayer-middleware from tangle blueprint git modules

* chore: close handles once test completes, rpc server still not shutting down

* fix: remove broken invalid test cases

* fix: proc macro doc fixes to avoid more maintenance

* chore: merge main

* fix: move helpers to separate file

* fix: moving helpers along w/ eigenlayer context

* fix: get both blueprints running

* fix: expose addresses better

* feat: test exits successfully and all pieces work seamlessly

* fix: add helper

* fix: clippy and fmt

* fix: context derive test

* fix: context derive test

---------

Co-authored-by: Tjemmmic <mdtjemmes@proton.me>
Co-authored-by: Alex <69764315+Serial-ATA@users.noreply.github.com>
Co-authored-by: Thomas Braun <38082993+tbraun96@users.noreply.github.com>
@webb-spider webb-spider Bot mentioned this pull request Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants