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

fix(katana-rpc): include events from pending block in getEvents #2375

Merged
merged 12 commits into from
Sep 4, 2024

Conversation

kariy
Copy link
Member

@kariy kariy commented Aug 31, 2024

resolves #2328

the starknet_getEvents method will now return pending events. though you can explicitly specify the pending block, there is also a case where pending block will be implicitly used, that is when either the from or to is set to None in the json rpc request params.

the events extracting logic could probably be better tho.

Summary by CodeRabbit

  • New Features

    • Introduced a new ContinuationToken for improved event query paging.
    • Enhanced event retrieval logic with refined checks and filtering capabilities.
    • Added a new utils module for better organization of event handling functions.
  • Bug Fixes

    • Improved error handling for continuation tokens, providing more descriptive error messages.
  • Documentation

    • Added comments to clarify the intent behind new conditions in event retrieval.
  • Refactor

    • Streamlined event filtering process and improved code readability in the StarknetApi implementation.
    • Optimized control flow in event retrieval to prevent unnecessary operations.

Copy link

coderabbitai bot commented Aug 31, 2024

Walkthrough

Ohayo, sensei! The changes introduce a new ContinuationToken struct to enhance event paging, expand error handling for token parsing, and refine the event retrieval logic in the StarknetApi. The implementation of the From trait for ContinuationTokenError is simplified. Additionally, the handling of event filters and block identifiers is improved for better readability and maintainability, along with new test cases to validate the changes.

Changes

Files Change Summary
crates/katana/primitives/src/event.rs Introduced ContinuationToken struct for paging, expanded ContinuationTokenError, and overhauled parse method for better efficiency and error handling.
crates/katana/rpc/rpc/src/starknet/mod.rs Enhanced events function logic, removed redundant error handling, refined continuation token management, and introduced FilteredEvents struct for filtering.
crates/katana/rpc/rpc/src/utils/events.rs Added functionality for managing and querying events, including error handling and cursor management for pagination.
crates/katana/rpc/rpc/src/utils/mod.rs Introduced a new public module named events for better organization of event-related functionality.
crates/katana/rpc/rpc/src/error/starknet.rs Simplified From trait implementation for ContinuationTokenError to a single return value for StarknetApiError.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant StarknetApi
    participant EventService
    participant TokenParser

    Client->>StarknetApi: Request events with continuation token
    StarknetApi->>TokenParser: Parse continuation token
    TokenParser-->>StarknetApi: Return parsed token
    StarknetApi->>EventService: Retrieve events based on parsed token
    EventService-->>StarknetApi: Return filtered events
    StarknetApi-->>Client: Send events response
Loading

Assessment against linked issues

Objective Addressed Explanation
starknet_getEvents API doesn't work with pending block (#[2328])

Tip

We have updated our review workflow to use the Anthropic's Claude family of models. Please share any feedback in the discussion post on our Discord.


Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 200a46b and 371f122.

Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing (5)
  • crates/katana/rpc/rpc/Cargo.toml (1 hunks)
  • crates/katana/rpc/rpc/src/lib.rs (1 hunks)
  • crates/katana/rpc/rpc/src/starknet/mod.rs (5 hunks)
  • crates/katana/rpc/rpc/src/utils/events.rs (1 hunks)
  • crates/katana/rpc/rpc/src/utils/mod.rs (1 hunks)
Files skipped from review due to trivial changes (2)
  • crates/katana/rpc/rpc/src/lib.rs
  • crates/katana/rpc/rpc/src/utils/mod.rs
Additional comments not posted (21)
crates/katana/rpc/rpc/Cargo.toml (1)

25-25: Ohayo sensei! The change looks good to me.

Adding thiserror as a development dependency is a great way to enhance error handling in the codebase. It provides a convenient and idiomatic way to define and manage custom error types in Rust. This change aligns with best practices and can improve the overall robustness and maintainability of the project.

crates/katana/rpc/rpc/src/utils/events.rs (9)

65-70: Sugoi desu ne, sensei! The ContinuationToken struct looks perfect.

The struct is well-defined with descriptive field names for representing a cursor in event pagination.


20-28: Yatta! The Error enum is a clean way to categorize errors, sensei.

The enum variants provide a clear categorization of the possible errors. The use of the #[from] attribute is a nice touch to reduce boilerplate code for error conversions.


30-34: Ohayo sensei! The EventBlockId enum is a clean way to represent block IDs.

The enum allows specifying either a pending block or a block number for event queries. The variant names are descriptive and the enum is well-defined.


88-139: Subarashii, sensei! The fetch_pending_events function looks great.

The function correctly fetches events from the pending block, handling the cursor and processing transactions starting from the specified index. It follows a clear logic flow and is well-structured.


141-212: Sugoi, sensei! The fetch_events_at_blocks function is implemented nicely.

The function correctly fetches events from a range of blocks, handling the cursor and updating it as needed. It retrieves the necessary data for each block and calls the fetch_tx_events function to fetch events for each transaction. The function is well-structured and follows a clear logic flow.


215-268: Ohayo gozaimasu, sensei! The FilteredEvents struct and its Iterator implementation are top-notch.

The struct is well-defined, taking an iterator of events and a reference to the filter. The Iterator implementation correctly filters the events based on the address and keys specified in the filter, following the expected behavior.


272-331: Subarashii desu, sensei! The fetch_tx_events function is implemented flawlessly.

The function correctly fetches events for a specific transaction, calculating the remaining capacity and filtering the events using the FilteredEvents struct. It updates the buffer with the filtered events and returns a PartialCursor if there are more events to fetch. The function is well-structured and follows a clear logic flow.


333-341: Yatta, sensei! The From implementation for Error is spot-on.

The implementation correctly maps the Error variants to their corresponding StarknetApiError variants, providing a convenient way to convert between the two error types.


343-347: Ohayo, sensei! The From implementation for Cursor is perfect.

The implementation correctly converts a ContinuationToken to a Cursor by extracting the relevant fields and passing them to the Cursor::new function. It provides a convenient way to convert between the two types.

crates/katana/rpc/rpc/src/starknet/mod.rs (11)

24-24: Ohayo, sensei! The import changes look good.

The additional traits being imported from the katana_provider crate are necessary for the enhancements made to the events function.


29-29: Sugoi formatting change, sensei!

Splitting the import statement into multiple lines improves the readability of the code.


35-35: Ohayo, sensei! The new imports are spot-on.

The EventsPage type and the utils::events module are essential for the enhancements made to the events function, providing the necessary types and utility functions for handling events and pagination.

Also applies to: 38-40


Line range hint 333-456: Ohayo, sensei! The changes to the events function are quite extensive.

The enhancements to the event retrieval logic, particularly for pending blocks, require a thorough review to ensure correctness and robustness. Let's dive into each sub-section of the function and provide specific review comments.


345-349: Sugoi improvements to the from block handling, sensei!

The use of the EventBlockId enum and the convert_block_id function enhances the clarity and robustness of the code. The explicit distinction between pending and non-pending blocks makes the code more readable and maintainable.


352-357: Ohayo, sensei! The to block handling looks great.

The changes are consistent with the improvements made to the from block handling, using the EventBlockId enum and the convert_block_id function. This enhances the clarity and robustness of the code.


359-362: Sugoi handling of the continuation_token, sensei!

The use of the ContinuationToken::parse function and the Cursor type improves the clarity and type safety of the code. This makes the code more maintainable and less error-prone.


364-366: Ohayo, sensei! The buffer and filter initialization looks great.

Pre-allocating the buffer vector with a capacity of chunk_size is a good optimization to avoid unnecessary reallocations. The use of the utils::events::Filter struct encapsulates the filtering logic, making the code more readable and maintainable.


368-382: Sugoi event retrieval logic for non-pending blocks, sensei!

The utils::events::fetch_events_at_blocks function improves the modularity and reusability of the code. It encapsulates the retrieval process and returns a cursor for pagination, making the code more readable and maintainable. The use of the buffer vector and the cursor ensures efficient event retrieval and proper pagination.


385-425: Ohayo, sensei! The event retrieval logic for a range from a non-pending block to a pending block is impressive.

The two-step process efficiently handles the event retrieval, ensuring that events are retrieved from non-pending blocks first and then from the pending block if necessary. The use of the utils::events::fetch_pending_events function improves code modularity and reusability. The handling of the continuation token ensures proper pagination and avoids unnecessary event retrieval.


427-449: Sugoi event retrieval logic for a range from a pending block to a pending block, sensei!

The changes efficiently handle the event retrieval process when both the from and to blocks are pending. The use of the utils::events::fetch_pending_events function improves code modularity and reusability. The handling of the continuation token ensures proper pagination, and the fallback to the latest block number when there is no pending executor ensures a consistent response.


Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (1)
crates/katana/rpc/rpc/src/starknet/mod.rs (1)

Line range hint 335-552: Enhancements and Simplification Needed in Event Handling

Ohayo, sensei! The modifications to the events function significantly enhance its functionality, particularly in handling events from pending blocks and managing continuation tokens more robustly. The introduction of the FilteredEvents struct is a commendable effort to improve code readability and maintainability.

However, the complexity introduced by these changes might benefit from further simplification. The TODO comment at line 335 suggests the need for more documentation and possibly finding a simpler solution. It would be wise to address this to ensure the maintainability of the code.

Consider refactoring to simplify the logic and enhance documentation to make the codebase more maintainable and understandable for future contributors.

crates/katana/rpc/rpc-types/src/error/starknet.rs Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

crates/katana/rpc/rpc/src/starknet/mod.rs Show resolved Hide resolved
crates/katana/rpc/rpc/src/starknet/mod.rs Outdated Show resolved Hide resolved
crates/katana/rpc/rpc/src/starknet/mod.rs Outdated Show resolved Hide resolved
Comment on lines 368 to 474
}
Ordering::Greater => (),
}
Ordering::Equal => {
continuation_token.txn_n += 1;
continuation_token.event_n = 0;
continue;

// calculate the remaining capacity based on the chunk size and the current //
// number of events we have taken.
let remaining_capacity = chunk_size as usize - all_events.len();

// skip events according to the continuation token.
let filtered_events = filter_events(events.iter(), address, keys.clone())
.skip(continuation_token.event_n as usize)
.take(remaining_capacity)
.map(|e| EmittedEvent {
keys: e.keys.clone(),
data: e.data.clone(),
transaction_hash: tx_hash,
block_number: Some(current),
block_hash: Some(block_hash),
from_address: e.from_address.into(),
})
.collect::<Vec<_>>();

// the next time we have to fetch the events, we will start from this index.
let new_event_n = continuation_token.event_n as usize + filtered_events.len();
all_events.extend(filtered_events);

if all_events.len() >= chunk_size as usize {
// check if there are still more events that we haven't fetched yet. if yes,
// we need to return a continuation token that points to the next event to
// start fetching from.
if new_event_n < txn_events_len {
continuation_token.event_n = new_event_n as u64;
}
// reset the event index
else {
continuation_token.txn_n += 1;
continuation_token.event_n = 0;
}

// if we have reached the last block in the range and there are no more
// events left AND we still have to fetch from the pending block, we need to
// increment the block number in the continuation token to point to the
// pending block.
if current == to && is_to_pending && new_event_n == txn_events_len {
continuation_token.txn_n = 0;
continuation_token.event_n = 0;
continuation_token.block_n += 1;
}

return Ok(EventsPage {
events: all_events,
continuation_token: Some(continuation_token.to_string()),
});
}
}

// skip events
let txn_events = events.iter().skip(continuation_token.event_n as usize);

let (new_filtered_events, continuation_index) = filter_events_by_params(
txn_events,
address,
keys.clone(),
Some((chunk_size as usize) - filtered_events.len()),
);

filtered_events.extend(new_filtered_events.iter().map(|e| EmittedEvent {
from_address: e.from_address.into(),
keys: e.keys.clone(),
data: e.data.clone(),
block_hash: Some(block_hash),
block_number: Some(i),
transaction_hash: tx_hash,
}));

if filtered_events.len() >= chunk_size as usize {
let token = if current_block < to
|| continuation_token.txn_n < txn_n as u64 - 1
|| continuation_index < txn_events_len
{
continuation_token.event_n = continuation_index as u64;
Some(continuation_token.to_string())
} else {
None
};
return Ok(EventsPage { events: filtered_events, continuation_token: token });
continuation_token.event_n = 0;
continuation_token.txn_n += 1;
}

continuation_token.txn_n += 1;
continuation_token.event_n = 0;
continuation_token.txn_n = 0;
continuation_token.block_n += 1;
}
}
Copy link

Choose a reason for hiding this comment

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

Streamline event fetching logic to reduce complexity.

The block of code from lines 368 to 474, which fetches events across a range of blocks, is quite complex. This complexity can be reduced by breaking down the function into smaller, more manageable parts. For instance, the loop that processes each block and transaction could be refactored into separate functions.

Consider breaking down the event fetching logic into smaller functions to simplify the code and enhance readability.

crates/katana/rpc/rpc/src/starknet/mod.rs Outdated Show resolved Hide resolved
crates/katana/rpc/rpc/src/starknet/mod.rs Outdated Show resolved Hide resolved
@kariy kariy marked this pull request as draft August 31, 2024 10:11
Copy link

codecov bot commented Aug 31, 2024

Codecov Report

Attention: Patch coverage is 81.12583% with 57 lines in your changes missing coverage. Please review.

Project coverage is 68.16%. Comparing base (1d95782) to head (371f122).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/katana/rpc/rpc/src/starknet/mod.rs 60.97% 32 Missing ⚠️
crates/katana/rpc/rpc/src/utils/events.rs 87.17% 25 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2375      +/-   ##
==========================================
+ Coverage   67.86%   68.16%   +0.30%     
==========================================
  Files         359      360       +1     
  Lines       46959    47138     +179     
==========================================
+ Hits        31869    32133     +264     
+ Misses      15090    15005      -85     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kariy kariy marked this pull request as ready for review September 1, 2024 02:58
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (1)
crates/katana/rpc/rpc/src/starknet/mod.rs (1)

Line range hint 336-435: Ohayo sensei! The events function is well-structured and handles various scenarios effectively, but consider breaking it down into smaller functions for better readability and maintainability.

The events function does a great job of handling event retrieval from both regular and pending blocks, using the ContinuationToken for efficient pagination. The logic for handling different block ranges and calling the appropriate helper functions (fill_events_at and fill_pending_events) is clear and concise.

However, the function is quite large and could benefit from being broken down into smaller, more focused functions. This would improve readability and maintainability, making it easier for other developers to understand and modify the code in the future.

Consider extracting the logic for handling different block ranges into separate functions, and possibly moving the EventBlockId enum to a separate file.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (1)
crates/katana/rpc/rpc/src/starknet/mod.rs (1)

Line range hint 336-435: Ohayo sensei! The refactored events function looks great, especially the improved handling of pending blocks and continuation tokens.

The changes enhance the function's ability to retrieve events from both regular and pending blocks. The use of the EventBlockId enum and the ContinuationToken struct improves code readability and enables efficient event paging.

However, the function is still quite complex. Consider further decomposing it into smaller, more focused functions and adding more documentation to explain the logic flow. This will make the code easier to understand and maintain.

@kariy kariy changed the base branch from main to loadfromremote/main-loop September 1, 2024 03:35
@kariy kariy changed the base branch from loadfromremote/main-loop to main September 1, 2024 03:36
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Outside diff range, codebase verification and nitpick comments (3)
crates/katana/primitives/src/event.rs (3)

14-21: Ohayo, sensei! Great documentation, but there's a tiny typo.

The documentation for ContinuationToken is clear and informative. It explains the purpose and usage of the struct well.

There's a small typo in line 20. Let's fix it:

-/// There JSON-RPC specification does not specify the format of the continuation token,
+/// The JSON-RPC specification does not specify the format of the continuation token,

47-68: Sugoi parse method, sensei! Just one tiny suggestion.

The updated parse method is a significant improvement:

  1. Using &str instead of String is more efficient.
  2. The new parsing logic handles empty parts and invalid formats robustly.
  3. The part! macro reduces code duplication effectively.

Consider adding a comment explaining the part! macro for improved readability:

// Macro to parse the next part of the token, returning an error if it's missing or empty
macro_rules! part {
    // ... (existing macro implementation)
}

Line range hint 79-132: Excellent test coverage, sensei!

The updated test cases are comprehensive and cover the new functionality well:

  1. They now use &str instead of String, matching the updated parse method signature.
  2. The new test cases cover the additional error variants.

Consider adding a test case for the InvalidToken error:

#[test]
fn parse_invalid_token() {
    assert_matches!(
        ContinuationToken::parse("0,0,0,0").unwrap_err(),
        ContinuationTokenError::InvalidToken
    );
}

This will ensure complete coverage of all error variants.

crates/katana/rpc/rpc/src/starknet/mod.rs Outdated Show resolved Hide resolved
crates/katana/rpc/rpc/src/starknet/mod.rs Outdated Show resolved Hide resolved
crates/katana/rpc/rpc/src/starknet/mod.rs Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (1)
crates/katana/primitives/src/event.rs (1)

Line range hint 41-54: Impressive parse method upgrade, sensei!

The new implementation is more efficient and provides better error handling. Great job on improving the robustness of the parsing logic!

There's a minor inconsistency in variable naming. Consider updating receipt_n to txn_n for consistency with the struct field name:

-        let receipt_n =
+        let txn_n =
             u64::from_str_radix(arr[1], 16).map_err(ContinuationTokenError::ParseFailed)?;

-        Ok(ContinuationToken { block_n, txn_n: receipt_n, event_n })
+        Ok(ContinuationToken { block_n, txn_n, event_n })

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (1)
crates/katana/primitives/src/event.rs (1)

Line range hint 41-53: Impressive parse method upgrade, sensei!

The parse method looks much better now. Accepting &str instead of String is more efficient, and the error handling is top-notch.

Consider using array_chunks instead of collecting into a Vec for even better performance:

-    let arr: Vec<&str> = token.split(',').collect();
-    if arr.len() != 3 {
+    let mut chunks = token.split(',').array_chunks::<3>();
+    if let Some([block, txn, event]) = chunks.next() {
+        if chunks.next().is_some() {
+            return Err(ContinuationTokenError::InvalidToken);
+        }
+        // Parse block, txn, and event here
+    } else {
         return Err(ContinuationTokenError::InvalidToken);
     }
-    let block_n =
-        u64::from_str_radix(arr[0], 16).map_err(ContinuationTokenError::ParseFailed)?;
-    let receipt_n =
-        u64::from_str_radix(arr[1], 16).map_err(ContinuationTokenError::ParseFailed)?;
-    let event_n =
-        u64::from_str_radix(arr[2], 16).map_err(ContinuationTokenError::ParseFailed)?;

This approach avoids allocating a Vec and provides a more idiomatic way to ensure exactly three elements.

@kariy kariy merged commit 5d7031e into main Sep 4, 2024
15 checks passed
@kariy kariy deleted the katana/pending-events branch September 4, 2024 01:37
kariy added a commit to walnuthq/dojo that referenced this pull request Sep 6, 2024
glihm added a commit that referenced this pull request Sep 8, 2024
* feat: add sierra to cairo debug information

* Add walnut flag to sozo execute command

* Pass rpc url to handle_transaction_result

* Add walnut flag to sozo migrate apply command

* Move walnut_debug_transaction to walnut crate

* Cargo fmt

* Keep only one global walnut flag

* Add comments

* Add walnut flag to sozo execute command

* Pass rpc url to handle_transaction_result

* Add walnut flag to sozo migrate apply command

* Move walnut_debug_transaction to walnut crate

* Cargo fmt

* Keep only one global walnut flag

* Add comments

* Resolve conflicts

* Fix lint errors

* Put the walnut crate under the /sozo dir

* Add constants with API and app URLs

* Warn where we fail silently

* Remove unnecessary comments

* Check Walnut API key before migration

* Add doc comments

* Disable walnut flag in auto_authorize

* chore; use debug for pending tx log (#2383)

Update engine.rs

* refactor(katana-rpc): `getEvents` include pending block  (#2375)

* refactor(katana): move predeployedAccounts under DevApi and remove KatanaApi (#2310)

fix: move predeployedAccounts under DevApi and remove KatanaApi

* remove world and indexers table in favour of contracts

commit-id:98359f5f

* opt(torii): batch query execution in sync_range

commit-id:72f22f88

* refactor(torii): make select block cancel safe

commit-id:8fbc8e6d

* opt(torii): use hashmap instead of vector of event processors

commit-id:7303cc72

* opt(torii): fetch receipts along with blocks instead of fetching them individually

commit-id:b6db4cb5

* opt(torii): avoid re-processing of transactions in certain case

fix: #2355

commit-id:a510b985

* wip

* chore(dojo-world): enable manifest feature on `migration` feature

* fmt

* refactor: move walnut config into WalnutDebugger

* fix: ensure only WalnutDebugger is exposed

* fix: restore default dojo_dev.toml

* dont print in library code

* use concrete error types in walnut/verification

* use concrete types again

* remove unecessary util function

* use json method instead

* fix: fix test

---------

Co-authored-by: glihm <dev@glihm.net>
Co-authored-by: Larko <59736843+Larkooo@users.noreply.github.com>
Co-authored-by: Ammar Arif <evergreenkary@gmail.com>
Co-authored-by: lambda-0x <0xlambda@protonmail.com>
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.

starknet_getEvents API doesn't work with pending block
1 participant