eigerco / beerus

A stateless trustless Starknet light client in Rust 🦀
MIT License
249 stars 87 forks source link

bug: Fix starknet_getEvents #473

Closed phklive closed 1 year ago

phklive commented 1 year ago

Bug Report

Current behavior:

This method is flagged as failing by the end to end testing CI of Beerus.

The CI consists of running 47 hurl requests on the 47 endpoints supported by Beerus and verifying that the responses are correctly matching the correct functionality of Beerus Starknet Light Client.

Your mission is to fix this endpoint to enable the End to End CI to flag it as functional.

There are different reasons why this test could fail:

  1. The method has been wrongly implemented in the beerus-rpc crate ( api.rs / lib.rs )
  2. The method has been wrongly implemented in the beerus-core crate ( could be both 1 and 2 sometimes )
  3. The hurl file has been wrongly written
  4. The error comes from an external source and hence needs to be understood and explained.

Expected behavior:

It will be flagged as functional if you can run Beerus locally and test that the answer matches what it should be.

You can verify the params and returns of this endpoint on the Starknet specs or Ethereum specs documentation:

Ethereum: https://ethereum.github.io/execution-apis/api-documentation/

Starknet: https://playground.open-rpc.org/?uiSchema%5BappBar%5D%5Bui:splitView%5D=false&schemaUrl=https://raw.githubusercontent.com/starkware-libs/starknet-specs/master/api/starknet_api_openrpc.json&uiSchema%5BappBar%5D%5Bui:input%5D=false&uiSchema%5BappBar%5D%5Bui:darkMode%5D=true&uiSchema%5BappBar%5D%5Bui:examplesDropdown%5D=false

Steps to reproduce:

Related code:

Test the endpoint locally, it should fail.

To test the endpoint you can make a hurl request at Beerus or Run the hurl files present in the beerus/examples/beerus-rpc/* using these commands:

// Run a specific hurl file
hurl [filename]

// This skips the assertions and enables you to see the error 
hurl [filename] --ignore-asserts

// Run all hurl files in sequence and assert their responses
hurl --test ./examples/beerus-rpc/*/*.hurl

// This skips the assertions and enables you to see the error messages.
hurl --test ./examples/beerus-rpc/*/*.hurl --ignore-asserts

Other information:

This issue is part of the fix of the e2e-tests of the Beerus CI:

SCR-20230515-jtsl
dpinones commented 1 year ago

@phklive can I take this one?

phklive commented 1 year ago

Assigned !

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!