Commit Graph

30 Commits

Author SHA1 Message Date
Brooks Prumo d1ba42180d
clippy for rust 1.65.0 (#28765) 2022-11-09 19:39:38 +00:00
Dmitri Makarov 34865d032c chore: update Solana docs and code comments that specify "BPF" to "SBF" 2022-10-31 14:14:25 -04:00
Justin Starry 70445b7402
Refactor: Rename `max_invoke_depth` to `max_invoke_stack_height` (#28427)
Refactor: Rename max_invoke_depth to max_invoke_stack_height
2022-10-17 23:54:56 +08:00
samkim-crypto 3f63283eda
add curve25519 multiscalar multiplication syscall (#28216)
* add curve25519 multiscalar multiplication syscall

* update compute unit costs

* update tests

* add update to compute budget

* add syscall call function

* update compute costs in tests

* update syscall syntax
2022-10-12 14:43:02 +09:00
samkim-crypto fcd301eeed
syscalls: update costs for curve25519 operations (#28152)
update costs
2022-10-01 09:08:10 +09:00
Alexander Meißner 71aee4fcaf
Feature: Explicitly limit `TransactionContext::instruction_trace_capacity` (#27938)
* Renames instruction_stack_capacity => instruction_stack_capacity.

* Replaces number_of_instructions_at_transaction_level by instruction_trace_capacity.

* Adds MaxInstructionTraceLengthExceeded.

* Adjusts TransactionContext::new() parameter.

* Adds feature gate limit_max_instruction_trace_length.

* Adds test_max_instruction_trace_length().
2022-09-26 10:47:16 +02:00
Tao Zhu ced8f6a512
Add feature gate to remove support for RequestUnitsDeprecated instruction (#27503)
* feature gate: remove support for RequestUnitsDeprecated instruction #27500

* review update: stop support deprecated ix for prioritization

* Apply suggestions from code review

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
2022-09-09 22:24:21 +00:00
Alexander Meißner 0367c1a60c
Feature: `SyscallSetAccountProperties` (#27444)
* Adds TransactionContextAttribute.

* Adds SyscallSetAccountProperties.

* Adds AccountPropertyUpdate factory methods to BorrowedAccount.

* Categorizes syscalls exclusive to ABIv0/v1 and ABIv2.
2022-09-02 12:42:06 +02:00
Justin Starry bdce208fe5
clean feature: `request_units_deprecated` (#27102)
clean feature: request_units_deprecated
2022-08-13 13:12:35 +01:00
Jeff Washington (jwash) d9c7bc7e78
Revert "cleanup feature: default units per instruction (#26684)" (#26750)
This reverts commit 39a34db52a.
2022-07-23 11:03:46 -05:00
Jack May 39a34db52a
cleanup feature: default units per instruction (#26684) 2022-07-20 19:13:34 +00:00
samkim-crypto 24c6f820ce
remove elgamal syscall operations (#26311)
resolve conflict
2022-06-30 16:27:48 +09:00
Jack May 4563bf40f6
cleanup feature: tx-wide-compute-cap (#26326) 2022-06-29 23:54:45 -07:00
Artie Kushner 7ecaf12ff8 doc typo 2022-06-27 09:43:51 -07:00
samkim-crypto 930fe8ad10
Zk token ops using curve25519 syscalls (#25935)
* zk-token-sdk: use curve25519 syscalls for ElGamal arithmetic

* zk-token-sdk: clippy

* adjust curve25519 syscall costs

* cargo fmt
2022-06-13 22:39:07 +09:00
Michael Vines b05c7d91ed Fix derive_partial_eq_without_eq clippy lint 2022-05-22 22:22:21 -07:00
Justin Starry a1522d0024
Use consistent naming for compute unit limit (#25229)
* Use consistent naming for compute unit limit

* feedback
2022-05-18 13:14:31 +08:00
Tao Zhu b1b3702e6d
Prioritize transactions in banking stage by their compute unit price (#25178)
* - get prioritization fee from compute_budget instruction;
- update compute_budget::process_instruction function to take instruction iter to support sanitized versioned message;
- updated runtime.md

* update transaction fee calculation for prioritization fee rate as lamports per 10K CUs

* review changes

* fix test

* fix a bpf test

* fix bpf test

* patch feedback

* fix clippy

* fix bpf test

* feedback

* rename prioritization fee rate to compute unit price

* feedback

Co-authored-by: Justin Starry <justin@solana.com>
2022-05-16 12:06:33 +08:00
Jack May cde15ff687
support 64-bit prioritization fee (#25027) 2022-05-12 11:07:36 -07:00
samkim-crypto aba6a89517
Curve25519 syscall group ops (#25071)
* zk-token-sdk: implement group ops trait for curve25519

* zk-token-sdk: extend syscall trait implementation for group ops for ristretto

* zk-token-sdk: register curve25519 group ops to bpf loader

* zk-token-sdk: update curve25519_syscall_enabled address
2022-05-08 11:28:07 +09:00
samkim-crypto d9deab4d2c
Curve25519 point validation syscall (#23771)
* zk-token-sdk: add curve25519 basic ops

* zk-token-sdk: add bpf operations for curve25519 ops

* zk-token-sdk: rebase

* zk-token-sdk: add tests for curve25519 opertions

* zk-token-sdk: rustfmt

* zk-token-sdk: organize syscalls by trait

* zk-token-sdk: organize syscalls by trait

* zk-token-sdk: cleaning up

* zk-token-sdk: rename mods

* zk-token-sdk: cargo fmt

* zk-token-sdk: fix tests for edwards and ristretto

* zk-token-sdk: add Syscall object for curve point validation

* zk-token-sdk: docs for curve syscall traits

* zk-token-sdk: fix errors from rebase

* zk-token-sdk: update Vec to slice

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* zk-token-sdk: use enum with num-derive for curve ids

* zk-token-sdk: update vec to slice

* zk-token-sdk: make curve25519 tests be deterministic

* zk-token-sdk: rebase

* token-2022: re-organizing curve point validation

* token-2022: cargo fmt

* zk-token-sdk: minor

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2022-05-07 16:20:53 +09:00
Jack May e070c5ca38
default compute units per instruction (#24899) 2022-05-03 09:50:06 -07:00
Tao Zhu 0ed23899e7 directly use compute_budget MAX_UNITS and DEFAULT_UNITS 2022-03-18 08:53:11 -05:00
Tao Zhu a4cacf3389 add deterministic default cost 2022-03-18 08:53:11 -05:00
Dmitri Makarov 0a3a18744f Update the consumed compute units cost for hashing syscalls
This change prevents zero-cost computation of hash functions on
unbound number of zero-length slices of data.  The cost for each slice
is at least equal to the base cost of a memory operation, but could be
more for longer slices.
2022-02-23 02:32:41 +00:00
Jack May 3d9874b95a
Add fees to tx-wide caps (#22081) 2022-02-11 16:23:16 -08:00
Dmitri Makarov bee586c6fd
fix: Adjust mem op base cost to avoid breaking Raydium AMM Program (#22762) 2022-01-27 02:01:57 +00:00
Justin Starry cc76a73c49
Refactor: move compute budget runtime logic into solana-program-runtime (#22543) 2022-01-17 20:48:00 +08:00
Justin Starry 2c38a9213f
Revert "Refactor: move compute budget runtime logic into solana-program-runtime (#22533)" (#22542)
This reverts commit b27976626a.
2022-01-17 17:43:17 +08:00
Justin Starry b27976626a
Refactor: move compute budget runtime logic into solana-program-runtime (#22533) 2022-01-17 15:52:33 +08:00