Commit Graph

2569 Commits

Author SHA1 Message Date
Pankaj Garg fb6e02c46c
Retain usage counter on program upgrade (#31142)
* Retain usage counter on program upgrade

* cleanup as per feedback

* fix clippy
2023-04-11 09:43:42 -07:00
Pankaj Garg 12e3e8b467
Add provisions to unload a program from the cache (#31036) 2023-04-10 16:42:05 -07:00
dependabot[bot] fe8a4015ca
Bump serde from 1.0.158 to 1.0.159 (#31119)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.158 to 1.0.159.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.158...v1.0.159)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-10 15:19:16 -07:00
Brennan 861bca87f9
Reconfigure genesis hash download and check (#30949)
* Reconfigure genesis hash download and check

* Propagate get genesis errors
2023-04-10 11:46:56 -07:00
dependabot[bot] 2630f8506a
Bump generic-array from 0.14.6 to 0.14.7 (#31100)
Bumps [generic-array](https://github.com/fizyk20/generic-array) from 0.14.6 to 0.14.7.
- [Release notes](https://github.com/fizyk20/generic-array/releases)
- [Changelog](https://github.com/fizyk20/generic-array/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fizyk20/generic-array/commits)

---
updated-dependencies:
- dependency-name: generic-array
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 16:25:03 -07:00
dependabot[bot] f105dea502
Bump indicatif from 0.17.1 to 0.17.3 (#31101)
Bumps [indicatif](https://github.com/console-rs/indicatif) from 0.17.1 to 0.17.3.
- [Release notes](https://github.com/console-rs/indicatif/releases)
- [Commits](console-rs/indicatif@0.17.1...0.17.3)

---
updated-dependencies:
- dependency-name: indicatif
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 16:17:30 -07:00
dependabot[bot] 76c6ded304
Bump anyhow from 1.0.58 to 1.0.70 (#31102)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.58 to 1.0.70.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](dtolnay/anyhow@1.0.58...1.0.70)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 16:14:33 -07:00
dependabot[bot] 05372274b9
Bump rustversion from 1.0.11 to 1.0.12 (#31104)
Bumps [rustversion](https://github.com/dtolnay/rustversion) from 1.0.11 to 1.0.12.
- [Release notes](https://github.com/dtolnay/rustversion/releases)
- [Commits](dtolnay/rustversion@1.0.11...1.0.12)

---
updated-dependencies:
- dependency-name: rustversion
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 16:09:36 -07:00
dependabot[bot] 6e47286e49
Bump serde_yaml from 0.9.13 to 0.9.21 (#31103)
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.13 to 0.9.21.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](dtolnay/serde-yaml@0.9.13...0.9.21)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 15:58:27 -07:00
Alexander Meißner 0cd57addcf
Cleanup - mock_process_instruction() (#31088)
* Uses declare_process_instruction!() in all tests.

* Adds post_adjustments to mock_process_instruction().
Removes "solana_sbf_rust_external_spend" from assert_instruction_count() as it panics.
2023-04-07 12:53:19 +02:00
dependabot[bot] bcd43d7a79
Bump rayon from 1.5.3 to 1.7.0 (#30981)
* Bump rayon from 1.5.3 to 1.7.0

Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.5.3 to 1.7.0.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/v1.5.3...rayon-core-v1.7.0)

---
updated-dependencies:
- dependency-name: rayon
  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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-04-06 23:27:53 -06:00
dependabot[bot] dd82157afb
Bump ouroboros from 0.15.0 to 0.15.6 (#31090)
Bumps [ouroboros](https://github.com/joshua-maros/ouroboros) from 0.15.0 to 0.15.6.
- [Release notes](https://github.com/joshua-maros/ouroboros/releases)
- [Commits](https://github.com/joshua-maros/ouroboros/commits)

---
updated-dependencies:
- dependency-name: ouroboros
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-06 19:11:32 -07:00
dependabot[bot] 9410e95baa
Bump crossbeam-channel from 0.5.6 to 0.5.7 (#31091)
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](crossbeam-rs/crossbeam@crossbeam-channel-0.5.6...crossbeam-channel-0.5.7)

---
updated-dependencies:
- dependency-name: crossbeam-channel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-06 19:00:49 -07:00
dependabot[bot] 6782a6fe38
Bump strum_macros from 0.24.0 to 0.24.3 (#31092)
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.24.0 to 0.24.3.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum_macros
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-06 18:52:16 -07:00
dependabot[bot] 0783363183
Bump blake3 from 1.3.1 to 1.3.3 (#31089)
Bumps [blake3](https://github.com/BLAKE3-team/BLAKE3) from 1.3.1 to 1.3.3.
- [Release notes](https://github.com/BLAKE3-team/BLAKE3/releases)
- [Commits](BLAKE3-team/BLAKE3@1.3.1...1.3.3)

---
updated-dependencies:
- dependency-name: blake3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-06 18:51:40 -07:00
dependabot[bot] 62b7de88e5
Bump chrono-humanize from 0.2.1 to 0.2.2 (#31075)
Bumps [chrono-humanize](https://gitlab.com/imp/chrono-humanize-rs) from 0.2.1 to 0.2.2.
- [Release notes](https://gitlab.com/imp/chrono-humanize-rs/tags)
- [Commits](https://gitlab.com/imp/chrono-humanize-rs/compare/0.2.1...0.2.2)

---
updated-dependencies:
- dependency-name: chrono-humanize
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-06 11:50:25 -07:00
Pankaj Garg 83e17d8e44
Add expiration slot to loaded program cache entry (#31034) 2023-04-05 09:26:28 -07:00
Alexander Meißner 24a87f33a8
Refactor - Cleanup error handling in program runtime (#30693)
* Moves stable_log::program_invoke(), stable_log::program_success() and stable_log::program_failure() calls from bpf_loader into InvokeContext::process_executable_chain().

* Turns result of ProcessInstructionWithContext from InstructionError into Box<dyn std::error::Error>.

* Bump to solana_rbpf v0.3.0

* Removes Result from return type of EbpfVm::new().

* Turns EbpfError into Box<dyn std::error::Error>.

* Removes BpfError.

* Removes SyscallError::InstructionError.

* Adds a type alias for Box<dyn std::error::Error> in syscalls.
2023-04-05 15:50:34 +02:00
ananas-block c4648f5a26
bump arkworks deps to version 0.4.0 (#30536)
* bump ark-works 0.4.0

* removed obsolete commented code

* bumped deps again after rebase

* paring: merged two vectors into one

* added zero serialization test

* reverted formatting change

* updated Cargo.lock after rebase

* fixed Cargo.lock
2023-04-04 20:16:47 -06:00
Alexander Meißner 911489d373
Feature - Stop truncating strings in syscalls (#31030)
* Adds the feature gate stop_truncating_strings_in_syscalls.

* Removes the truncation of everything after the first NULL byte in translate_string_and_do().
2023-04-04 19:33:53 +02:00
Jeff Washington (jwash) 05f2a01a80
disk index: refactor OccupiedEnumTag (#31028) 2023-04-03 13:12:06 -07:00
Alexander Meißner a0c7fde90e
Cleanup - mock InvokeContext (#31007)
* Turns with_mock_invoke_context() into a macro.

* Removes prepare_mock_invoke_context().

* Replaces InvokeContext::new_mock() with with_mock_invoke_context().

* Removes InvokeContext::new_mock().

* Removes Cow from InvokeContext::sysvar_cache.

* Removes override parameters from mock_process_instruction().

* cargo fmt
2023-04-03 17:23:24 +02:00
Dmitri Makarov 8c860e9894
Bump platform-tools version to v1.37 (#31017) 2023-04-01 12:08:03 -04:00
Pankaj Garg a2f3a219d8
SBF test that runs with stable bank and genesis to produce deterministic hash (#30945)
* SBF test that runs with stable bank and genesis to produce deterministic hash

* fix warning

* ignore the test
2023-03-31 10:13:11 -07:00
Illia Bobyr fe5ae7733b
ledger: confirm_slot_entries(): confirmation_elapsed metric (#30807)
Measure total time spent inside `confirm_slot_entries()`.  Useful metric
in addition to `replay_elapsed` and
`poh_verify_elapsed`/`transaction_verify_elapsed`, as it shows how PoH
and transaction verification interact with the replay process.
2023-03-29 13:11:29 -07:00
Pankaj Garg f198d7426a
Use feature gate to set effective slot of loaded programs (#30950) 2023-03-29 04:47:49 -07:00
Yihau Chen 2c842e9932
chore: workspace inheritance (#30939)
* client/Cargo.toml

* udp-client/Cargo.toml

* tpu-client/Cargo.toml

* thin-client/Cargo.toml

* storage-proto/Cargo.toml

* quic-client/Cargo.toml

* dos/Cargo.toml

* entry/Cargo.toml

* perf/Cargo.toml

* program-runtime/Cargo.toml

* program-test/Cargo.toml

* programs/address-lookup-table/Cargo.toml

* programs/loader-v3/Cargo.toml

* connection-cache/Cargo.toml

* programs/sbf/rust/big_mod_exp/Cargo.toml

* programs/zk-token-proof-tests/Cargo.toml
2023-03-29 03:28:56 +00:00
Tyera 932301583c
Plumb Entry notification into plugin manager (#30910)
Plumb entry notification into plugin manager
2023-03-28 14:53:27 -06:00
Jeff Washington (jwash) 6285aaee89
store data and index occupy in bitvec (#30899) 2023-03-28 12:17:28 -07:00
dependabot[bot] 4787b22bd6
Bump base64 from 0.13.0 to 0.13.1 (#30931)
* Bump base64 from 0.13.0 to 0.13.1

Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.13.0...v0.13.1)

---
updated-dependencies:
- dependency-name: base64
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-03-28 19:13:40 +00:00
Pankaj Garg aebc191c38
Stop loading program accounts if program exists in cache (#30703)
* Stop loading program accounts if program exists in cache

* load accounts for upgradeable programs

* revert loader change to conditionally use program data account

* load instruction accounts

* generate TransactionExecutorCache from loaded programs

* cleanup account_found_and_dep_index variable

* address review comments

* handle tombstones in loader

* unify tombstone constructor

* handle multiple tombstones
2023-03-28 11:49:56 -07:00
behzad nouri 359d9c7b9f
upgrades ahash to 0.8.3 (#30935) 2023-03-28 18:23:33 +00:00
behzad nouri 75abfc79a6
removes unused dependencies (#30917) 2023-03-28 17:25:44 +00:00
dependabot[bot] 42dfb85cc1
Bump hyper from 0.14.23 to 0.14.25 (#30930)
* Bump hyper from 0.14.23 to 0.14.25

Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.23 to 0.14.25.
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/v0.14.25/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v0.14.23...v0.14.25)

---
updated-dependencies:
- dependency-name: hyper
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-03-28 10:16:33 -06:00
dependabot[bot] b53656b517
Bump wasm-bindgen from 0.2.82 to 0.2.84 (#30887)
* Bump wasm-bindgen from 0.2.82 to 0.2.84

Bumps [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) from 0.2.82 to 0.2.84.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/compare/0.2.82...0.2.84)

---
updated-dependencies:
- dependency-name: wasm-bindgen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-03-27 12:07:18 -06:00
dependabot[bot] 956d849c93
Bump nix from 0.25.0 to 0.25.1 (#30889)
* Bump nix from 0.25.0 to 0.25.1

Bumps [nix](https://github.com/nix-rust/nix) from 0.25.0 to 0.25.1.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/v0.25.1/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.25.0...v0.25.1)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-03-27 12:05:01 -06:00
dependabot[bot] 9a681b8461
Bump prost-types from 0.11.6 to 0.11.8 (#30888)
* Bump prost-types from 0.11.6 to 0.11.8

Bumps [prost-types](https://github.com/tokio-rs/prost) from 0.11.6 to 0.11.8.
- [Release notes](https://github.com/tokio-rs/prost/releases)
- [Commits](https://github.com/tokio-rs/prost/compare/v0.11.6...v0.11.8)

---
updated-dependencies:
- dependency-name: prost-types
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-03-27 12:03:52 -06:00
Pankaj Garg cbf70430a5
Fix deployment slot for upgraded programs (#30902) 2023-03-27 06:48:26 -07:00
Pankaj Garg 0df28f6d51
Increment usage count for loaded programs and call eviction (#30900) 2023-03-27 06:48:05 -07:00
Alexander Meißner fb7d303995
Refactor - mock_process_instruction() (#30893)
* Uses InvokeContext::process_instruction() in mock_process_instruction().

* Uses InvokeContext::process_instruction() in tests of loader-v3.

* Only throw InstructionError::BuiltinProgramsMustConsumeComputeUnits if result.is_ok().

* Adds CU cost to loader-v3.
2023-03-24 22:45:03 +01:00
Tao Zhu 3e500d9e92
Feature gate builtin consumes static units during processing instruction (#30702)
* add feature gate
* builtins consume statically defined units at beginning of process_instruction()
* Add new instructionError; return error if builtin did not consume units to enforce builtin to consume units;
* updated related tests
* updated ProgramTest with deactivated native_programs_consume_cu feature to continue support existing mock/test programs that do not consume units
2023-03-24 11:31:01 -05:00
Illia Bobyr 08f0fada7e
Cargo.lock: Update `openssl`, as suggested by `cargo audit` (#30886)
Just ran

    cargo update --package openssl

in the root and in `programs/sbf`.
2023-03-23 21:06:27 -07:00
Tyera 193a6d90fc
Remove unused dependency (#30881) 2023-03-24 02:34:10 +00:00
dependabot[bot] db1e721f48
Bump memmap2 from 0.5.8 to 0.5.10 (#30867)
* Bump memmap2 from 0.5.8 to 0.5.10

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.5.8 to 0.5.10.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.8...v0.5.10)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-03-23 11:16:43 -06:00
Alexander Meißner c10f337f85
Feature - Loader built-in program v3 (#30464)
* Adds loader-v3 in SDK.

* Adds loader-v3 built-in program.

* Adds tests.
2023-03-23 18:13:47 +01:00
Ryo Onodera 6c444df9e0
Add --block-{verification,production}-method flags (noop atm) (#30746)
* Add --{replaying,banking}-backend flags (noop atm)

* Greatly simplify enums with strum

* Update programs/sbf/Cargo.lock...

* Rely on Display, removing Debug

* constify cli_names()

* Don't allow omitting bankend value

* Rename to --block-{verification,production}-method

* Use more specific name

* Actually support missing value....

* Remove strictly-unnecessary flags

* Use lazy_static! instead of abusing DefaultArgs...
2023-03-23 12:57:28 +09:00
dependabot[bot] 9adb321bed
Bump prost from 0.11.6 to 0.11.8 (#30844)
* Bump prost from 0.11.6 to 0.11.8

Bumps [prost](https://github.com/tokio-rs/prost) from 0.11.6 to 0.11.8.
- [Release notes](https://github.com/tokio-rs/prost/releases)
- [Commits](https://github.com/tokio-rs/prost/compare/v0.11.6...v0.11.8)

---
updated-dependencies:
- dependency-name: prost
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-03-22 12:03:13 -06:00
dependabot[bot] 027bd5f8a5
Bump serde from 1.0.152 to 1.0.158 (#30845)
* Bump serde from 1.0.152 to 1.0.158

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.152 to 1.0.158.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.152...v1.0.158)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-03-22 11:53:39 -06:00
Dmitri Makarov 81ef2a0d75
Update references to platform-tools (#30764) 2023-03-22 07:41:40 -07:00
Tao Zhu 21c287a64f
include loaded accounts data size limit in transaction fee calculation (#30659)
* include loaded accounts data size limit in transaction base fee calculation
* citing compute_budget for heap cost;
* update sbf tests

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2023-03-21 18:41:41 -05:00