Alexey Skibin
108a02cfd4
Add off-chain messages support ( #27456 )
2022-10-17 11:19:12 -04:00
Dmitri Makarov
d6813b98d2
chore: move programs/bpf to programs/sbf
2022-10-13 11:40:40 -04: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
Kevin Heavey
061bed0a8c
More missing derives ( #27418 )
...
* add Eq, PartialEq to EpochInfo
* add Eq, PartialEq related to transactions and messages
* add Eq, PartialEq to Ed25519SignatureOffsets
* add Eq, PartialEq to FeatureSet
* add Eq, PartialEq to fee.rs
* add Eq, PartialEq to GenesisConfig
* don't add Eq to GenesisConfig because floats
* add Eq, PartialEq to PohConfig
* add Eq, PartialEq to SecpSignatureOffsets
* add some missing derives to transaction_context.rs
* add Eq, PartialEq to ProcessedSiblingInstruction
2022-10-11 12:59:58 -07:00
Jeff Biseda
15050b14b9
use signed repair request variants ( #28283 )
2022-10-10 14:09:45 -07:00
apfitzge
3781c0668f
separate account locks validation from creating the locks ( #28292 )
2022-10-07 12:23:18 -05:00
Dmitri Makarov
f4dd24491f
Migrate SDK from BPF to SBF
2022-10-07 08:57:06 -04:00
Alessandro Decina
f6fee4ac3a
Serialization refactor ( #28251 )
...
* Use infallible, unchecked methods to write into the serialization buffer
We serialize in two steps: first we compute the size of the buffer, then
we write into it. Therefore there's no need to check if each individual
write fits the buffer - we know it does we just computed the required
size.
* serialize_parameters: remove extra loop/borrows
Remove one extra loop over accounts to gather account lengths. Also
gather all accounts at once and avoid temporary borrows.
* Move creating MemoryRegions for serialized parameters from create_vm to serialize_parameters
This is in preparation of using multiple MemoryRegions once we land direct account mapping.
* bpf_loader: introduce internal API to build serialization buffer/regions
This is prep work for landing the direct_mapping feature, which maps account
data in their own memory regions.
* serialization: fix after API changes
2022-10-07 07:45:05 +01:00
Justin Starry
ddf95c181c
RPC: Support versioned txs in getFeeForMessage API ( #28217 )
...
* RPC: Support versioned txs in getFeeForMessage API
* Update sdk/program/src/message/sanitized.rs
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2022-10-05 00:00:34 +08:00
Jeff Washington (jwash)
7b4a6ded5b
remove feature return_none_for_zero_lamport_accounts ( #28144 )
2022-10-03 12:22:56 -07:00
Ashwin Sekar
84acef007c
Add bench test for voting threads ( #28031 )
2022-09-27 12:12:22 -07: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
Alessandro Decina
b9f4c8e3c0
BorrowedAccount: add set_data_from_slice(), make set_data() take owned values ( #27836 )
...
* BorrowedAccount: add set_data_from_slice(), make set_data() take owned values
set_data() used to take a slice and would force alloc+copy if the caller
has owned values (eg account creation, account lookup table).
Expose set_data_from_slice() for callers that have slices, and switch
set_data() to taking an owned Vec.
* BorrowAccount: refactor common accounts_update_delta code in helper method
* BorrowedAccount: add extend_from_slice()
This allows avoiding copies appending entries to account lookup tables.
* BorrowedAccount: remove unnecessary ifs around update_accounts_resize_delta
2022-09-24 01:37:02 +01:00
behzad nouri
9ee53e594d
patches clippy errors from new rust nightly release ( #28028 )
2022-09-23 20:57:27 +00:00
Jeff Biseda
206cc9407b
allow unsigned repair requests ( #27910 )
2022-09-23 10:11:08 -07:00
Alessandro Decina
bad09812e3
AccountSharedData: optimize set_data_from_slice
...
Remove memcmp and try to avoid allocations by trying to reuse or extend
existing capacity.
2022-09-23 11:31:33 +01:00
behzad nouri
9a57c64f21
patches clippy errors from new rust nightly release ( #27996 )
2022-09-22 22:23:03 +00:00
Justin Starry
108b245e6b
Require program account to be writable in extend program data ix ( #27911 )
...
* Require program account to be writable in extend program data ix
* feedback
2022-09-22 12:03:06 +08:00
Justin Starry
00b0a92ec4
Support sending versioned txs in rpc client ( #27933 )
...
* Support sending versioned txs in rpc client
* Revert adding instructions_mut function
2022-09-22 01:25:43 +00:00
dependabot[bot]
ca6f13a14d
chore: bump sha3 from 0.10.2 to 0.10.4 ( #27656 )
...
* chore: bump sha3 from 0.10.2 to 0.10.4
Bumps [sha3](https://github.com/RustCrypto/hashes ) from 0.10.2 to 0.10.4.
- [Release notes](https://github.com/RustCrypto/hashes/releases )
- [Commits](https://github.com/RustCrypto/hashes/compare/sha3-v0.10.2...sha3-v0.10.4 )
---
updated-dependencies:
- dependency-name: sha3
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
* Revert sha3 bump in zk-token-sdk
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>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2022-09-21 15:31:42 -06:00
dependabot[bot]
c4fa849844
chore: bump itertools from 0.10.3 to 0.10.5 ( #27962 )
...
* chore: bump itertools from 0.10.3 to 0.10.5
Bumps [itertools](https://github.com/rust-itertools/itertools ) from 0.10.3 to 0.10.5.
- [Release notes](https://github.com/rust-itertools/itertools/releases )
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-itertools/itertools/commits )
---
updated-dependencies:
- dependency-name: itertools
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>
2022-09-21 15:28:49 -06:00
dependabot[bot]
00e4313542
chore: bump regex from 1.5.6 to 1.6.0 ( #27678 )
...
* chore: bump regex from 1.5.6 to 1.6.0
Bumps [regex](https://github.com/rust-lang/regex ) from 1.5.6 to 1.6.0.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.5.6...1.6.0 )
---
updated-dependencies:
- dependency-name: regex
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>
2022-09-21 18:09:33 +00:00
Justin Starry
b9700244b5
Increase transaction account lock limit from 64 to 128 ( #27242 )
...
* Increase transaction account lock limit from 64 to 256
* fix bpf test
* Reduce lock limit from 256 to 128
2022-09-15 13:50:14 -04:00
Jeff Washington (jwash)
138d5ed5b0
don't return zero lamport accounts from 'load' with feature ( #27793 )
...
* don't return zero lamport accounts from 'load'
* add feature
* rename
2022-09-15 08:46:32 -07:00
Ashwin Sekar
c74df830b1
Add structure to collect and coalesce vote packets ( #27558 )
...
* Add structure to collect and coalesce vote packets
Will be used in banking stage to throw out extraneous vote packets
before processing
* pr comments
* Update inner lock to arc to improve performance
2022-09-14 00:44:26 -07:00
Will Hickey
c0e4379f43
Whickey/version v1.15 ( #27739 )
...
* Bump version to v1.13.0
* Bump version to v1.14.0
* Bump version to v1.15.0
2022-09-13 09:06:15 -05:00
behzad nouri
4f22ee8f9b
uses varint encoding for vote-state lockout offsets
...
The commit removes CompactVoteStateUpdate and instead reduces serialized
size of VoteStateUpdate using varint encoding for vote-state lockout
offsets.
2022-09-12 16:31:20 +00:00
behzad nouri
f6fbc47b2d
adds serde varint encoder/decoder
...
#[derive(Deserialize, Serialize)]
struct Foo {
#[serde(with = "serde_varint")]
field: u64,
...
}
2022-09-12 16:31:20 +00:00
Christian Kamm
90b8a3a44d
Remove KeypairInsecureClone trait and add insecure_clone() instead ( #27396 )
...
See discussion in #26248
2022-09-12 14:59:41 +00: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
dependabot[bot]
7a1f4ffa6b
chore: bump sha2 from 0.10.2 to 0.10.5 ( #27620 )
...
* chore: bump sha2 from 0.10.2 to 0.10.5
Bumps [sha2](https://github.com/RustCrypto/hashes ) from 0.10.2 to 0.10.5.
- [Release notes](https://github.com/RustCrypto/hashes/releases )
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.10.2...sha2-v0.10.5 )
---
updated-dependencies:
- dependency-name: sha2
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>
2022-09-08 14:07:27 -06:00
dependabot[bot]
f338aa62ba
chore: bump serde from 1.0.143 to 1.0.144 ( #27511 )
...
* chore: bump serde from 1.0.143 to 1.0.144
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.143 to 1.0.144.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.143...v1.0.144 )
---
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>
2022-09-07 16:54:44 -06:00
Brian Anderson
28f979b5a5
Fix solana_program::vote docs ( #27621 )
2022-09-07 13:05:52 -06:00
DimAn
6899af26b0
keygen: add the ability to use derivation path for new & grind commands ( #21614 )
...
* keygen: add --use-derivation-path for new & grind
* keygen: add prompt:// uri scheme to new and grind
* fmt
* migrate to clap-v3-utils
* Revert "migrate to clap-v3-utils"
This reverts commit 77f33262ce6c4e95ac1cc62cca32749516f7f357.
* Revert "fmt"
This reverts commit 038cd4ce9628c57dec1f5a4716e2c5baacbe57b3.
* Revert "keygen: add prompt:// uri scheme to new and grind"
This reverts commit 029ea61409a1a16ba2c45483ade2c01f84f25fac.
* - remove `use` from arg
- fix issue from first commit with default value for derivation path
- refactor arg definition and acquiring
2022-09-07 14:31:40 -04:00
Brooks Prumo
1cf9077d06
Include the Epoch Accounts Hash in the Bank hash ( #27541 )
2022-09-07 10:10:49 -04:00
dependabot[bot]
43f0e981dc
chore: bump generic-array from 0.14.5 to 0.14.6 ( #27531 )
...
* chore: bump generic-array from 0.14.5 to 0.14.6
Bumps [generic-array](https://github.com/fizyk20/generic-array ) from 0.14.5 to 0.14.6.
- [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>
* [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>
2022-09-06 14:05:17 -06:00
Alexander Meißner
12d2147efa
Adds `IndexOfAccount` type ( #27599 )
...
Adds the type `IndexOfAccount`.
2022-09-06 11:31:40 +02:00
Alexander Meißner
6f2e556b16
Cleanup: `TransactionContext` ( #27595 )
...
* Lets instruction_accounts_lamport_sum() have the &InstructionContext as parameter directly.
* Updates docu comments.
* Uses accessors methods instead of accessing private properties of other structs.
* Adds #![deny(clippy::indexing_slicing)].
* Has get_signers() return a Result instead of using unwrap().
* Removes InvokeContext::get_key_of_account_at_index().
2022-09-05 16:29:02 +02:00
Alexander Meißner
0b94d5af18
Refactor: `InstructionContext::configure()` ( #27400 )
...
* Replaces InstructionContext::new() by InstructionContext::configure().
Adds TransactionContext::get_next_instruction_context().
* Switch back to using references as parameters.
* Hoists InstructionContext::configure() from TransactionContext::push() into InvokeContext::push().
* Moves InstructionContext::config() to the beginning of InvokeContext::push().
* Hoists InstructionContext::configure() from InvokeContext::push() into InvokeContext::process_instruction().
* Review feedback: Updates docu comments.
2022-09-03 10:34:57 +02: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
Brian Anderson
dce99f1d0d
Fix broken macro doc links ( #27125 )
...
These don't resolve correctly in Rust 1.63.
2022-09-01 21:14:25 +00:00
Florian Hartwig
12f921386f
Make CommitmentLevel constructors const ( #27367 )
...
make CommitmentLevel constructors const
2022-08-31 13:20:53 -06:00
Alexander Meißner
84b5a2bcf4
Refactor: `TransactionContext` ABIv2 adjustments ( #27476 )
...
* Marks methods and structs which are only to be used by the program runtime.
* Removes TransactionContext::get_keys_of_accounts().
* Adds InstructionContext::get_instruction_accounts_lamport_sum().
2022-08-31 17:47:47 +02:00
Brooks Prumo
757e46c3c7
Set cap for new allocations per transaction ( #27385 )
2022-08-29 14:30:48 -04:00
Brennan Watt
46a48760db
Switch concurrent replay from feature to param ( #27401 )
...
* Switch concurrent replay from feature to param
2022-08-26 12:36:02 -07:00
Justin Starry
56cebf9da2
Relax keypair ordering restriction for `VersionedTransaction::try_new` ( #27397 )
...
* Relax keypair ordering restriction for VersionedTransaction::try_new
* feedback
2022-08-26 11:25:20 +02:00
Yihau Chen
a19b5c1536
chore: allow test_is_writable_account_cache ignore clippy::get_first ( #27414 )
2022-08-26 15:33:25 +08:00
Tao Zhu
5e71f339c9
Add a SanitizedMessage type that caches writable accounts indexes ( #27317 )
...
* Add a SanitizedMessage type that caches writable accounts indexes
* Add is_writable_account_cache to both SanitizedMessage variants, cache is initialized in constructors
2022-08-25 16:33:41 -05:00
Tyera Eulberg
1095cdf436
Fixup docs in sdk to use new clients ( #27362 )
...
Fixup client docs in sdk
2022-08-24 21:29:56 -06:00
carllin
ad6c2d8c5f
Handle VoteStateUpdates for outdated roots bigger than slots in existing VoteState ( #27323 )
...
* Set root to latest vote in tower <= prposed vote state
* fixup tests
* PR comments
* feature gate
2022-08-24 20:42:57 -05:00