Commit Graph

441 Commits

Author SHA1 Message Date
Andrew Fitzgerald 75954dc061
Banking worker (#30970) 2023-05-25 10:16:04 -07:00
Alexander Meißner 691b12c693
Cleanup - merge_nonce_error_into_system_error (#31773)
* merge_nonce_error_into_system_error

* more cleanup

---------

Co-authored-by: Trent Nelson <trent@solana.com>
2023-05-24 18:05:07 +02:00
vadorovsky bea062b1e6
Add alt_bn128 syscall tests (and fix related issues) (#31436)
* Fix C headers (the name of the syscall was incorrect).
* Add C SBF tests using the alt_bn128 syscall.
* Fix the Rust SBF program:
  * Do not use serde and array-bytes, provide test cases as byte arrays
    directly.
  * Use the `custom_heap_default` macro.
  * Replace `bpf` with `sbf` in the crate name.
* Execute both previously existing Rust tests and new C tests in
  `programs/sbf/tests`, so they are actually tested on CI.
2023-05-22 14:05:10 -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
Alexander Meißner bbd8be6cbe
Refactor - Renames loader-v3 to loader-v4. (#31570)
Renames loader-v3 to loader-v4.
2023-05-11 08:29:06 +02:00
Tyera 9af7009bb4
Add new CreateVoteAccount instruction-set builders (#31330)
* Add failing test

* Add config struct for vote-account creation

* Add create-vote-account ix builders that use CreateVoteAccountConfig

* Test now passes; add case to demonstrate failure after activation

* Deprecate existing ix builders

* Use new builders in solana-cli

* Query feature status to use correct VoteState size in solana-cli

* Fix tests and clippy warnings

* Improve ugly conditional block
2023-04-27 11:14:39 -06:00
Ryo Onodera a30830d7a9
ci: treewide: deny used_underscore_binding (#31319)
* Enforce used_underscore_binding

* Fix all

* Work around for cfg()-ed code...

* ci....

* Make clipply fixes more pleasant

* Clone exit signal while intentionally shadowing

* Use more verbose code to avoid any #[allow(...)]s
2023-04-27 10:10:16 +09:00
bji a45710838d
Add new vote state version that replaces Lockout with LandedVote to a… (#30831)
Add new vote state version that replaces Lockout with LandedVote to allow vote latency to be tracked in a future change.

Includes a feature to be enabled which will when enabled cause the vote state to be written in the new form.
2023-04-18 20:27:38 -07: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
blackghost1987 9f9d6f8a89
Relax `Sized` bound for `Signers` in `Transaction` and `Client` (#30568)
* relax Sized bound for Signers in Transaction and Client

* also relax Sized bounds in client, runtime, thin-client and tpu-client

* add tests for using non-sized transaction signers

* fix macro for thin_client vs ?Sized

* move tests to transactions, add Sized relaxation to mut macro

* fix clippy warning

* get rid of unnecessary imports
2023-03-30 13:12:48 +00:00
Brennan 000b912fc6
Update discord invite links (#30909)
* Update discord invite links

* Point to Stack Exchange for support
2023-03-29 09:14:22 -07:00
Pankaj Garg bf488eb384
Update documentation of instruction error and add a unit test (#30915)
* Update documentation of instruction error and add a unit test

* update test name
2023-03-28 11:54:49 -07: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
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
steviez 5344a789d7
Revert "Add new vote state version that replaces Lockout with LandedV… (#30817)
Revert "Add new vote state version that replaces Lockout with LandedVote to a… (#29524)"

This reverts commit d77f0a22c7.
2023-03-21 22:54:13 +08:00
bji d77f0a22c7
Add new vote state version that replaces Lockout with LandedVote to a… (#29524)
* Add new vote state version that replaces Lockout with LandedVote to allow vote latency to be tracked in a future change. Includes a feature to be enabled which will when enabled cause the vote state to be written in the new form.

* Update feature set key to one owned by ashwin

---------

Co-authored-by: Ashwin Sekar <ashwin@solana.com>
2023-03-20 08:31:46 -06:00
Oliver Tušla ec7b1c8bda
Fix typo: where -> were (#30599) 2023-03-05 16:46:00 -05:00
Yihau Chen bd98f3a533
chore: make anyhow inherit root's declaration (#30509) 2023-02-28 18:27:41 +08:00
Yihau Chen 221fe61089
chore: remove redundant packages (#30511) 2023-02-28 18:27:29 +08:00
Yihau Chen d16a03cd44
chore: bump js-sys to 0.3.59 (#30495) 2023-02-27 03:19:44 +08:00
Yihau Chen ccef90c48d
chore: bump sha3 to 0.10.4 (#30491) 2023-02-27 03:19:35 +08:00
Yihau Chen d19758139d
chore: bump bytemuck to 1.11.0 (#30490) 2023-02-27 03:19:11 +08:00
hana bd49b984e2
remove VoteState::deserialize() from sbf builds (#30515)
the existing deserialize implementation overruns the sbf stack and is unusable in a program context
this silences a warning to that effect which all solana_program importers receive

closes #30188
2023-02-25 16:10:08 -08:00
Yihau Chen af59cced5a
chore: bump bincode to 1.3.3 (#30489) 2023-02-25 02:48:24 +08:00
Yihau Chen c318002fe4
chore: bump libc to 0.2.131 (#30496) 2023-02-25 02:42:33 +08:00
Yihau Chen d5d1f5eb62
chore: bump serde_json to 1.0.83 (#30492) 2023-02-25 02:42:19 +08:00
Yihau Chen df3ef111f7
chore: workspace inheritance (#29893)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-02-23 22:01:54 +08:00
Michael Vines 5136ed3448
Update homepage value for all crates (#30444) 2023-02-23 02:20:18 +00:00
Brooks febaf36e6d
Apply clippy fixes for future rust upgrade (#30363) 2023-02-16 16:12:51 +00:00
Brooks 0c36e4c82d
Adds stable layout types to pass to the runtime (#30192) 2023-02-16 08:16:25 -05:00
Alexey Skibin cb7fed6fae
Prevent runtime from using messages with version 127 (#29807) 2023-02-13 10:12:34 -05:00
Yihau Chen 9803cf4fd7
chore: bump assert_matches to 1.5.0 (#29647) 2023-02-11 22:15:57 +08:00
Yihau Chen e36c7b8913
chore: bump borsh to 0.9.3 (#29606) 2023-02-11 22:15:46 +08:00
dependabot[bot] 57dced05f0
Bump sha2 from 0.10.5 to 0.10.6 (#30215)
Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.10.5 to
0.10.6.

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-02-09 12:18:09 -07:00
Brooks 84d746a8dd
Reorders AccountInfo checks in check_type_assumptions() (#30143) 2023-02-06 17:06:07 -05:00
Brooks b77e12b3a9
Makes AccountInfo repr(C) (#30124) 2023-02-06 08:00:46 -05:00
dependabot[bot] 5520d0bf7b
Bump cc from 1.0.78 to 1.0.79 (#30080)
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-02-02 11:30:18 -07:00
dependabot[bot] d0b850f137
Bump rustversion from 1.0.9 to 1.0.11 (#30079)
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-02-02 11:25:29 -07:00
Will Hickey 04a6a631bc
Bump version to v1.16 (#30028) 2023-01-31 17:48:33 -06:00
Richard Patel 1ca78845bb
runtime: add test_type_layout (#29987)
adds unit test asserting the type layout of structures in append_vec

---------

Co-authored-by: Richard Patel <ripatel@jumptrading.com>
Co-authored-by: brooks <brooks@solana.com>
2023-01-31 11:08:55 -05:00
joeaba a12bf8c003
Update maintainers references (#29997)
* update maintainers references

* chore: update maintainers reference
2023-01-31 08:07:13 -05:00
Ashwin Sekar a5213d41f3
Eliminate unchecked arithmetic in vote program (#29885) 2023-01-25 21:55:52 -08:00
Jon Cinque 77c45f0478
sdk: Expose `CompileError` to the outside (#29900)
sdk: Expose `CompileError` to users
2023-01-25 19:22:45 +01:00
Yihau Chen 9193b4221d
Revert "chore: workspace inheritance (#29509)" (#29892)
This reverts commit a67d239dde.
2023-01-25 15:50:41 +08:00
Yihau Chen a67d239dde
chore: workspace inheritance (#29509)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-01-25 13:59:59 +08:00
behzad nouri 272e667cb2
deprecates Pubkey::new in favor of Pubkey::{,try_}from (#29805)
The commit deprecates Pubkey::new which lacks type-safety and instead
implements TryFrom<&[u8]> and TryFrom<Vec<u8>> for Pubkey.
2023-01-21 18:06:27 +00:00
valiksinev 5f7fea100a
Big integer modular exponentiation (EIP-198) (#28503)
* big_mod_exp impl

* fix programs/sbf/Cargo.lock

* ComputeBudget impl

* update compute_budget

* compute_budget update

* fix build

* fix tests

* fix cargo clippy

* fix clippy

* fix bpf_loader dependency sorting

* fix sorting

* fix merge from master

* fix cargo fmt

* fix C-tests

* fix cargo fmt

* comments apply

* fix programs/sbf/Cargo.lock

* update compude_budget cost

* remove whitespaces

* fix cargo fmt

Co-authored-by: sinev-valentine <sinev-valentine@yandex.ru>
2023-01-20 18:42:37 +09:00
behzad nouri d463bcc5f8
removes manual implementations of Default for enums (#29779) 2023-01-19 19:25:30 +00:00
Trent Nelson c4e43f1de4
vote: encapsulate `Lockout` (#29753) 2023-01-18 19:28:28 -07:00
Brooks da39c4837f
Use Into in Hash::result() instead of TryFrom (#29721) 2023-01-16 12:13:04 -05:00