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

Add websocket support to testing framework #3824

Merged
merged 34 commits into from
Jan 9, 2024

Conversation

elmattic
Copy link
Contributor

@elmattic elmattic commented Dec 14, 2023

Summary of changes

Changes introduced in this pull request:

  • Add support for running API calls over WebSockets in forest-tool api compare
  • Add support for WebSocket binary messages
  • Demote WebSocket info logs to debug in Forest daemon

Usage:

./forest-tool api compare --ws --lotus /ip4/127.0.0.1/tcp/1234/ws --forest /ip4/127.0.0.1/tcp/2345/ws forest_snapshot_calibnet_2024-01-02_height_1228692.forest.car.zst

| RPC Method                                     | Forest              | Lotus       |
|------------------------------------------------|---------------------|-------------|
| Filecoin.BeaconGetEntry                        | Valid               | Valid       |
| Filecoin.ChainGetBlock                         | Valid               | Valid       |
| Filecoin.ChainGetBlockMessages (61)            | Valid               | Valid       |
| Filecoin.ChainGetGenesis                       | Valid               | Valid       |
| Filecoin.ChainGetMessage (27)                  | Valid               | Valid       |
| Filecoin.ChainGetMessagesInTipset (20)         | Valid               | Valid       |
| Filecoin.ChainGetParentMessages (61)           | Valid               | Valid       |
| Filecoin.ChainGetParentReceipts                | InternalServerError | Valid       |
| Filecoin.ChainGetParentReceipts (60)           | Valid               | Valid       |
| Filecoin.ChainGetTipSet                        | Valid               | Valid       |
| Filecoin.ChainGetTipSetByHeight                | Valid               | Valid       |
| Filecoin.ChainHasObj                           | Valid               | Valid       |
| Filecoin.ChainHead                             | Valid               | Valid       |
| Filecoin.ChainReadObj                          | Valid               | Valid       |
| Filecoin.EthAccounts                           | Valid               | Valid       |
| Filecoin.EthBlockNumber                        | Valid               | Valid       |
| Filecoin.EthChainId                            | Valid               | Valid       |
| Filecoin.EthGasPrice                           | Valid               | Valid       |
| Filecoin.EthGetBalance (4)                     | Valid               | Valid       |
| Filecoin.MinerGetBaseInfo (8)                  | InvalidResponse     | Valid       |
| Filecoin.MinerGetBaseInfo (53)                 | Valid               | Valid       |
| Filecoin.MpoolGetNonce (11)                    | Valid               | Valid       |
| Filecoin.MpoolPending                          | Valid               | Valid       |
| Filecoin.MsigGetAvailableBalance               | Valid               | Valid       |
| Filecoin.NetAddrsListen                        | Valid               | Valid       |
| Filecoin.NetPeers                              | Valid               | Valid       |
| Filecoin.Session                               | Valid               | Valid       |
| Filecoin.StartTime                             | Valid               | Valid       |
| Filecoin.StateAccountKey (54)                  | Valid               | Valid       |
| Filecoin.StateCall (13)                        | InvalidResponse     | Valid       |
| Filecoin.StateCall (52)                        | Valid               | Valid       |
| Filecoin.StateCirculatingSupply (20)           | Valid               | Valid       |
| Filecoin.StateGetActor                         | Valid               | Valid       |
| Filecoin.StateGetRandomnessFromBeacon          | Valid               | Valid       |
| Filecoin.StateGetRandomnessFromTickets         | Valid               | Valid       |
| Filecoin.StateListMiners                       | Valid               | Valid       |
| Filecoin.StateLookupID (29)                    | Valid               | Valid       |
| Filecoin.StateMinerActiveSectors (62)          | Valid               | Valid       |
| Filecoin.StateMinerDeadlines (61)              | Valid               | Valid       |
| Filecoin.StateMinerFaults (61)                 | Valid               | Valid       |
| Filecoin.StateMinerInfo (5)                    | InvalidResponse     | Valid       |
| Filecoin.StateMinerInfo (56)                   | Valid               | Valid       |
| Filecoin.StateMinerPower (61)                  | Valid               | Valid       |
| Filecoin.StateMinerProvingDeadline (61)        | Valid               | Valid       |
| Filecoin.StateMinerRecoveries (61)             | Valid               | Valid       |
| Filecoin.StateMinerSectorCount (61)            | Valid               | Valid       |
| Filecoin.StateNetworkName                      | Valid               | Valid       |
| Filecoin.StateNetworkVersion                   | Valid               | Valid       |
| Filecoin.StateReadState (2)                    | Valid               | Valid       |
| Filecoin.StateSectorGetInfo                    | Valid               | Valid       |
| Filecoin.StateVMCirculatingSupplyInternal (20) | Valid               | Valid       |
| Filecoin.Version                               | Valid               | Valid       |
| Filecoin.WalletBalance                         | Valid               | Valid       |
| Filecoin.WalletVerify                          | Valid               | Valid       |

Note: tests for running Filecoin.StateWaitMsg have been disabled here because they are waiting forever

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@elmattic elmattic marked this pull request as ready for review January 3, 2024 14:24
@elmattic elmattic requested a review from a team as a code owner January 3, 2024 14:24
@elmattic elmattic requested review from lemmih and aatifsyed and removed request for a team January 3, 2024 14:24
Copy link
Contributor

@aatifsyed aatifsyed left a comment

Choose a reason for hiding this comment

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

Why is the ChainNotify method there?

src/rpc/chain_api.rs Show resolved Hide resolved
@elmattic elmattic added this pull request to the merge queue Jan 9, 2024
Merged via the queue into main with commit cf01ecf Jan 9, 2024
27 checks passed
@elmattic elmattic deleted the elmattic/ws-testing-framework branch January 9, 2024 14:50
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.

None yet

3 participants