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: Websocket & mempool archieve & userop status method #175

Merged
merged 12 commits into from
Apr 29, 2024

Conversation

0xSulpiride
Copy link
Member

@0xSulpiride 0xSulpiride commented Apr 23, 2024

Description

  • feat: skandha_subscribe and skandha_unsubscribe methods to listen to pending userops and submitted userops
  • feat: mempool archieve - user op are kept in the mempool for 24 hours (configurable values) FEATURE: Archive mode #123
  • feat: skandha_userOperationStatus endpoint to fetch status from the archieve
  • updated fastify (websocket plugin was not working with the old version)
  • added docs folder with examples of eth_subscribe and skandha_userOperationStatus
  • added 2 cli params: api.ws and api.wsPort

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Further comments (optional)

@0xSulpiride 0xSulpiride changed the title wip: Websocket feat: Websocket & mempool archieve & userop status method Apr 26, 2024
@0xSulpiride 0xSulpiride changed the base branch from master to release-1.5.5 April 26, 2024 09:45

```json
{
"method": "eth_subscribe",
Copy link
Member

Choose a reason for hiding this comment

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

Should we rename this as skandha_susbcribe?

This is skandha specific endpoints, so let's prefix it with skandha_

@@ -164,6 +164,9 @@ export interface NetworkConfig {
entryPointForwarder: string;
// api auth key for echo: https://echo.chainbound.io/docs/usage/api-interface#authentication
echoAuthKey: string;
// keep submitted, reverted and cancelled userops in the mempool for this many seconds
// default: 24 hours
archieveDuration: number;
Copy link
Member

Choose a reason for hiding this comment

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

Typo. Should be archive.

@@ -133,6 +163,7 @@ export class Skandha {
gasFeeInSimulation: this.networkConfig.gasFeeInSimulation,
userOpGasLimit: this.networkConfig.userOpGasLimit,
bundleGasLimit: this.networkConfig.bundleGasLimit,
archieveDuration: this.networkConfig.archieveDuration,
Copy link
Member

Choose a reason for hiding this comment

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

Should be archive

@@ -0,0 +1,3 @@
export const MAX_MEMPOOL_USEROPS_PER_SENDER = 4;
export const THROTTLED_ENTITY_MEMPOOL_COUNT = 4;
export const ARCHIEVE_PURGE_INTERVAL = 5 * 60 * 1000; // 50 minutse
Copy link
Member

Choose a reason for hiding this comment

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

archive

@@ -139,6 +139,7 @@ export class BundlerNode {
port: nodeOptions.api.port,
host: nodeOptions.api.address,
cors: nodeOptions.api.cors,
websocket: nodeOptions.api.websocket,
Copy link
Member

Choose a reason for hiding this comment

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

What port are we choosing as websocket connections?

Copy link
Member

@ch4r10t33r ch4r10t33r left a comment

Choose a reason for hiding this comment

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

LGTM

@0xSulpiride 0xSulpiride merged commit fa4757c into release-1.5.5 Apr 29, 2024
1 of 2 checks passed
@0xSulpiride 0xSulpiride deleted the websocket branch April 29, 2024 11:52
@0xSulpiride 0xSulpiride mentioned this pull request Apr 29, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants