Skip to content

Commit

Permalink
fix gossipsub mempool id
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSulpiride committed Mar 8, 2024
1 parent 9a10af3 commit 349dbee
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/executor/src/modules/eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class Eth {
entryPoint,
userOp,
blockNumber.toString(),
serializeMempoolId(canonicalMempoolId)
canonicalMempoolId
);
this.metrics?.useropsSent?.inc();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/api/publishVerifiedUserOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { NodeAPIModules } from "./types";
export default function api(modules: NodeAPIModules) {
return async function publishVerifiedUserOperation(
userOp: ts.VerifiedUserOperation,
mempool: Uint8Array
mempool: string
): Promise<void> {
await modules.network.publishVerifiedUserOperation(userOp, mempool);
};
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/api/publishVerifiedUserOperationJSON.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function api(modules: NodeAPIModules) {
entryPoint: string,
userOp: UserOperationStruct,
blockHash: string,
mempool: Uint8Array
mempool: string
): Promise<void> {
const VerifiedUserOperation = toVerifiedUserOperation(
entryPoint,
Expand Down
4 changes: 2 additions & 2 deletions packages/node/src/network/gossip/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ export class BundlerGossipsub extends GossipSub {

async publishVerifiedUserOperation(
userOpsWithEP: ts.VerifiedUserOperation,
mempool: Uint8Array
mempool: string
): Promise<void> {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
await this.publishObject<GossipType.user_operations>(
{
type: GossipType.user_operations,
mempool: deserializeMempoolId(mempool),
mempool: mempool,
},
userOpsWithEP
);
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/network/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface INetwork {
/* List of p2p functions supported by Bundler */
publishVerifiedUserOperation(
userOp: ts.VerifiedUserOperation,
mempool: Uint8Array
mempool: string
): Promise<void>;
pooledUserOpHashes(
peerId: PeerId,
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/network/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export class Network implements INetwork {
/* List of p2p functions supported by Bundler */
async publishVerifiedUserOperation(
userOp: ts.VerifiedUserOperation,
mempool: Uint8Array
mempool: string
): Promise<void> {
await this.gossip.publishVerifiedUserOperation(userOp, mempool);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/node/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { UserOperationStruct } from "../executor/contracts/EntryPoint";
export interface INodeAPI {
publishVerifiedUserOperation(
userOpWithEP: ts.VerifiedUserOperation,
mempool: Uint8Array
mempool: string
): Promise<void>;
publishVerifiedUserOperationJSON(
entryPoint: string,
userOp: UserOperationStruct,
blockHash: string,
mempool: Uint8Array
mempool: string
): Promise<void>;
}

0 comments on commit 349dbee

Please sign in to comment.