2018-09-27 07:49:26 -07:00
|
|
|
[package]
|
2018-10-25 11:13:08 -07:00
|
|
|
name = "solana-sdk"
|
2021-10-06 19:23:58 -05:00
|
|
|
version = "1.8.1"
|
2018-10-25 11:13:08 -07:00
|
|
|
description = "Solana SDK"
|
2020-06-13 15:41:05 -06:00
|
|
|
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
|
2018-10-25 11:13:08 -07:00
|
|
|
repository = "https://github.com/solana-labs/solana"
|
2018-12-13 21:14:37 -08:00
|
|
|
homepage = "https://solana.com/"
|
2021-03-10 13:46:17 -07:00
|
|
|
documentation = "https://docs.rs/solana-sdk"
|
2021-06-23 14:22:35 -07:00
|
|
|
readme = "README.md"
|
2018-10-25 11:13:08 -07:00
|
|
|
license = "Apache-2.0"
|
2018-12-14 20:39:10 -08:00
|
|
|
edition = "2018"
|
2018-09-27 07:49:26 -07:00
|
|
|
|
2019-09-06 09:20:14 -07:00
|
|
|
[features]
|
2020-10-19 13:19:24 -07:00
|
|
|
# "program" feature is a legacy feature retained to support v1.3 and older
|
|
|
|
# programs. New development should not use this feature. Instead use the
|
2020-10-23 17:22:10 -07:00
|
|
|
# solana-program crate
|
2019-09-06 09:20:14 -07:00
|
|
|
program = []
|
2020-10-19 13:19:24 -07:00
|
|
|
|
2019-09-09 16:38:52 -07:00
|
|
|
default = [
|
2020-10-24 08:39:28 -07:00
|
|
|
"full" # functionality that is not compatible or needed for on-chain programs
|
2020-10-19 10:17:29 -07:00
|
|
|
]
|
2020-10-24 08:39:28 -07:00
|
|
|
full = [
|
2019-09-06 09:20:14 -07:00
|
|
|
"assert_matches",
|
|
|
|
"byteorder",
|
2020-02-24 14:55:08 -08:00
|
|
|
"chrono",
|
2020-04-28 09:43:48 -07:00
|
|
|
"generic-array",
|
2020-12-11 13:57:43 -07:00
|
|
|
"memmap2",
|
2019-09-06 09:20:14 -07:00
|
|
|
"rand",
|
2019-09-20 13:21:12 -07:00
|
|
|
"rand_chacha",
|
2019-09-06 09:20:14 -07:00
|
|
|
"serde_json",
|
2019-11-07 17:08:10 -08:00
|
|
|
"ed25519-dalek",
|
2021-05-03 19:58:56 -06:00
|
|
|
"ed25519-dalek-bip32",
|
2019-09-06 09:20:14 -07:00
|
|
|
"solana-logger",
|
2020-08-07 08:45:17 -06:00
|
|
|
"solana-crate-features",
|
2020-09-15 18:23:21 -07:00
|
|
|
"libsecp256k1",
|
|
|
|
"sha3",
|
|
|
|
"digest",
|
2019-09-06 09:20:14 -07:00
|
|
|
]
|
|
|
|
|
2018-09-27 07:49:26 -07:00
|
|
|
[dependencies]
|
Cost model 1.7 (#20188)
* Cost Model to limit transactions which are not parallelizeable (#16694)
* * Add following to banking_stage:
1. CostModel as immutable ref shared between threads, to provide estimated cost for transactions.
2. CostTracker which is shared between threads, tracks transaction costs for each block.
* replace hard coded program ID with id() calls
* Add Account Access Cost as part of TransactionCost. Account Access cost are weighted differently between read and write, signed and non-signed.
* Establish instruction_execution_cost_table, add function to update or insert instruction cost, unit tested. It is read-only for now; it allows Replay to insert realtime instruction execution costs to the table.
* add test for cost_tracker atomically try_add operation, serves as safety guard for future changes
* check cost against local copy of cost_tracker, return transactions that would exceed limit as unprocessed transaction to be buffered; only apply bank processed transactions cost to tracker;
* bencher to new banking_stage with max cost limit to allow cost model being hit consistently during bench iterations
* replay stage feed back program cost (#17731)
* replay stage feeds back realtime per-program execution cost to cost model;
* program cost execution table is initialized into empty table, no longer populated with hardcoded numbers;
* changed cost unit to microsecond, using value collected from mainnet;
* add ExecuteCostTable with fixed capacity for security concern, when its limit is reached, programs with old age AND less occurrence will be pushed out to make room for new programs.
* investigate system performance test degradation (#17919)
* Add stats and counter around cost model ops, mainly:
- calculate transaction cost
- check transaction can fit in a block
- update block cost tracker after transactions are added to block
- replay_stage to update/insert execution cost to table
* Change mutex on cost_tracker to RwLock
* removed cloning cost_tracker for local use, as the metrics show clone is very expensive.
* acquire and hold locks for block of TXs, instead of acquire and release per transaction;
* remove redundant would_fit check from cost_tracker update execution path
* refactor cost checking with less frequent lock acquiring
* avoid many Transaction_cost heap allocation when calculate cost, which
is in the hot path - executed per transaction.
* create hashmap with new_capacity to reduce runtime heap realloc.
* code review changes: categorize stats, replace explicit drop calls, concisely initiate to default
* address potential deadlock by acquiring locks one at time
* Persist cost table to blockstore (#18123)
* Add `ProgramCosts` Column Family to blockstore, implement LedgerColumn; add `delete_cf` to Rocks
* Add ProgramCosts to compaction excluding list alone side with TransactionStatusIndex in one place: `excludes_from_compaction()`
* Write cost table to blockstore after `replay_stage` replayed active banks; add stats to measure persist time
* Deletes program from `ProgramCosts` in blockstore when they are removed from cost_table in memory
* Only try to persist to blockstore when cost_table is changed.
* Restore cost table during validator startup
* Offload `cost_model` related operations from replay main thread to dedicated service thread, add channel to send execute_timings between these threads;
* Move `cost_update_service` to its own module; replay_stage is now decoupled from cost_model.
* log warning when channel send fails (#18391)
* Aggregate cost_model into cost_tracker (#18374)
* * aggregate cost_model into cost_tracker, decouple it from banking_stage to prevent accidental deadlock. * Simplified code, removed unused functions
* review fixes
* update ledger tool to restore cost table from blockstore (#18489)
* update ledger tool to restore cost model from blockstore when compute-slot-cost
* Move initialize_cost_table into cost_model, so the function can be tested and shared between validator and ledger-tool
* refactor and simplify a test
* manually fix merge conflicts
* Per-program id timings (#17554)
* more manual fixing
* solve a merge conflict
* featurize cost model
* more merge fix
* cost model uses compute_unit to replace microsecond as cost unit
(#18934)
* Reject blocks for costs above the max block cost (#18994)
* Update block max cost limit to fix performance regession (#19276)
* replace function with const var for better readability (#19285)
* Add few more metrics data points (#19624)
* periodically report sigverify_stage stats (#19674)
* manual merge
* cost model nits (#18528)
* Accumulate consumed units (#18714)
* tx wide compute budget (#18631)
* more manual merge
* ignore zerorize drop security
* - update const cost values with data collected by #19627
- update cost calculation to closely proposed fee schedule #16984
* add transaction cost histogram metrics (#20350)
* rebase to 1.7.15
* add tx count and thread id to stats (#20451)
each stat reports and resets when slot changes
* remove cost_model feature_set
* ignore vote transactions from cost model
Co-authored-by: sakridge <sakridge@gmail.com>
Co-authored-by: Jeff Biseda <jbiseda@gmail.com>
Co-authored-by: Jack May <jack@solana.com>
2021-10-06 15:11:41 -05:00
|
|
|
assert_matches = { version = "1.5.0", optional = true }
|
|
|
|
bincode = "1.3.3"
|
2021-09-03 22:35:38 +01:00
|
|
|
bytemuck = { version = "1.7.2", features = ["derive"] }
|
Cost model 1.7 (#20188)
* Cost Model to limit transactions which are not parallelizeable (#16694)
* * Add following to banking_stage:
1. CostModel as immutable ref shared between threads, to provide estimated cost for transactions.
2. CostTracker which is shared between threads, tracks transaction costs for each block.
* replace hard coded program ID with id() calls
* Add Account Access Cost as part of TransactionCost. Account Access cost are weighted differently between read and write, signed and non-signed.
* Establish instruction_execution_cost_table, add function to update or insert instruction cost, unit tested. It is read-only for now; it allows Replay to insert realtime instruction execution costs to the table.
* add test for cost_tracker atomically try_add operation, serves as safety guard for future changes
* check cost against local copy of cost_tracker, return transactions that would exceed limit as unprocessed transaction to be buffered; only apply bank processed transactions cost to tracker;
* bencher to new banking_stage with max cost limit to allow cost model being hit consistently during bench iterations
* replay stage feed back program cost (#17731)
* replay stage feeds back realtime per-program execution cost to cost model;
* program cost execution table is initialized into empty table, no longer populated with hardcoded numbers;
* changed cost unit to microsecond, using value collected from mainnet;
* add ExecuteCostTable with fixed capacity for security concern, when its limit is reached, programs with old age AND less occurrence will be pushed out to make room for new programs.
* investigate system performance test degradation (#17919)
* Add stats and counter around cost model ops, mainly:
- calculate transaction cost
- check transaction can fit in a block
- update block cost tracker after transactions are added to block
- replay_stage to update/insert execution cost to table
* Change mutex on cost_tracker to RwLock
* removed cloning cost_tracker for local use, as the metrics show clone is very expensive.
* acquire and hold locks for block of TXs, instead of acquire and release per transaction;
* remove redundant would_fit check from cost_tracker update execution path
* refactor cost checking with less frequent lock acquiring
* avoid many Transaction_cost heap allocation when calculate cost, which
is in the hot path - executed per transaction.
* create hashmap with new_capacity to reduce runtime heap realloc.
* code review changes: categorize stats, replace explicit drop calls, concisely initiate to default
* address potential deadlock by acquiring locks one at time
* Persist cost table to blockstore (#18123)
* Add `ProgramCosts` Column Family to blockstore, implement LedgerColumn; add `delete_cf` to Rocks
* Add ProgramCosts to compaction excluding list alone side with TransactionStatusIndex in one place: `excludes_from_compaction()`
* Write cost table to blockstore after `replay_stage` replayed active banks; add stats to measure persist time
* Deletes program from `ProgramCosts` in blockstore when they are removed from cost_table in memory
* Only try to persist to blockstore when cost_table is changed.
* Restore cost table during validator startup
* Offload `cost_model` related operations from replay main thread to dedicated service thread, add channel to send execute_timings between these threads;
* Move `cost_update_service` to its own module; replay_stage is now decoupled from cost_model.
* log warning when channel send fails (#18391)
* Aggregate cost_model into cost_tracker (#18374)
* * aggregate cost_model into cost_tracker, decouple it from banking_stage to prevent accidental deadlock. * Simplified code, removed unused functions
* review fixes
* update ledger tool to restore cost table from blockstore (#18489)
* update ledger tool to restore cost model from blockstore when compute-slot-cost
* Move initialize_cost_table into cost_model, so the function can be tested and shared between validator and ledger-tool
* refactor and simplify a test
* manually fix merge conflicts
* Per-program id timings (#17554)
* more manual fixing
* solve a merge conflict
* featurize cost model
* more merge fix
* cost model uses compute_unit to replace microsecond as cost unit
(#18934)
* Reject blocks for costs above the max block cost (#18994)
* Update block max cost limit to fix performance regession (#19276)
* replace function with const var for better readability (#19285)
* Add few more metrics data points (#19624)
* periodically report sigverify_stage stats (#19674)
* manual merge
* cost model nits (#18528)
* Accumulate consumed units (#18714)
* tx wide compute budget (#18631)
* more manual merge
* ignore zerorize drop security
* - update const cost values with data collected by #19627
- update cost calculation to closely proposed fee schedule #16984
* add transaction cost histogram metrics (#20350)
* rebase to 1.7.15
* add tx count and thread id to stats (#20451)
each stat reports and resets when slot changes
* remove cost_model feature_set
* ignore vote transactions from cost model
Co-authored-by: sakridge <sakridge@gmail.com>
Co-authored-by: Jeff Biseda <jbiseda@gmail.com>
Co-authored-by: Jack May <jack@solana.com>
2021-10-06 15:11:41 -05:00
|
|
|
borsh = "0.9.0"
|
2021-09-01 10:14:01 +01:00
|
|
|
base64 = "0.13"
|
Cost model 1.7 (#20188)
* Cost Model to limit transactions which are not parallelizeable (#16694)
* * Add following to banking_stage:
1. CostModel as immutable ref shared between threads, to provide estimated cost for transactions.
2. CostTracker which is shared between threads, tracks transaction costs for each block.
* replace hard coded program ID with id() calls
* Add Account Access Cost as part of TransactionCost. Account Access cost are weighted differently between read and write, signed and non-signed.
* Establish instruction_execution_cost_table, add function to update or insert instruction cost, unit tested. It is read-only for now; it allows Replay to insert realtime instruction execution costs to the table.
* add test for cost_tracker atomically try_add operation, serves as safety guard for future changes
* check cost against local copy of cost_tracker, return transactions that would exceed limit as unprocessed transaction to be buffered; only apply bank processed transactions cost to tracker;
* bencher to new banking_stage with max cost limit to allow cost model being hit consistently during bench iterations
* replay stage feed back program cost (#17731)
* replay stage feeds back realtime per-program execution cost to cost model;
* program cost execution table is initialized into empty table, no longer populated with hardcoded numbers;
* changed cost unit to microsecond, using value collected from mainnet;
* add ExecuteCostTable with fixed capacity for security concern, when its limit is reached, programs with old age AND less occurrence will be pushed out to make room for new programs.
* investigate system performance test degradation (#17919)
* Add stats and counter around cost model ops, mainly:
- calculate transaction cost
- check transaction can fit in a block
- update block cost tracker after transactions are added to block
- replay_stage to update/insert execution cost to table
* Change mutex on cost_tracker to RwLock
* removed cloning cost_tracker for local use, as the metrics show clone is very expensive.
* acquire and hold locks for block of TXs, instead of acquire and release per transaction;
* remove redundant would_fit check from cost_tracker update execution path
* refactor cost checking with less frequent lock acquiring
* avoid many Transaction_cost heap allocation when calculate cost, which
is in the hot path - executed per transaction.
* create hashmap with new_capacity to reduce runtime heap realloc.
* code review changes: categorize stats, replace explicit drop calls, concisely initiate to default
* address potential deadlock by acquiring locks one at time
* Persist cost table to blockstore (#18123)
* Add `ProgramCosts` Column Family to blockstore, implement LedgerColumn; add `delete_cf` to Rocks
* Add ProgramCosts to compaction excluding list alone side with TransactionStatusIndex in one place: `excludes_from_compaction()`
* Write cost table to blockstore after `replay_stage` replayed active banks; add stats to measure persist time
* Deletes program from `ProgramCosts` in blockstore when they are removed from cost_table in memory
* Only try to persist to blockstore when cost_table is changed.
* Restore cost table during validator startup
* Offload `cost_model` related operations from replay main thread to dedicated service thread, add channel to send execute_timings between these threads;
* Move `cost_update_service` to its own module; replay_stage is now decoupled from cost_model.
* log warning when channel send fails (#18391)
* Aggregate cost_model into cost_tracker (#18374)
* * aggregate cost_model into cost_tracker, decouple it from banking_stage to prevent accidental deadlock. * Simplified code, removed unused functions
* review fixes
* update ledger tool to restore cost table from blockstore (#18489)
* update ledger tool to restore cost model from blockstore when compute-slot-cost
* Move initialize_cost_table into cost_model, so the function can be tested and shared between validator and ledger-tool
* refactor and simplify a test
* manually fix merge conflicts
* Per-program id timings (#17554)
* more manual fixing
* solve a merge conflict
* featurize cost model
* more merge fix
* cost model uses compute_unit to replace microsecond as cost unit
(#18934)
* Reject blocks for costs above the max block cost (#18994)
* Update block max cost limit to fix performance regession (#19276)
* replace function with const var for better readability (#19285)
* Add few more metrics data points (#19624)
* periodically report sigverify_stage stats (#19674)
* manual merge
* cost model nits (#18528)
* Accumulate consumed units (#18714)
* tx wide compute budget (#18631)
* more manual merge
* ignore zerorize drop security
* - update const cost values with data collected by #19627
- update cost calculation to closely proposed fee schedule #16984
* add transaction cost histogram metrics (#20350)
* rebase to 1.7.15
* add tx count and thread id to stats (#20451)
each stat reports and resets when slot changes
* remove cost_model feature_set
* ignore vote transactions from cost model
Co-authored-by: sakridge <sakridge@gmail.com>
Co-authored-by: Jeff Biseda <jbiseda@gmail.com>
Co-authored-by: Jack May <jack@solana.com>
2021-10-06 15:11:41 -05:00
|
|
|
borsh-derive = "0.9.0"
|
|
|
|
bs58 = "0.4.0"
|
2020-03-18 21:37:21 -07:00
|
|
|
bv = { version = "0.11.1", features = ["serde"] }
|
2020-03-05 17:07:18 -07:00
|
|
|
byteorder = { version = "1.3.4", optional = true }
|
2020-02-24 14:55:08 -08:00
|
|
|
chrono = { version = "0.4", optional = true }
|
2020-08-05 16:35:54 -07:00
|
|
|
curve25519-dalek = { version = "2.1.0", optional = true }
|
2021-04-19 14:57:43 -06:00
|
|
|
derivation-path = { version = "0.1.3", default-features = false }
|
2021-04-29 01:42:21 -06:00
|
|
|
digest = { version = "0.9.0", optional = true }
|
|
|
|
ed25519-dalek = { version = "=1.0.1", optional = true }
|
2021-05-03 19:58:56 -06:00
|
|
|
ed25519-dalek-bip32 = { version = "0.1.1", optional = true }
|
2020-07-12 20:59:05 -06:00
|
|
|
generic-array = { version = "0.14.3", default-features = false, features = ["serde", "more_lengths"], optional = true }
|
2020-03-09 09:23:54 -06:00
|
|
|
hex = "0.4.2"
|
2021-01-22 22:25:22 -08:00
|
|
|
hmac = "0.10.1"
|
2020-10-19 13:19:24 -07:00
|
|
|
itertools = "0.9.0"
|
2020-10-28 20:21:50 -07:00
|
|
|
lazy_static = "1.4.0"
|
2021-07-16 07:38:45 +00:00
|
|
|
libsecp256k1 = { version = "0.5.0", optional = true }
|
2020-12-13 13:48:23 +09:00
|
|
|
log = "0.4.11"
|
2020-12-11 13:57:43 -07:00
|
|
|
memmap2 = { version = "0.1.0", optional = true }
|
2020-10-19 13:19:24 -07:00
|
|
|
num-derive = "0.3"
|
|
|
|
num-traits = "0.2"
|
2021-01-22 22:25:22 -08:00
|
|
|
pbkdf2 = { version = "0.6.0", default-features = false }
|
2021-04-29 01:42:21 -06:00
|
|
|
qstring = "0.7.2"
|
2020-04-27 09:33:33 -07:00
|
|
|
rand = { version = "0.7.0", optional = true }
|
|
|
|
rand_chacha = { version = "0.2.2", optional = true }
|
2021-02-15 14:30:43 -07:00
|
|
|
rand_core = "0.6.2"
|
2021-04-29 01:42:21 -06:00
|
|
|
rustversion = "1.0.4"
|
2021-02-05 19:23:24 +09:00
|
|
|
serde = "1.0.122"
|
2019-10-18 17:18:06 -07:00
|
|
|
serde_bytes = "0.11"
|
2019-11-26 14:44:20 -08:00
|
|
|
serde_derive = "1.0.103"
|
2020-07-14 00:01:52 +00:00
|
|
|
serde_json = { version = "1.0.56", optional = true }
|
2021-01-22 22:25:22 -08:00
|
|
|
sha2 = "0.9.2"
|
2021-04-29 01:42:21 -06:00
|
|
|
sha3 = { version = "0.9.1", optional = true }
|
2021-10-06 19:23:58 -05:00
|
|
|
solana-crate-features = { path = "../crate-features", version = "=1.8.1", optional = true }
|
|
|
|
solana-logger = { path = "../logger", version = "=1.8.1", optional = true }
|
|
|
|
solana-frozen-abi = { path = "../frozen-abi", version = "=1.8.1" }
|
|
|
|
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.8.1" }
|
|
|
|
solana-program = { path = "program", version = "=1.8.1" }
|
|
|
|
solana-sdk-macro = { path = "macro", version = "=1.8.1" }
|
2021-04-29 01:42:21 -06:00
|
|
|
thiserror = "1.0"
|
|
|
|
uriparse = "0.6.3"
|
2019-11-22 10:20:40 -05:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2020-07-30 18:11:16 -06:00
|
|
|
curve25519-dalek = "2.1.0"
|
2021-09-25 16:48:42 +00:00
|
|
|
tiny-bip39 = "0.8.1"
|
2020-04-16 18:18:28 -07:00
|
|
|
|
2020-06-03 20:51:56 +09:00
|
|
|
[build-dependencies]
|
|
|
|
rustc_version = "0.2"
|
2020-10-19 13:19:24 -07:00
|
|
|
|
|
|
|
[package.metadata.docs.rs]
|
|
|
|
targets = ["x86_64-unknown-linux-gnu"]
|