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

RPC: Support versioned txs in getFeeForMessage API #28217

Merged
merged 2 commits into from
Oct 4, 2022

Conversation

jstarry
Copy link
Member

@jstarry jstarry commented Oct 4, 2022

Problem

The getFeeForMessage RPC API and the equivalent RPC client method get_fee_for_message both do not support versioned messages yet.

Summary of Changes

  • Add support for versioned messages in the getFeeForMessage RPC API
  • Add support for versioned messages through the new SerializableMessage trait in the get_fee_for_message RPC client api
  • Refactor AddressLoader to make it usable inside solana-program
  • Remove pre v1.9 handling in RPC client since no clusters are running v1.8 or earlier

Fixes #28182
Fixes #28214

@jstarry jstarry added the v1.14 label Oct 4, 2022
@jstarry jstarry requested a review from CriesofCarrots October 4, 2022 11:50
@jstarry jstarry force-pushed the fix/fee-for-message branch from 134113a to 04495f4 Compare October 4, 2022 12:16
sdk/program/src/message/sanitized.rs Outdated Show resolved Hide resolved
rpc-client/src/nonblocking/rpc_client.rs Show resolved Hide resolved
@jstarry jstarry merged commit ddf95c1 into solana-labs:master Oct 4, 2022
@jstarry jstarry deleted the fix/fee-for-message branch October 4, 2022 16:00
mergify bot pushed a commit that referenced this pull request Oct 4, 2022
* RPC: Support versioned txs in getFeeForMessage API

* Update sdk/program/src/message/sanitized.rs

Co-authored-by: Tyera Eulberg <[email protected]>

Co-authored-by: Tyera Eulberg <[email protected]>
(cherry picked from commit ddf95c1)

# Conflicts:
#	client/src/rpc_client.rs
#	rpc/src/rpc.rs
#	runtime/src/bank/address_lookup_table.rs
#	sdk/src/transaction/sanitized.rs
mergify bot added a commit that referenced this pull request Oct 4, 2022
…28221)

* RPC: Support versioned txs in getFeeForMessage API (#28217)

* RPC: Support versioned txs in getFeeForMessage API

* Update sdk/program/src/message/sanitized.rs

Co-authored-by: Tyera Eulberg <[email protected]>

Co-authored-by: Tyera Eulberg <[email protected]>
(cherry picked from commit ddf95c1)

# Conflicts:
#	client/src/rpc_client.rs
#	rpc/src/rpc.rs
#	runtime/src/bank/address_lookup_table.rs
#	sdk/src/transaction/sanitized.rs

* resolve conflicts

Co-authored-by: Justin Starry <[email protected]>
@jstarry jstarry added the v1.13 label Oct 6, 2022
mergify bot pushed a commit that referenced this pull request Oct 6, 2022
* RPC: Support versioned txs in getFeeForMessage API

* Update sdk/program/src/message/sanitized.rs

Co-authored-by: Tyera Eulberg <[email protected]>

Co-authored-by: Tyera Eulberg <[email protected]>
(cherry picked from commit ddf95c1)

# Conflicts:
#	client/src/nonblocking/rpc_client.rs
#	client/src/rpc_client.rs
#	programs/address-lookup-table/src/error.rs
#	rpc/src/rpc.rs
#	runtime/src/bank/address_lookup_table.rs
#	sdk/src/transaction/sanitized.rs
mergify bot pushed a commit that referenced this pull request Oct 6, 2022
* RPC: Support versioned txs in getFeeForMessage API

* Update sdk/program/src/message/sanitized.rs

Co-authored-by: Tyera Eulberg <[email protected]>

Co-authored-by: Tyera Eulberg <[email protected]>
(cherry picked from commit ddf95c1)

# Conflicts:
#	client/src/nonblocking/rpc_client.rs
#	client/src/rpc_client.rs
#	programs/address-lookup-table/src/error.rs
#	rpc/src/rpc.rs
#	runtime/src/bank/address_lookup_table.rs
#	sdk/src/transaction/sanitized.rs
mergify bot added a commit that referenced this pull request Oct 6, 2022
…28256)

* RPC: Support versioned txs in getFeeForMessage API (#28217)

* RPC: Support versioned txs in getFeeForMessage API

* Update sdk/program/src/message/sanitized.rs

Co-authored-by: Tyera Eulberg <[email protected]>

Co-authored-by: Tyera Eulberg <[email protected]>
(cherry picked from commit ddf95c1)

# Conflicts:
#	client/src/nonblocking/rpc_client.rs
#	client/src/rpc_client.rs
#	programs/address-lookup-table/src/error.rs
#	rpc/src/rpc.rs
#	runtime/src/bank/address_lookup_table.rs
#	sdk/src/transaction/sanitized.rs

* resolve conflicts

* fix bad conflict resolution

Co-authored-by: Justin Starry <[email protected]>
mergify bot added a commit that referenced this pull request Oct 6, 2022
…28257)

* RPC: Support versioned txs in getFeeForMessage API (#28217)

* RPC: Support versioned txs in getFeeForMessage API

* Update sdk/program/src/message/sanitized.rs

Co-authored-by: Tyera Eulberg <[email protected]>

Co-authored-by: Tyera Eulberg <[email protected]>
(cherry picked from commit ddf95c1)

# Conflicts:
#	client/src/nonblocking/rpc_client.rs
#	client/src/rpc_client.rs
#	programs/address-lookup-table/src/error.rs
#	rpc/src/rpc.rs
#	runtime/src/bank/address_lookup_table.rs
#	sdk/src/transaction/sanitized.rs

* resolve conflicts

* fix bad conflict resolution

Co-authored-by: Justin Starry <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants