mergify[bot]
3aa3cd8852
Clean up before credits_auto_rewind ( #22839 ) ( #22866 )
...
* Clean up before credits_auto_rewind
* Use `=` intead of `|=` for mutable bool
(cherry picked from commit 545c97f903
)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
2022-02-01 15:22:33 +00:00
Alexander Meißner
2804204f80
Adds TEST_DUPLICATE_PRIVILEGE_ESCALATION_SIGNER and TEST_DUPLICATE_PRIVILEGE_ESCALATION_WRITABLE. ( #22790 )
2022-01-28 00:52:09 +01:00
Dmitri Makarov
4d891043d1
Update syscall base costs
2022-01-27 13:36:16 -08:00
mergify[bot]
d0cf5bb721
Bump thread_local ( #22711 ) ( #22714 )
...
(cherry picked from commit 1c10677f82
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com >
2022-01-24 12:10:10 -07:00
Trent Nelson
8bc4cc90d2
Bump version to 1.9.6
2022-01-21 20:15:43 -07:00
anatoly yakovenko
bf45f5b88e
Faster dedup v1.9 ( #22638 )
...
Faster dedup port of #22607
2022-01-21 11:21:28 -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
Michael Vines
9bddb4e437
vote account withdraw authority may change the authorized voter
2022-01-15 23:46:10 -08: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
mergify[bot]
a7623ad18c
Fetch sysvars from invoke context for vote program (backport #22444 ) ( #22469 )
...
* Fetch sysvars from invoke context for vote program (#22444 )
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-15 03:56:00 +00: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]
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]
ae77a52c97
wrap create executor timings datapoint in a module ( #22398 )
...
(cherry picked from commit 428575f9ae
)
Co-authored-by: Trent Nelson <trent@solana.com >
2022-01-09 06:41:44 +00:00
Trent Nelson
cb49ae21b4
Bump version to v1.9.5
2022-01-08 21:17:51 +00:00
Trent Nelson
a4ca18a54d
add excutor creation trace timings
2022-01-08 05:25:37 -07:00
Justin Starry
1f00926874
Add runtime support for address table lookups (backport #22223 ) ( #22354 )
2022-01-08 07:57:04 +08: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]
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]
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
Brooks Prumo
840ec0686e
Fix broken build from bpf/tests/programs.rs ( #22312 )
...
These tests were broken due to PR #22289
2022-01-05 15:06:15 -06: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]
09dbf069e8
Add test to enforce that program id account info for CPI is optional ( #22069 ) ( #22103 )
...
* Update tests to demonstrate that program id account info for CPI is optional
* Clean up comments that say that program id account info is required
(cherry picked from commit ec7536faf6
)
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-04 21:47:48 +00:00
mergify[bot]
d84b994451
shrinks size of Packet.Meta (backport #22224 ) ( #22273 )
...
* removes seed and slot fields from Packet.Meta
507367e6ac
updated window-service to send shreds (as opposed to packets) to
retransmit-stage and so seed and slot fields in Packet.Meta are unused:
https://github.com/solana-labs/solana/blob/d6ec103be/sdk/src/packet.rs#L27-L28
(cherry picked from commit aa9f7ed7e8
)
* uses std::net::IpAddr type for Packet.Meta.addr
(cherry picked from commit 73a7741c49
)
# Conflicts:
# streamer/src/streamer.rs
* adds bitflags to Packet.Meta
Instead of a separate bool type for each flag, all the flags can be
encoded in a type-safe bitflags encoded in a single u8:
https://github.com/solana-labs/solana/blob/d6ec103be/sdk/src/packet.rs#L19-L31
(cherry picked from commit 01a096adc8
)
# Conflicts:
# sdk/Cargo.toml
* removes backport merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2022-01-04 17:38:29 +00:00
mergify[bot]
3e4e2e9113
Prevent lookup tables from being closed during deactivation slot ( #22221 ) ( #22247 )
...
(cherry picked from commit bbe5b66324
)
Co-authored-by: Justin Starry <justin@solana.com >
2022-01-03 23:32:03 +00:00
Alexander Meißner
264bb903a3
Bump rbpf to v0.2.21 ( #22216 ) ( #22217 )
...
(cherry picked from commit 9139be89b7
)
2022-01-01 20:42:53 +00:00
mergify[bot]
70d5b6aeaf
Bump solana_rbpf to version v0.2.20 ( #22164 ) ( #22207 )
...
(cherry picked from commit 8a43e2d889
)
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net >
2021-12-31 21:57:20 +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]
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]
7d61935bf1
Bump bpf-tools to v1.21 ( #22083 )
...
(cherry picked from commit 7cc6262b5a
)
Co-authored-by: Dmitri Makarov <dmakarov@alumni.stanford.edu >
2021-12-23 03:38:04 +00:00
mergify[bot]
9fbaaa5102
Increment execution timings on errors as well ( #22053 ) ( #22072 )
...
(cherry picked from commit 37f6777ceb
)
Co-authored-by: carllin <carl@solana.com >
2021-12-22 22:50:19 +00:00
Will Hickey
78e7913352
Bump version to 1.9.3 ( #22065 )
2021-12-22 11:41:03 -06:00
Tyera Eulberg
f58b87befe
v1.9: bump tarpc from 0.26.2 to 0.27.2 and add BanksClientError ( #22055 )
...
* chore: bump tarpc from 0.26.2 to 0.27.2
Bumps [tarpc](https://github.com/google/tarpc ) from 0.26.2 to 0.27.2.
- [Release notes](https://github.com/google/tarpc/releases )
- [Changelog](https://github.com/google/tarpc/blob/master/RELEASES.md )
- [Commits](https://github.com/google/tarpc/commits )
---
updated-dependencies:
- dependency-name: tarpc
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
* [auto-commit] Update all Cargo lock files
* Accommodate breaking changes
* Reword incorrect error message
* Add error module
* Revert client Error type to io::Error; easy transition to BanksClientError
* Bump tracing crates in programs
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com >
2021-12-22 03:41:16 +00:00
mergify[bot]
75fe0d3ecf
Fix #21986 ( #22035 ) ( #22049 )
...
* Partial revert "Updates documentation around what needs to be passed in CPI. (#21633 )"
* Enforces the program_id being passed explicitly by removing it from get_instruction_keyed_accounts().
* instruction_accounts => instructions_account
(cherry picked from commit ba8e15848e
)
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net >
2021-12-21 17:54:18 +00:00
mergify[bot]
57e5406476
Add deactivation cooldown before address lookup tables can be closed ( #22011 ) ( #22036 )
...
(cherry picked from commit f5d1115468
)
Co-authored-by: Justin Starry <justin@solana.com >
2021-12-21 02:10:14 +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
Michael Vines
bfa6302985
Bump version to 1.9.2
2021-12-15 16:18:14 -08:00
Michael Vines
9f173d3717
Add helper crate to generate syscalls.txt
2021-12-14 21:34:36 -08:00
mergify[bot]
2cd2f3ba7b
Bump rbpf to v0.2.19 ( #21880 ) ( #21891 )
...
* Bump rbpf to v0.2.19
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net >
(cherry picked from commit 509bcd2e74
)
Co-authored-by: Jack May <jack@solana.com >
2021-12-14 20:30:31 +00:00
Michael Vines
c1f54c22ed
Remove the 5 integer msg! form
...
(cherry picked from commit c5c699a918
)
2021-12-11 12:47:43 -08:00
Tao Zhu
4b63d51e3e
Bump version to 1.9.1 ( #21802 )
2021-12-11 12:50:36 +00:00
mergify[bot]
5bf4445ae6
Add address lookup table program (backport #21616 ) ( #21789 )
...
* Add address lookup table program (#21616 )
* Add address lookup table program
* feedback
(cherry picked from commit 9b41ddd9ba
)
# Conflicts:
# runtime/Cargo.toml
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com >
2021-12-11 05:26:46 +00:00
mergify[bot]
2c4765e75a
Bump solana_rbpf to version v0.2.18 ( #21774 ) ( #21786 )
...
(cherry picked from commit a5a0dabe7b
)
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net >
2021-12-11 02:38:03 +00:00
mergify[bot]
68fc72a7f4
Add more reporting for invalid stake cache members and prune them ( #21654 ) ( #21741 )
...
* Add more reporting for invalid stake cache members
* feedback
(cherry picked from commit 6fc329180b
)
Co-authored-by: Justin Starry <justin@solana.com >
2021-12-10 18:30:16 +00:00
Michael Vines
a31660815f
rebase
2021-12-09 18:41:47 -08:00
Michael Vines
85f601993f
Cargo.lock
...
(cherry picked from commit f4babb7566
)
# Conflicts:
# Cargo.lock
# programs/bpf/Cargo.lock
2021-12-09 18:41:47 -08:00