mergify[bot]
b354dae249
Perf: Only check executors cache for executable bpf program ids (backport #22624 ) ( #22629 )
...
* Perf: Only check executors cache for executable bpf program ids (#22624 )
* Only check executors cache for executable bpf program ids
* switch to native loader check
* clean up tests
* fix tests
* clippy
(cherry picked from commit 7d34a7acac
)
# Conflicts:
# runtime/src/bank.rs
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-22 14:08:15 +08:00
Trent Nelson
8bc4cc90d2
Bump version to 1.9.6
2022-01-21 20:15:43 -07:00
mergify[bot]
187ed6a387
Remove unused fields from Bank (backport #22491 ) ( #22630 )
...
* Remove unused fields from Bank (#22491 )
(cherry picked from commit 9977396d8f
)
# Conflicts:
# runtime/src/serde_snapshot/future.rs
* fixup the backport
Co-authored-by: Brooks Prumo <brooks@solana.com >
2022-01-22 00:13:32 +00:00
mergify[bot]
91bc44931f
Add hidden cli option to allow validator reports replayed transaction cost metrics (backport #22369 ) ( #22519 )
...
* Add hidden cli option to allow validator reports replayed transaction cost metrics (#22369 )
* add hidden cli option to allow validator reports replayed transaction cost detail metrics
* Update validator/src/main.rs
Co-authored-by: Michael Vines <mvines@gmail.com >
* - rebase master, using unbounded instead of channel; dowgrade to datapoint_trace
* removed cli arg, prefer log at trace
Co-authored-by: Michael Vines <mvines@gmail.com >
(cherry picked from commit a724fa2347
)
# Conflicts:
# core/src/tvu.rs
* fix conflict
Co-authored-by: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com >
Co-authored-by: Tao Zhu <tao@solana.com >
2022-01-21 15:05:41 -07:00
mergify[bot]
2ddb5b27c1
Refactor: move instructions sysvar serialization out of Message ( #22544 ) ( #22595 )
...
(cherry picked from commit 7ba57e7a7c
)
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-21 13:45:47 +08:00
mergify[bot]
7f10fd6a21
Refactor: move compute budget runtime logic into solana-program-runtime (backport #22543 ) ( #22545 )
...
* Refactor: move compute budget runtime logic into solana-program-runtime (#22543 )
(cherry picked from commit cc76a73c49
)
# Conflicts:
# programs/bpf/tests/programs.rs
# sdk/src/compute_budget.rs
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-21 13:45:01 +08:00
mergify[bot]
59f406d78a
Refactor: move simple vote parsing to runtime (backport #22537 ) ( #22587 )
...
* Refactor: move simple vote parsing to runtime (#22537 )
(cherry picked from commit 7f20c6149e
)
# Conflicts:
# core/src/cluster_info_vote_listener.rs
# core/src/verified_vote_packets.rs
# programs/vote/src/vote_transaction.rs
# rpc/src/rpc_subscriptions.rs
# runtime/src/bank.rs
# runtime/src/bank_utils.rs
# runtime/src/vote_sender_types.rs
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-20 04:51:50 +00:00
mergify[bot]
dbf9a32883
Optimize packet dedup ( #22571 ) ( #22585 )
...
* Use bloom filter to dedup packets
* dedup first
* Update bloom/src/bloom.rs
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com >
* Update core/src/sigverify_stage.rs
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com >
* Update core/src/sigverify_stage.rs
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com >
* Update core/src/sigverify_stage.rs
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com >
* fixup
* fixup
* fixup
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com >
(cherry picked from commit d343713f61
)
# Conflicts:
# Cargo.lock
# core/Cargo.toml
# core/src/banking_stage.rs
# core/src/sigverify_stage.rs
# gossip/Cargo.toml
# perf/Cargo.toml
# programs/bpf/Cargo.lock
# runtime/Cargo.toml
Co-authored-by: anatoly yakovenko <anatoly@solana.com >
2022-01-20 02:51:49 +00:00
mergify[bot]
4079f12a3e
Perf: Store deserialized sysvars in the sysvars cache (backport #22455 ) ( #22480 )
...
* Perf: Store deserialized sysvars in the sysvars cache (#22455 )
* Perf: Store deserialized sysvars in sysvars cache
* add bench
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-15 08:48:34 +00:00
Tao Zhu
054e475c6c
ABI changed - added two more vote_cost related fields to cost_tracker
2022-01-14 10:49:43 -06:00
Tao Zhu
7a421fe602
Port counting vote CUs to block cost to v1.9
2022-01-14 10:49:43 -06:00
mergify[bot]
a6b7a3b7ff
Refactor: move sysvar cache to new module (backport #22448 ) ( #22461 )
...
* Refactor: move sysvar cache to new module
(cherry picked from commit 7171c95bdd
)
# Conflicts:
# Cargo.lock
# program-runtime/Cargo.toml
# program-runtime/src/invoke_context.rs
# programs/bpf/Cargo.lock
# programs/bpf_loader/src/syscalls.rs
# programs/stake/src/stake_instruction.rs
# programs/vote/src/vote_instruction.rs
# runtime/src/message_processor.rs
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-14 08:43:26 +00:00
mergify[bot]
9d69f2b324
Bank::get_fee_for_message
is now nonce aware (backport #22494 ) ( #22499 )
...
* `Bank::get_fee_for_message` is now nonce aware
(cherry picked from commit 4c577d7f8c
)
# Conflicts:
# runtime/src/bank.rs
# sdk/program/src/message/sanitized.rs
* Resolve conflicts
Co-authored-by: Michael Vines <mvines@gmail.com >
2022-01-14 03:25:10 +00:00
Tyera Eulberg
34984ed16e
v1.9: Only examine explicit tx accounts for rent state ( #22442 )
...
* Add failing test
* Fix: only examine accounts explicitly included in a tx
2022-01-11 20:55:10 -07:00
mergify[bot]
58dcc451a9
Prevent rent-paying account creation (backport #22292 ) ( #22428 )
...
* Prevent rent-paying account creation (#22292 )
* Fixup typo
* Add new feature
* Add new TransactionError
* Add framework for checking account state before and after transaction processing
* Fail transactions that leave new rent-paying accounts
* Only check rent-state of writable tx accounts
* Review comments: combine process_result success behavior; log and metrics before feature activation
* Fix tests that assume rent-exempt accounts are okay
* Remove test no longer relevant
* Remove native/sysvar special case
* Move metrics submission to report legacy->legacy rent paying transitions as well
(cherry picked from commit 637e366b18
)
# Conflicts:
# runtime/src/bank.rs
# runtime/src/lib.rs
* Fix conflicts and rework for TransactionRefCells
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2022-01-11 23:17:03 +00:00
mergify[bot]
f0695ef6d9
optimizes ReadOnlyAccountsCache LRU eviction implementation (backport #22403 ) ( #22426 )
...
* optimizes ReadOnlyAccountsCache LRU eviction implementation (#22403 )
ReadOnlyAccountsCache is using a background thread, table scan and sort
to implement LRU eviction policy:
https://github.com/solana-labs/solana/blob/eaa52bc93/runtime/src/read_only_accounts_cache.rs#L66-L73
https://github.com/solana-labs/solana/blob/eaa52bc93/runtime/src/read_only_accounts_cache.rs#L186-L191
https://github.com/solana-labs/solana/blob/eaa52bc93/runtime/src/read_only_accounts_cache.rs#L222
DashMap internally locks each shard when accessed; so a table scan in
the background thread can create a lot of lock contention.
This commit adds an index-list queue containing cached keys in the order
that they are accessed. Each hash-map entry also includes its index into
this queue.
When an item is first entered into the cache, it is added to the end of
the queue. Also each time an entry is looked up from the cache it is
moved to the end of queue. As a result, items in the queue are always
sorted in the order that they have last been accessed. When doing LRU
eviction, cache entries are evicted from the front of the queue.
Using index-list, all queue operations above are O(1) with low overhead
and so above achieves an efficient implementation of LRU cache eviction
policy.
(cherry picked from commit a49ef49f87
)
# Conflicts:
# Cargo.lock
# programs/bpf/Cargo.lock
# runtime/Cargo.toml
# runtime/src/accounts_db.rs
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2022-01-11 19:09:57 +00:00
mergify[bot]
133314e58c
bank: fix executor cache metrics ( #22396 )
...
(cherry picked from commit 3b4aad9df1
)
Co-authored-by: Trent Nelson <trent@solana.com >
2022-01-09 06:06:35 +00:00
Trent Nelson
cb49ae21b4
Bump version to v1.9.5
2022-01-08 21:17:51 +00:00
mergify[bot]
8ce65878da
improve multi executor cache addition ( #22382 )
...
Co-authored-by: Jack May <jack@solana.com >
2022-01-08 13:03:46 +00:00
mergify[bot]
7cb147fdcd
Executor cache count primer (backport #22333 ) ( #22375 )
...
* bank: prime new executor cache entry use-counts
(cherry picked from commit 4ce48307bb
)
* --amend
(cherry picked from commit ad3cb0bc93
)
Co-authored-by: Trent Nelson <trent@solana.com >
2022-01-08 11:01:34 +00:00
mergify[bot]
50e716fc80
bank: Add executors cache metrics ( #22368 )
...
(cherry picked from commit 6d76db1de5
)
Co-authored-by: Trent Nelson <trent@solana.com >
2022-01-08 01:34:53 +00:00
Justin Starry
1f00926874
Add runtime support for address table lookups (backport #22223 ) ( #22354 )
2022-01-08 07:57:04 +08:00
mergify[bot]
662c6be51e
removes CowCachedExecutors ( #22343 ) ( #22363 )
...
Copy-on-write semantics for cached executors can be implemented by a
simple Arc<CachedExecutors> as opposed to CowCachedExecutors:
https://github.com/solana-labs/solana/blob/f1e2598ba/runtime/src/bank.rs#L244-L247
This will also avoid the need for double locking as in:
https://github.com/solana-labs/solana/blob/f1e2598ba/runtime/src/bank.rs#L3490-L3491
https://github.com/solana-labs/solana/blob/f1e2598ba/runtime/src/bank.rs#L3525-L3526
(cherry picked from commit c2389fc209
)
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2022-01-07 16:04:13 +00:00
mergify[bot]
7b1da62763
Add execute metrics (backport #22296 ) ( #22335 )
...
* move `ExecuteTimings` from `runtime::bank` to `program_runtime::timings`
(cherry picked from commit 7d32909e17
)
# Conflicts:
# core/Cargo.toml
# ledger/Cargo.toml
# programs/bpf/Cargo.lock
* Add execute metrics
(cherry picked from commit b25e4a200b
)
* Add metrics for executor creation
(cherry picked from commit 848b6dfbdd
)
* Add helper macro for `AddAssign`ing with saturating arithmetic
(cherry picked from commit deb9344e49
)
* Use saturating_add_assign macro
(cherry picked from commit 72fc6096a0
)
* Consolidate process instruction execution timings to own struct
(cherry picked from commit 390ef0fbcd
)
Co-authored-by: Trent Nelson <trent@solana.com >
Co-authored-by: Carl Lin <carl@solana.com >
2022-01-07 09:11:18 +00:00
mergify[bot]
8214bc9db4
Retain executor cache counts ( #22322 ) ( #22341 )
...
(cherry picked from commit f1e2598baa
)
Co-authored-by: Jack May <jack@solana.com >
2022-01-06 19:00:29 +00:00
mergify[bot]
7267ebaaf2
Consume from AccountsDataMeter (backport #21994 ) ( #22323 )
...
* Consume from AccountsDataMeter (#21994 )
(cherry picked from commit 1460f00e0f
)
# Conflicts:
# program-runtime/src/invoke_context.rs
* fixup! conflicts
* fix tests for v1.9
* fixup! clippy
Co-authored-by: Brooks Prumo <brooks@solana.com >
2022-01-06 17:01:02 +00:00
mergify[bot]
4be6e52a4f
cache executors on failed transactions (backport #22308 ) ( #22328 )
...
* cache executors on failed transactions (#22308 )
(cherry picked from commit 12e160269e
)
# Conflicts:
# program-runtime/src/invoke_context.rs
# runtime/src/bank.rs
* resolve conflicts
Co-authored-by: Jack May <jack@solana.com >
2022-01-06 09:14:48 +00:00
mergify[bot]
fc0c74d722
Only sum accounts data len from non-zero lamport accounts ( #22309 ) ( #22317 )
...
(cherry picked from commit ab13e39518
)
Co-authored-by: Brooks Prumo <brooks@solana.com >
2022-01-06 02:43:54 +00:00
mergify[bot]
687cd4779e
Add AccountsDataMeter to InvokeContext ( #21813 ) ( #22299 )
...
(cherry picked from commit 800472ddf5
)
Co-authored-by: Brooks Prumo <brooks@solana.com >
2022-01-06 01:31:11 +00:00
Will Hickey
ba0188a36d
Bump version to 1.9.4 ( #22304 )
2022-01-05 12:02:36 -06:00
mergify[bot]
8578429c4d
Refactor: Improve type safety and readability of transaction execution (backport #22215 ) ( #22289 )
...
* Refactor: Improve type safety and readability of transaction execution (#22215 )
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-05 23:01:15 +08:00
mergify[bot]
87f4a1f4b6
Bank gets accounts data len delta from MessageProcessor::process_message() ( #22288 )
...
(cherry picked from commit 635337d2ff
)
Co-authored-by: Brooks Prumo <brooks@solana.com >
2022-01-05 05:50:03 +00:00
mergify[bot]
17411f9b4c
Add accounts_data_len to Bank ( #21781 ) ( #22285 )
...
(cherry picked from commit eeb97fe7ce
)
Co-authored-by: Brooks Prumo <brooks@solana.com >
2022-01-05 02:24:52 +00:00
mergify[bot]
f89bf7b939
Compute accounts data len during generate_index() ( #21757 ) ( #22277 )
...
(cherry picked from commit ec7e17787e
)
Co-authored-by: Brooks Prumo <brooks@solana.com >
2022-01-04 22:44:51 +00:00
mergify[bot]
9764d4349b
Add return types to generate_index() ( #21735 ) ( #22275 )
...
(cherry picked from commit 1528f85112
)
Co-authored-by: Brooks Prumo <brooks@solana.com >
2022-01-04 18:27:40 +00:00
mergify[bot]
3b59f67562
Limit number of accounts that a transaction can lock (backport #22201 ) ( #22263 )
...
* Limit number of accounts that a transaction can lock (#22201 )
(cherry picked from commit 2b5e00d36d
)
# Conflicts:
# accountsdb-plugin-postgres/src/postgres_client/postgres_client_transaction.rs
# runtime/src/accounts.rs
# runtime/src/bank.rs
# sdk/src/feature_set.rs
# sdk/src/transaction/error.rs
# storage-proto/proto/transaction_by_addr.proto
# storage-proto/src/convert.rs
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-04 11:34:34 +00:00
mergify[bot]
0a9460ed8b
re-calibrate limit based on mainnet data (backport #21995 ) ( #22212 )
...
* re-calibrate limit based on mainnet data, see issue #21917
(cherry picked from commit d743c2917c
)
# Conflicts:
# runtime/src/block_cost_limits.rs
* set secp256k1 cost similar to sigverify
(cherry picked from commit a2a7e91ad6
)
* removes backport merge conflicts
Co-authored-by: Tao Zhu <tao@solana.com >
2022-01-03 19:22:10 +00:00
mergify[bot]
113d261a2c
Count compute units even when transaction errors (backport #22182 ) ( #22199 )
...
* Count compute units even when transaction errors (#22182 )
(cherry picked from commit d06e6c7425
)
# Conflicts:
# program-runtime/src/invoke_context.rs
# runtime/src/cost_model.rs
# runtime/src/message_processor.rs
* Resolve conflicts
Co-authored-by: carllin <carl@solana.com >
2021-12-31 21:14:00 +00:00
carllin
7efd0391e9
Revert "Count compute units even when transaction errors (backport #22059 ) ( #22154 )" ( #22175 )
...
This reverts commit 401c542d2a
.
2021-12-30 02:39:25 -05:00
mergify[bot]
531f36c571
Don't forward packets received from TPU forwards port ( #22078 ) ( #22171 )
...
* Don't forward packets received from TPU forwards port
* Add banking stage test
(cherry picked from commit b1d9a2e60e
)
Co-authored-by: Justin Starry <justin@solana.com >
2021-12-30 10:42:28 +08:00
mergify[bot]
401c542d2a
Count compute units even when transaction errors (backport #22059 ) ( #22154 )
...
* Count compute units even when transaction errors (#22059 )
(cherry picked from commit eaa8c67bde
)
# Conflicts:
# program-runtime/src/invoke_context.rs
# runtime/src/bank.rs
# runtime/src/message_processor.rs
* Fix merge conflicts
Co-authored-by: carllin <carl@solana.com >
2021-12-29 08:04:12 +00:00
mergify[bot]
adc584ee22
Add (preflight) simulation to BanksClient ( #22084 ) ( #22149 )
...
* Add more-legitimate conversion from legacy Transaction to SanitizedTransaction
* Add Banks method with preflight checks
* Expose BanksClient method with preflight checks
* Unwrap simulation err
* Add Bank simulation method that works on unfrozen Banks
* Add simpler api
* Better name: BanksTransactionResultWithSimulation
(cherry picked from commit 422a095647
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2021-12-28 22:04:27 +00:00
Will Hickey
78e7913352
Bump version to 1.9.3 ( #22065 )
2021-12-22 11:41:03 -06:00
mergify[bot]
35ee48bec9
RPC Block Subscription (backport #21787 ) ( #21992 )
...
* 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 >
(cherry picked from commit 76098dd42a
)
# Conflicts:
# Cargo.lock
# client-test/Cargo.toml
# rpc/src/rpc_subscriptions.rs
* Fix conflicts
Co-authored-by: segfaultdoctor <seg@jito.network >
Co-authored-by: Tyera Eulberg <tyera@solana.com >
2021-12-18 01:43:37 +00:00
mergify[bot]
02be3a6568
Check file size of snapshot_version
when unarchiving snapshot ( #21925 ) ( #21983 )
...
(cherry picked from commit 0f6e8d3385
)
Co-authored-by: mooori <moritz.zielke@gmail.com >
2021-12-17 21:02:53 +00:00
mergify[bot]
f4521002b9
Clean up demote program write lock feature (backport #21949 ) ( #21969 )
...
* Clean up demote program write lock feature (#21949 )
* Clean up demote program write lock feature
* fix test
(cherry picked from commit 6ff0be6a82
)
# Conflicts:
# programs/bpf_loader/src/syscalls.rs
# runtime/src/accounts.rs
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2021-12-17 04:45:22 +00:00
mergify[bot]
301e38044a
Fixes the calculation of the "compute_meter_consumption" across process_instruction() and process_message(). ( #21944 ) ( #21945 )
...
(cherry picked from commit 49cb161203
)
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net >
2021-12-16 16:28:28 +00:00
Michael Vines
bfa6302985
Bump version to 1.9.2
2021-12-15 16:18:14 -08:00
mergify[bot]
a9d4728c35
Deserialize accounts before acquiring stakes cache lock ( #21733 ) ( #21889 )
...
* Deserialize stored accounts before locking stakes cache
* fix test
(cherry picked from commit 2bbe1d875a
)
Co-authored-by: Justin Starry <justin@solana.com >
2021-12-14 16:47:01 +00:00
Tao Zhu
4b63d51e3e
Bump version to 1.9.1 ( #21802 )
2021-12-11 12:50:36 +00:00