Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

web3.js Roadmap – November 2022 – Discussion thread #28783

Closed
steveluscher opened this issue Nov 10, 2022 · 6 comments
Closed

web3.js Roadmap – November 2022 – Discussion thread #28783

steveluscher opened this issue Nov 10, 2022 · 6 comments
Labels
community Community contribution

Comments

@steveluscher
Copy link
Contributor

What do you want to see accomplished in @solana/web3.js in the month of November 2022?

Milestone: https://github.com/solana-labs/solana/milestone/202

@steveluscher steveluscher added the community Community contribution label Nov 10, 2022
@ProfMoo
Copy link

ProfMoo commented Nov 30, 2022

Hi! Please let me know if this isn't the correct forum for this ask :).

It seems like some important JSON RPC parameters are missing from the library. Most impactful off the top of my head would be the transactionDetails configuration for the getBlock call. Without this, it's impossible to use TypeScript to get block information without receiving every transaction in the block. Receiving every transaction is burdensome, especially for a language without native concurrency. Would be great if these types of important JSON RPC parameters were included.

For example, I'm unable to do this:

await connection.getBlock(164000050, {
  maxSupportedTransactionVersion: 0,
  transactionDetails: 'none'
});

Currently, the above code throws an error.

Also, please let me know if I am simply in error and there actually is a way to do this :)

@steveluscher
Copy link
Contributor Author

Absolutely the right place! You've caught me fixing bugs this week, so I'll do this now, #28999.

@ProfMoo
Copy link

ProfMoo commented Nov 30, 2022

Wow thanks for the quick response! While you're working on this, it might be worthwhile adding other optional params for getBlock, such as the rewards config option. As is, this is the type:

  export type GetVersionedBlockConfig = {
    /** The level of finality desired */
    commitment?: Finality;
    /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */
    maxSupportedTransactionVersion?: number;
  };

It's missing a few options from the JSON-RPC endpoint: https://docs.solana.com/developing/clients/jsonrpc-api#getblock.

Of course, the additional asks don't need to be in the same fix/issue, but wanted to give a heads up :)

@steveluscher
Copy link
Contributor Author

Yeah. I'm on it. The whole thing is a bigger mess than I could have imagined.

@ProfMoo
Copy link

ProfMoo commented Dec 1, 2022

Yeah. I'm on it. The whole thing is a bigger mess than I could have imagined.

Thanks! It makes sense there are some additional considerations. After I posted this request, I tried to @ts-ignore and force the request through, but ran into various deserialization errors. Looking forward to this PR getting merged in, I'll be able to use it immediately 👍

@steveluscher
Copy link
Contributor Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Community contribution
Projects
None yet
Development

No branches or pull requests

2 participants