Commit Graph

2146 Commits

Author SHA1 Message Date
behzad nouri 4d0abebe0e
removes Packet Meta.sender_stake and find_packet_sender_stake_stage (#31077)
Packet Meta.sender_stake is unused since
https://github.com/solana-labs/solana/pull/26512
removed sender_stake from banking-stage buffer prioritization.
2023-04-06 21:33:43 +00:00
samkim-crypto d67fa6c470
[clap-v3-utils] Define `EncodableKey` and make `keypair_from_path` and `keypair_from_seed` generic functions (#30947)
* generalize `Keypair` to using `EncodableKey` trait in clap-v3-utils

* add associated `Pubkey` type to `EncodableKey`

* remove associated type `Pubkey` from `EncodableKey`

* rename `EncodableKey` associated function names

* remove default overrides for `{read,write}_file`

* resolve dependencies for test

* remove `pubkey_string` from `EncodableKey` trait
2023-04-06 07:42:11 +09: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
Proph3t ab8d3066a5
Improve poh.rs readability (#30298)
* chore: factor out variable hashes per tick to a constant

* chore: add units to `elapsed` in `compute_hashes_per_tick`
2023-04-03 12:12:41 -07:00
Dmitri Makarov 8c860e9894
Bump platform-tools version to v1.37 (#31017) 2023-04-01 12:08:03 -04:00
behzad nouri ff9a42a354
uses Duration type instead of untyped ..._ms: u64 (#30971) 2023-03-31 15:42:49 +00: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
Pankaj Garg 035c974a8c
Remove redundant check during loading upgradeable program for writing (#30561)
* Remove redundant check during loading upgradeable program

* Apply clippy suggestion
2023-03-28 11:50:49 -07:00
samkim-crypto 742c56ae28
[cargo-test-sbf] Rename sbf-tools to platform-tools and use sbfv1 (#30927)
rename sbf-tools to platform-tools and use sbfv1
2023-03-28 20:30:14 +09: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
Dmitri Makarov db9623db06
Fix cargo-build-bpf removing a wrong command line option (#30848) 2023-03-22 09:37:33 -07: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
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
Alexander Meißner 66da71fa7a
Fix - Revert and feature gate incorrect error message in BPF loader (#30748)
* Revert to old behavior.

* Adds feature gate.
2023-03-21 11:08:41 +01: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
Tao Zhu 17ba051e1f
Revert "add default_cost as mandatory field for Builtin (#30639)" (#30749)
This reverts commit 7b95c8e698.
2023-03-16 11:21:06 -05:00
ryleung-solana 0ed9f62602
Quic server batching (#30330) 2023-03-16 21:50:57 +08:00
Ryo Onodera aaaee556d8
ci: silence ci test output while recording in full (#30654)
* ci: silence ci test output while recording in full

* shellcheck

* Adjust --color handling place

* Dump to stderr...

* Reduce too spammy solana_metrics logs

* Clean up

* Tweak

* Stash actual command's exit_code, not echo's
2023-03-16 22:17:29 +09:00
Tao Zhu a4ad0c75fc
fix heap cost calculation rounding error (#30673)
* add test for refaction heap size, fix size truncating by div op
* add feature gate
* checked result of consume_checked() if feature is activated
2023-03-15 12:03:04 -05:00
Tao Zhu 7b95c8e698
add default_cost as mandatory field for Builtin (#30639)
* add default_cost as mandatory field for Builtin

* updated tests

* set zkp program default to VerifyTransfer CUs

---------

Co-authored-by: Jon Cinque <joncinque@pm.me>
2023-03-10 14:02:24 -06:00
Tao Zhu 3b9438fd49
Replace hardcoded loaded accounts size limit with compute budget instruction (#30506)
1. replace hardcoded loaded accounts data size limit with compute budget instruction;
2. new transaction error for invalid account data size limit
3. test requested limit with combination of features and transactions
2023-03-08 19:41:45 -06:00
Dmitri Makarov b915b47315
Bump sbf-tools version to v1.35 (#30628)
- this release includes fixes in relocation handling necessary for
  source-level debugging of on-chain programs
2023-03-07 07:23:59 -08:00
Dmitri Makarov 7361fe27f9
Disable cwd remapping if debug build is requested in build-sbf (#30601)
CWD remapping removes absolute path prefixes from the path strings in
generated binary files. The paths are needed for source level
debugging.
2023-03-06 21:36:44 -05:00
Oliver Tušla ec7b1c8bda
Fix typo: where -> were (#30599) 2023-03-05 16:46:00 -05:00
Alexander Meißner 31bd695b83
Feature - `switch_to_new_elf_parser` (#30498)
Adds feature gate "switch_to_new_elf_parser".
2023-03-01 09:13:00 +01: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
Tao Zhu 9ec5e9b866
refactor to remove additional is_simple_vote check (#30521) 2023-02-24 23:49:04 -06: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
Tao Zhu 66ea750182
add compute budget instruction to set loaded accounts data size limit (#30377)
* add compute budget instruction to set accounts data size limit

* changes names to explicitly for loaded accounts data size
2023-02-24 09:27:49 -06: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
steviez 2ba76e4235
chore: Use Self in Packet/PacketBatch impl blocks (#30417) 2023-02-22 10:02:50 -05:00
Dmitri Makarov b0f7b782d3
Restore SBFv2 test in cargo-build-sbf tests (#30421) 2023-02-21 12:48:58 -08:00
Dmitri Makarov 03652ada69
Bump sbf-tools version (#30397) 2023-02-21 15:23:48 +01:00
Dmitri Makarov ec4f33b024
Fix SDK C makefile setting the correct path to clang headers (#30378) 2023-02-17 06:53:45 -08: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
Tao Zhu 51bace2123
add cost tracking for each bank during replay (#30035)
* add cost tracking for each bank during replay
* add feature gate
2023-02-13 13:09:48 -06:00