Commit Graph

85 Commits

Author SHA1 Message Date
Alexander Meißner ee2c2ef6c7
Cleanup - require_static_program_ids_in_transaction (#31767)
require_static_program_ids_in_transaction
2023-06-07 17:12:41 +02:00
Steven Luscher bc4d53c7ff
fix: `addressTableLookups` no longer serialized unless version set (#31729) 2023-05-22 10:29:18 -07:00
Illia Bobyr 43c0f05ca0
Bumps base64 from 0.13.1 to 0.21.0. (#31522)
Changes:

  marshallpierce/rust-base64@v0.13.1...v0.21.0

`base64::{encode,decode}` are now deprecated in favor of an API that
explicitly selects an `Engine`.  Migrated all calls to the new API.
2023-05-11 11:34:58 -07:00
Yihau Chen 94cb88ffad
add solana-ledger-tool bigtable copy (#28122)
* init copy cmd

* extract creating emulator connection logic

* extract copy args as struct

* add new_for_emulator

* add tryFrom confirmed block to versioned block

* implement bigtable copy command

* use 'force' flag to force upload

* use unwrap_or

* remove redundant importing

* fix nightly lint

* explicit transactions missing error

* process ending_slot

* prevent start slot > end slot

* print skip slots in debug level

* fix destination bigtable should not be readonly

* combine is-emulator and endpoint to emulated source. conflict with crenditial path

* wording

* log some error messages with error level

* nightly lint

* add dry-run

* extract create bigtable instances logic

* use a lighter way to check block

* use the latest futures version which is used in the repo

* use futures = "0.3"

Co-authored-by: Tyera <teulberg@gmail.com>

* wording

Co-authored-by: Tyera <teulberg@gmail.com>

* wording

Co-authored-by: Tyera <teulberg@gmail.com>

Co-authored-by: Tyera <teulberg@gmail.com>
2023-01-09 11:23:35 +08:00
behzad nouri 9524c9dbff patches errors from clippy::uninlined_format_args
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
2022-12-06 19:32:15 +00:00
Brooks Prumo d1ba42180d
clippy for rust 1.65.0 (#28765) 2022-11-09 19:39:38 +00:00
Justin Starry 2d8665d307
Record inner instruction stack height (#28430)
* Record inner instruction stack height

* fix sbf tests

* feedback
2022-10-26 10:37:44 +08:00
Tyera Eulberg 973a5fb0e9
Add new TransactionDetails level (#27601)
* Add new transaction details level

* Dedupe common code

* Update docs

* Respect showRewards parameter in tx meta
2022-09-15 10:00:30 -06:00
Tyera Eulberg 360ca07a40
Add serialization-control enum for RPC Options (#27676)
* Add test to verify output when deserializing/reserializing empty fields

* Add test to verify serialization from UiTransactionStatusMeta constructors

* Add OptionSerializer

* Use OptionSerializer for inner_instructions

* Use OptionSerializer for loaded_addresses

* Remove Default variant, use into instead

* Add as_ref implementation

* Use OptionSerializer for log_messages and rewards

* Use OptionSerializer for token_balances

* Use OptionSerializer for return_data

* Use OptionSerializer for compute_units_consumed
2022-09-14 16:58:50 -06:00
Tyera Eulberg 0bfc188375
Update getBlock/getTransaction rpc handling of return_data (#27672)
* Move return_data type to transaction-status crate

* Use UiTransactionReturnData in UiTransactionStatusMeta

* Fixup display handling

* Update docs
2022-09-08 21:10:57 +00:00
Tyera Eulberg 54284955de
Respect rewards parameter in getBlock transaction-level rewards (#27655)
* Respect options.show_rewards in UiTransactionStatusMeta

* Fixup docs
2022-09-08 10:17:02 -06:00
Tyera Eulberg 1df8830790
Skip loadedAddresses for jsonParsed tx meta (#27618)
Skip loaded_addresses for jsonParsed tx meta
2022-09-07 09:41:08 -06:00
Justin Starry c620b7b34f
RPC: include resolved keys from table lookups in parsed message response (#27552)
* RPC: include resolved keys from table lookups in parsed message response

* Add source to ParsedAccount

* Ensure that rpc client can parse account meta from old api versions
2022-09-06 10:40:39 -05:00
Tyera Eulberg 62eebe6e6d
Parse address-lookup-table instructions (#27316)
* Parse address-lookup-table instructions

* Finish extend instruction handling

* Rename payer, recipient

* Update docs parsing status
2022-08-24 10:17:53 -06:00
Kevin Heavey a7883c19e9
add missing derives (#27311)
* add missing derives

* undo some impossible Eqs

* derive Clone for UiConfirmedBlock

* add missing clones

Co-authored-by: Kevin Heavey <ID+username@users.noreply.github.com>
2022-08-23 00:12:32 +00:00
Richard Patel 270315a7f6
transaction-status, storage-proto: add compute_units_consumed (#26528)
* transaction-status, storage-proto: add compute_units_consumed

* fix bpf test

Co-authored-by: Justin Starry <justin@solana.com>
2022-08-06 17:14:31 +00:00
Tyera Eulberg 2dca239480
Remove runtime dependency from solana-transaction-status (#26930)
* Move RewardType out of runtime

* Move collect_token_balances to solana-ledger

* Remove solana-runtime dependency
2022-08-05 00:20:27 -06:00
Michael Vines 9c20a06068 Remove unused lifetime 2022-05-22 22:22:21 -07:00
Michael Vines b05c7d91ed Fix derive_partial_eq_without_eq clippy lint 2022-05-22 22:22:21 -07:00
Justin Starry 082502d4f3
Fail tx sanitization when ix program id uses lookup table (#25035)
* Fail tx sanitization when ix program id uses lookup table

* feedback
2022-05-07 03:19:50 +08:00
Tyera Eulberg 77f6ec5625
Add program_id to TokenBalances structs (#24513)
* Add program_id to TokenBalances structs

* Update docs
2022-04-19 22:01:22 -06:00
Jon Cinque 7af48465fa
transaction-status: Add return data to meta (#23688)
* transaction-status: Add return data to meta

* Add return data to simulation results

* Use pretty-hex for printing return data

* Update arg name, make TransactionRecord struct

* Rename TransactionRecord -> ExecutionRecord
2022-03-22 23:17:05 +01:00
Justin Starry 0eccacbd5b
Add CLI support for versioned transactions (#23606) 2022-03-17 11:43:04 +08:00
Justin Starry 249d926d1b
Refactor: Add transaction binary encoding enum (#23546) 2022-03-09 16:09:08 +08:00
Justin Starry 3114c199bd
Add RPC support for versioned transactions (#22530)
* Add RPC support for versioned transactions

* fix doc tests

* Add rpc test for versioned txs

* Switch to preflight bank
2022-03-08 15:20:34 +08:00
Justin Starry d5dec989b9
Enforce tx metadata upload with static types (#23028) 2022-02-10 13:28:18 +08:00
Justin Starry ba215e94f6
Refactor: Add AccountKeys struct for static and dynamic message keys (#22960) 2022-02-05 20:00:31 +08:00
Michael Vines 6d5bbca630 Pacify clippy 2022-01-21 19:12:57 -08:00
Justin Starry f804ccdece
Store address table lookups in blockstore and bigtable (#22402) 2022-01-14 15:24:41 +08:00
Justin Starry 2a00382d71
Refactor: cleanup solana_transaction_status crate (#22230) 2022-01-03 15:45:18 +00:00
Justin Starry ce6c76e45f
Remove unused serialization attributes from transaction status types (#22228) 2022-01-03 16:20:57 +08:00
segfaultdoctor 76098dd42a
RPC Block Subscription (#21787)
* add stuff

* compiling

* add notify block

* wip

* feat: add blockSubscribe pubsub method

* address PR comments

Co-authored-by: Lucas B <buffalu@jito.network>
Co-authored-by: Zano <segfaultdoctor@protonmail.com>
2021-12-17 16:03:09 -07:00
Tyera Eulberg e806fa6904
Include token owners in TransactionTokenBalances (#20642)
* Cache owners in TransactionTokenBalances

* Light cleanup

* Use return struct, and remove pub

* Single-use statements

* Why not, just do the whole crate

* Add metrics

* Make datapoint_debug to prevent spam unless troubleshooting
2021-10-13 21:46:52 -06:00
Tyera Eulberg f4ae450f34
Populate memo in bigtable transaction structs (#19512)
* Populate memo in bigtable transaction structs

* Preface memos with len
2021-08-30 21:14:18 -06:00
Michael Vines 33718e5fb4 Drop default_on_eof attribute from Reward struct 2021-07-14 19:17:04 +00:00
Michael Vines 4098af3b5b Record vote account commission with voting/staking rewards and surface in RPC 2021-07-12 15:09:44 -07:00
Tyera Eulberg ab581dafc2
Add block height to ConfirmedBlock structs (#17523)
* Add BlockHeight CF to blockstore

* Rename CacheBlockTimeService to be more general

* Cache block-height using service

* Fixup previous proto mishandling

* Add block_height to block structs

* Add block-height to solana block

* Fallback to BankForks if block time or block height are not yet written to Blockstore

* Add docs

* Review comments
2021-05-26 22:16:16 -06:00
Michael Vines 9541411c15 Plumb transaction-level rewards (aka "rent debits") into the `getTransaction` RPC method 2021-05-27 03:05:05 +00:00
Tyera Eulberg a902505810
Parse SPL associated-token-account instructions (#16318) 2021-04-01 22:48:05 +00:00
Tyera Eulberg 433f1ead1c
Rpc: enable getConfirmedBlock and getConfirmedTransaction to return confirmed (not yet finalized) data (#16142)
* Add Blockstore block and tx apis that allow unrooted responses

* Add TransactionStatusMessage, and send on bank freeze; also refactor TransactionStatusSender

* Track highest slot with tx-status writes complete

* Rename and unpub fn

* Add commitment to GetConfirmed input configs

* Support confirmed blocks in getConfirmedBlock

* Support confirmed txs in getConfirmedTransaction

* Update sigs-for-addr2 comment

* Enable confirmed block in cli

* Enable confirmed transaction in cli

* Review comments

* Rename blockstore method
2021-03-26 16:47:35 -06:00
Tyera Eulberg aa54c468ea
rpc: Add config options limiting getConfirmedBlock response data (#15970)
* Add new confirmed block struct

* Add RpcConfirmedBlockConfig options

* Configure block response based on new options

* Add client api, use in cli fetch_epoch_rewards

* Update docs

* Apply review suggestions
2021-03-18 17:58:20 +00:00
Trent Nelson 7f7370c306 Re-allow clippy::integer_arithmetic at crate-level 2021-02-17 13:55:08 -07:00
Tyera Eulberg ffa5c7dcc8
Deprecate commitment variants (#14797)
* Deprecate commitment variants

* Add new CommitmentConfig builders

* Add helpers to avoid allowing deprecated variants

* Remove deprecated transaction-status code

* Include new commitment variants in runtime commitment; allow deprecated as long as old variants persist

* Remove deprecated banks code

* Remove deprecated variants in core; allow deprecated in rpc/rpc-subscriptions for now

* Heavier hand with rpc/rpc-subscription commitment

* Remove deprecated variants from local-cluster

* Remove deprecated variants from various tools

* Remove deprecated variants from validator

* Update docs

* Remove deprecated client code

* Add new variants to cli; remove deprecated variants as possible

* Don't send new commitment variants to old clusters

* Retain deprecated method in test_validator_saves_tower

* Fix clippy matches! suggestion for BPF solana-sdk legacy compile test

* Refactor node version check to handle commitment variants and transaction encoding

* Hide deprecated variants from cli help

* Add cli App comments
2021-01-26 19:23:07 +00:00
Michael Vines e9b5d65f40 `solana decode-transaction` no longer panics on unsanitary transactions 2021-01-20 23:59:32 -08:00
Josh 1de6d28eaf
Add block_time to getConfirmedSignaturesForAddress2 and getConfirmedTransaction (#14572)
* add block_time to get_confirmed_signatures_for_address2 and protobuf implementation for tx_by_addr

* add tests for convert

* update cargo lock

* run cargo format after rebase

* introduce legacy TransactionByAddrInfo

* move LegacyTransactionByAddrInfo back to storage-bigtable
2021-01-20 22:10:35 -08:00
Tyera Eulberg 0e87572eb0
Return confirmation-status (#14709) 2021-01-20 18:32:48 -07:00
Jack May e3bd9e5300
Prevent the invoke and upgrade of programs in the same tx batch (#14653)
* Prevent the invoke and upgrade of programs in the same tx batch

* Pass program address as writable in the upgrade instruction
2021-01-19 16:24:44 -08:00
Tyera Eulberg 9a89689ad3
Use optimistic confirmation in getSignatureStatuses, and various downstream client methods (#14430)
* Add optimistically_confirmed field to TransactionStatus

* Update docs

* Convert new field to confirmation_status

* Update docs to confirmationStatus

* Update variants

* Update docs

* Just Confirmed
2021-01-15 16:05:05 +00:00
Josh 13db3eca9f
SPL token balance in transaction metadata (#13673)
* feat: store pre / post token balances

* move helper functions into separate include

* move token balance functionality to transaction-status crate

* fix blockstore processor test

* fix bigtable legacy test

* add caching to decimals
2020-12-10 19:25:07 -08:00
Tyera Eulberg c4962af9eb
Parse vote instructions (#13202) 2020-10-27 17:53:17 -06:00