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

feat: events: Add Lotus APIs to consume smart contract and built-in actor events #11618

Merged
merged 22 commits into from
Mar 5, 2024

Commits on Mar 5, 2024

  1. Built-in actor events first draft

    aarshkshah1992 authored and rvagg committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    c102516 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f0bdd55 View commit details
    Browse the repository at this point in the history
  3. Tests for builtin actor events API

    aarshkshah1992 authored and rvagg committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    9b09595 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    76e6818 View commit details
    Browse the repository at this point in the history
  5. Minor tweaks to events types

    rvagg committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    114acae View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2fedf29 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a98da82 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fcc7a01 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5d2c3ab View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    53b5cc1 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a9cb30d View commit details
    Browse the repository at this point in the history
  12. Document future API changes

    rvagg committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    620f381 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a2c07ef View commit details
    Browse the repository at this point in the history
  14. More post-review changes, lots of tests for SubscribeActorEvents

    Use BlockDelay as the window for receiving events on the SubscribeActorEvents
    channel. We expect the user to have received the initial batch of historical
    events (if any) in one block's time. For real-time events we expect them to
    not fall behind by roughly one block's time.
    rvagg committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    05e7508 View commit details
    Browse the repository at this point in the history
  15. Remove duplicate code from actor event type marshalling tests

    Reduce verbosity and remove duplicate test logic from actor event types
    JSON marshalling tests.
    masih authored and rvagg committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    d24f30f View commit details
    Browse the repository at this point in the history
  16. Rename actor events test to follow go convention

    Add missing `s` to `actor_events` test file to follow golang convention
    used across the repo.
    masih authored and rvagg committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    3639036 View commit details
    Browse the repository at this point in the history
  17. Run actor events table tests in deterministic order

    Refactor `map` usage for actor event table tests to ensure deterministic
    test execution order, making debugging potential issues easier. If
    non-determinism is a target, leverage Go's built-in parallel testing
    capabilities.
    masih authored and rvagg committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    f8f014a View commit details
    Browse the repository at this point in the history
  18. Reduce scope for filter removal failure when getting actor events

    Use a fresh context to remove the temporary filter installed solely to
    get the actor events. This should reduce chances of failure in a case
    where the original context may be expired/cancelled.
    
    Refactor removal into a `defer` statement for a more readable, concise
    return statement.
    masih authored and rvagg committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    df4cee8 View commit details
    Browse the repository at this point in the history
  19. Use fixed RNG seed for actor event tests

    Improve determinism in actor event tests by using a fixed RNG seed. This
    makes up a more reproducible test suit.
    masih authored and rvagg committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    c0c6988 View commit details
    Browse the repository at this point in the history
  20. Use provided libraries to assert eventual conditions

    Use the functionalities already provided by `testify` to assert eventual
    conditions, and remove the use of `time.Sleep`.
    
    Remove duplicate code in utility functions that are already defined.
    
    Refactor assertion helper functions to use consistent terminology:
    "require" implies fatal error, whereas "assert" implies error where the
    test may proceed executing.
    masih authored and rvagg committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    79e1e9e View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    a7da65d View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    0d2c2a3 View commit details
    Browse the repository at this point in the history