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

RPC: Support versioned txs in getFeeForMessage API #28217

Merged
merged 2 commits into from
Oct 4, 2022

Conversation

jstarry
Copy link
Contributor

@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
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
@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 <teulberg@gmail.com>

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(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 <teulberg@gmail.com>

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(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 <justin@solana.com>
@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 <teulberg@gmail.com>

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(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 <teulberg@gmail.com>

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(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 <teulberg@gmail.com>

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(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 <justin@solana.com>
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 <teulberg@gmail.com>

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(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 <justin@solana.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants