-
Notifications
You must be signed in to change notification settings - Fork 60
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
Conversation
docs/eth_subscribe.md
Outdated
|
||
```json | ||
{ | ||
"method": "eth_subscribe", |
There was a problem hiding this comment.
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_
packages/executor/src/interfaces.ts
Outdated
@@ -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; |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
archive
packages/node/src/index.ts
Outdated
@@ -139,6 +139,7 @@ export class BundlerNode { | |||
port: nodeOptions.api.port, | |||
host: nodeOptions.api.address, | |||
cors: nodeOptions.api.cors, | |||
websocket: nodeOptions.api.websocket, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
skandha_subscribe
andskandha_unsubscribe
methods to listen to pending userops and submitted useropsskandha_userOperationStatus
endpoint to fetch status from the archieveeth_subscribe
andskandha_userOperationStatus
api.ws
andapi.wsPort
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that applyFurther comments (optional)