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 replacementBlockhash to the simulation return type, in preparation for Agave 2.0 #2870

Conversation

steveluscher
Copy link
Collaborator

Summary

When you ask the simulator to replaceRecentBlockhash, you may like to know what the replacement blockhash was. Agave 2.0 will return it in the simulation result.

It would have been nice to only include this property when replaceRecentBlockhash is explicitly true, but I would have had to duplicate all of the overloads for the purpose, yielding 32 in total.

Copy link

changeset-bot bot commented Jun 27, 2024

⚠️ No Changeset found

Latest commit: c99533c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@steveluscher steveluscher force-pushed the 06-27-add_replacementblockhash_to_the_simulation_return_type_in_preparation_for_agave_2.0 branch from a8d46c8 to a7187f8 Compare June 27, 2024 22:15
@steveluscher steveluscher force-pushed the 06-27-you_can_now_request_innerinstructions_with_simulation branch from 7c30ca8 to 8cc8346 Compare June 28, 2024 00:20
@steveluscher steveluscher force-pushed the 06-27-add_replacementblockhash_to_the_simulation_return_type_in_preparation_for_agave_2.0 branch from a7187f8 to 07a10c8 Compare June 28, 2024 00:20
Comment on lines +95 to +99
// TODO(https://github.com/solana-labs/solana-web3.js/issues/2869): Make it so that
// `replacementBlockhash` only appears on the return type when `replaceRecentBlockhash` is set
// to `true` in the call to `simulateTransaction`.
/** The blockhash that was used to simulate the transaction when `replaceRecentBlockhash` is `true` */
replacementBlockhash?: Blockhash;
Copy link
Collaborator

Choose a reason for hiding this comment

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

RIP. 🪦

Copy link
Collaborator Author

steveluscher commented Jun 28, 2024

Merge activity

  • Jun 27, 5:34 PM PDT: @steveluscher started a stack merge that includes this pull request via Graphite.
  • Jun 27, 5:40 PM PDT: Graphite rebased this pull request as part of a merge.
  • Jun 27, 5:41 PM PDT: @steveluscher merged this pull request with Graphite.

@steveluscher steveluscher force-pushed the 06-27-you_can_now_request_innerinstructions_with_simulation branch from 8cc8346 to 5fa6c60 Compare June 28, 2024 00:37
Base automatically changed from 06-27-you_can_now_request_innerinstructions_with_simulation to master June 28, 2024 00:39
@steveluscher steveluscher force-pushed the 06-27-add_replacementblockhash_to_the_simulation_return_type_in_preparation_for_agave_2.0 branch from 07a10c8 to c99533c Compare June 28, 2024 00:39
@steveluscher steveluscher merged commit bcfead5 into master Jun 28, 2024
6 checks passed
@steveluscher steveluscher deleted the 06-27-add_replacementblockhash_to_the_simulation_return_type_in_preparation_for_agave_2.0 branch June 28, 2024 00:41
Copy link
Contributor

🎉 This PR is included in version 1.94.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants