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

PoC: trying papi #118

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

PoC: trying papi #118

wants to merge 1 commit into from

Conversation

xlc
Copy link
Member

@xlc xlc commented Nov 25, 2024

No description provided.

@xlc xlc mentioned this pull request Nov 25, 2024
@@ -54,6 +55,9 @@ export async function setIdentityThenRequestAndProvideJudgement<
>(peopleChain: Chain<TCustom, TInitStorages>) {
const [peopleClient] = await setupNetworks(peopleChain)
Copy link
Collaborator

Choose a reason for hiding this comment

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

When considering using PAPI in tests, in general, will we also want to keep this kind of call alongside the ones you introduce below? We will effectively have 2 clients available during testing.

Copy link
Member Author

Choose a reason for hiding this comment

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

people can choose pjs or papi to use when writing a test and in the unlikely case, they can write tests using both.

Copy link
Collaborator

Choose a reason for hiding this comment

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

From what I understand, <pjs_client_name>.dev.{newBlock, setStorage, timeTravel, setHead} are wrappers over WebSocket calls to RPC endpoints that chopsticks-utils layers on top of the "real" node.

  1. Do you think it makes sense to offer the same functionality for PAPI clients in chopsticks,
  2. Or is it extraneous work, and for the time being this can remain available via PJS clients? E.g. tests using PAPI may rely on PJS clients for chopsticks-specific endpoints (new block, set storage, etc).

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you think it makes sense to offer the same functionality for PAPI clients in chopsticks,

No. It wouldn't make any difference.

Or is it extraneous work, and for the time being this can remain available via PJS clients? E.g. tests using PAPI may rely on PJS clients for chopsticks-specific endpoints (new block, set storage, etc).

The usage is completely hidden and shouldn't matter at all. People can use them and yes it may indirectly depends on pjs but who cares?

In fact, it will be a good idea to write those to invoke the chain API directly, instead of using websocket calls (AcalaNetwork/chopsticks#861)

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.

2 participants