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

Reworking of the jsonrpc server #219

Merged
merged 4 commits into from
May 24, 2024
Merged

Conversation

vincenzopalazzo
Copy link
Owner

Alternative version for #216

@vincenzopalazzo vincenzopalazzo force-pushed the macros/patch-jsonrpcv2 branch from 2aa2c58 to 5e9a96c Compare May 16, 2024 20:07
@vincenzopalazzo vincenzopalazzo added the 👀 - seeking reviews This PR is seeking reviews label May 18, 2024
@vincenzopalazzo vincenzopalazzo added this to the v24.06 milestone May 18, 2024
@vincenzopalazzo
Copy link
Owner Author

OK testing it on a server I get the following

2024-05-18T17:24:29.974Z INFO lampo_jsonrpc Accepting connection: `Ok((UnixStream { fd: FileDesc(OwnedFd { fd: 4 }), local: "/home/vp/.lampo/testnet/lampod.socket" (pathname), peer: (unnamed) }, (unnamed)))`. [lampo-jsonrpc/src/lib.rs:265]
2024-05-18T17:24:29.975Z INFO jsonrpc buffer read {"method":"funds","params":{},"id":"0","jsonrpc":". [lampo-jsonrpc/src/lib.rs:186]

looks like the buffer is truncated

Removed the code that it is not longer used by
the previous code refactoring.

Signed-off-by: Vincenzo Palazzo <[email protected]>
@vincenzopalazzo vincenzopalazzo force-pushed the macros/patch-jsonrpcv2 branch from 88d2bed to ed6ba58 Compare May 24, 2024 15:37
Signed-off-by: Vincenzo Palazzo <[email protected]>
Signed-off-by: Vincenzo Palazzo <[email protected]>
Copy link
Owner Author

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

ACK ee671ab

@vincenzopalazzo vincenzopalazzo merged commit 1f92659 into main May 24, 2024
3 of 5 checks passed
@vincenzopalazzo vincenzopalazzo deleted the macros/patch-jsonrpcv2 branch May 24, 2024 15:58
Copy link
Collaborator

@Harshit933 Harshit933 left a comment

Choose a reason for hiding this comment

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

A single warning that I encountered. Otherwise all the things were good.

continue;
}

if event.is_invalid() {
log::info!(target: "jsonrpc", "event invalid, unregister event from the tracking one");
log::warn!(target: "jsonrpc", "event invalid: {:?}", event);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This gives me the warning everytime I run lampo-cli --network regtest getinfo.

2024-05-24T16:13:35.386Z WARN jsonrpc event invalid: Event { key: Connect, source: Source { fd: 15, events: 519, revents: 32 } }. [lampo-jsonrpc/src/lib.rs:281]

Should we take care of this or should we ignore this everytime.

This is the basic flow of events whenever I am querying the node.

  1. RPCEvent::Accept
  2. RPCEvent::Connect && event.is_readable()
  3. RPCEvent::Connect and the event.is_invalid() -> This throws the warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 - seeking reviews This PR is seeking reviews
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants