Trent Nelson
b71e4bdc61
sdk: Move `NullSigner` to `signer` module
2021-05-11 13:07:58 -06:00
Trent Nelson
12bf6c06c3
sdk: Move `Presigner` to `signer` module
2021-05-11 13:07:58 -06:00
Trent Nelson
0eba6eb401
sdk: Move `Keypair` to `signer` module
2021-05-11 13:07:58 -06:00
Trent Nelson
af6f3d776e
sdk: Move `Signer` trait to own module
2021-05-11 13:07:58 -06:00
Dmitri Makarov
77272a17b3
Fix dump postprocessing in cargo-build-bpf ( #17165 )
2021-05-11 09:24:12 +00:00
Tyera Eulberg
a5ec3a0547
SignerSource: rename input scheme to `prompt`, default to bip44 solana base key ( #17154 )
...
* Rename ask to prompt
* Default to Solana bip44 base if no derivation-path
* Add SignerSource legacy field, support legacy ASK
* Update docs
* Fix docs: validator current doesn't support uri SignerSources
2021-05-10 19:28:47 -06:00
Jack May
8eb05d6ed4
Add Keccak256 syscall and sdk support ( #16498 )
2021-05-10 16:16:58 -07:00
Jack May
82fb6712e7
fix c program deploy help ( #17152 )
2021-05-10 15:38:01 -07:00
Jon Cinque
4b60b2863e
sdk: Add get_instance_packed_len for variable-size types ( #17092 )
...
* sdk: Add get_instance_packed_len for variable-size types
* Add comment for get_packed_len
* Add more tests
2021-05-10 23:31:02 +02:00
Christian Machacek
ff95e2aaa6
Add a make target to run the readelf utility on a compiled program
...
The readelf utility (already shipped with the solana tools) shows meta-information about ELF files, such as symbol tables. It is useful for investigating "unresolved symbol" errors that crop up at runtime.
This commit also fixes the objdump flags (two dashes are required and there is no "color" option) as well as a few typos.
2021-05-08 18:49:14 -07:00
Christian Machacek
6927d0c77e
Fix syscalls in the C SDK failing at runtime when compiled as C++ ( #17124 )
...
Some syscalls are wrongly declared "static" in solana_sdk.h, which makes clang++ assume they are local to the compilation unit. It therefore ignores the extern "C" {} block and mangles their names. While that doesn't break C++ compilation, the syscall fails at runtime with something along the lines of "ELF error: Unresolved symbol (_ZL26sol_create_program_addressPK13SolSignerSeediPK9SolPubkeyS4_)".
2021-05-08 16:31:50 +00:00
Ruud van Asseldonk
9abfa65920
Document that Transaction::sign might panic ( #17026 )
2021-05-04 08:32:21 -07:00
Tyera Eulberg
694c674aa6
Implement Bip32 for seed-phrase/passphrase signing ( #16942 )
...
* Add Keypair helpers for bip32 derivation
* Plumb bip32 for SignerSourceKind::Ask
* Support full-path querystring
* Use as_ref
* Add public wrappers for from_uri cases
* Support master root derivations (and fix too-deep print
* Add ask:// HD documentation
* Update ASK elsewhere in docs
2021-05-03 19:58:56 -06:00
Jeff Washington (jwash)
92b8b20ca5
AccountSharedData.lamports private ( #16985 )
2021-05-03 17:25:31 +00:00
Jeff Washington (jwash)
ac87bc40ca
tests: .lamports -> .lamports() ( #16976 )
2021-04-30 18:16:58 +00:00
Jeff Washington (jwash)
3f982fcf65
account.rent_epoch private ( #16974 )
2021-04-30 12:16:44 -05:00
Tyera Eulberg
d6f30b7537
Refactor SignerSource to expose DerivationPath to other kinds of signers ( #16933 )
...
* One use statement
* Add stdin uri scheme
* Convert parse_signer_source to return Result
* A-Z deps
* Convert Usb data to Locator
* Pull DerivationPath out of Locator
* Wrap SignerSource to share derivation_path
* Review comments
* Check Filepath existence, readability in parse_signer_source
2021-04-29 01:42:21 -06:00
Trent Nelson
cfc1cb1aee
SDK: Factor out pubkey on-curve test to a helper
2021-04-28 20:10:19 -06:00
Jeff Washington (jwash)
f533d3be77
Write account path impl ReadableAccount ( #16779 )
2021-04-28 15:29:22 -05:00
Jeff Washington (jwash)
9218b51de7
accountshareddata.executable is private ( #16882 )
2021-04-28 12:01:31 -05:00
Jeff Washington (jwash)
da3342759b
private AccountSharedData.rent_epoch ( #16877 )
2021-04-28 08:52:20 -05:00
Trent Nelson
4ce4f04c58
remote-wallet: `derivation-path` crate doesn't like empty trailing child indexes
2021-04-27 17:54:02 -06:00
Trent Nelson
722de942ca
SDK: More conversion for `DerivationPath`
2021-04-27 17:54:02 -06:00
Trent Nelson
9b7120bf73
SDK: More conversions for `Pubkey`
2021-04-27 17:54:02 -06:00
Jack May
9b3a59f030
Retain alloc'd and updated data in cpi ( #16850 )
2021-04-27 13:36:42 -07:00
Jeff Washington (jwash)
998cba74b5
AccountSharedData.executable() ( #16835 )
2021-04-27 09:12:17 -05:00
Jeff Washington (jwash)
603872685d
private AccountSharedData.owner ( #16760 )
...
* private AccountSharedData.owner
* fix perf test
2021-04-26 14:59:17 -05:00
behzad nouri
9706512115
removes old runtime feature gates in gossip and turbine ( #16633 )
2021-04-26 17:12:02 +00:00
Jeff Washington (jwash)
f2ab0384e4
owner -> owner() ( #16783 )
2021-04-26 17:06:40 +00:00
Justin Starry
8ce4a8d6ab
Annotate clock constants with computed values for quick refeerence ( #16812 )
2021-04-25 22:05:00 +08:00
Jeff Washington (jwash)
1a4a7059af
owner -> owner() ( #16785 )
2021-04-23 15:59:13 -05:00
Michael Vines
1500011fc6
get_packed_len() now correctly handles u32/i32 types
2021-04-23 13:39:42 -07:00
Jeff Washington (jwash)
48c07d32f0
WritableAccount.add/subtract_lamports ( #16750 )
...
* add/sub lamports
* make add/sub return Result
* sample replacements
* cleanup
* fix up a few tests as examples
* move enum, cleanup, impl from
* fmt
* cleanup
* add lamports.rs
2021-04-23 20:20:48 +00:00
Jeff Washington (jwash)
87e2e07d34
AccountSharedData.copy_into_owner_from_slice ( #16755 )
2021-04-23 09:34:08 -05:00
Jeff Washington (jwash)
fc12841d95
Readonlyaccounts ( #16743 )
...
* lamports -> lamports()
* format
2021-04-22 20:04:55 +00:00
Jeff Washington (jwash)
8a6b80095e
Set lamports ( #16747 )
...
* lamports = -> set_lamports()
* .lamports = X -> .set_lamports(X)
2021-04-22 13:53:06 -05:00
Jack May
be4df39a4c
Remove unactivated ristretto syscall ( #16727 )
2021-04-22 09:29:42 -07:00
Michael Vines
b8b54567b1
Clean up "APR" language around inflation rewards
2021-04-21 19:02:03 -07:00
Sebastian Bor
1a658c7f31
Allow SetUpgradeAuthority instruction in CPI calls ( #16676 )
...
* feat: allow SetAuthority in CLI calls
* chore: clippy match_like_matches_macro
* chore: clippy match_like_matches_macro
* chore: rename CLI to CPI
* chore: move check for cpi authorised instruction to syscalls
* chore: add set_upgrade_authority cpi test
* chore: assert upgrade authority was changed
* feat: gate set_upgrade_authority via cpi with a feature
* chore: move feature to the end of the list
* chore: remove white spaces
* chore: remove white spaces
* chore: update comment to rerun build
2021-04-22 00:06:59 +01:00
Jeff Washington (jwash)
03f7b251b8
ReadableAccount.data returns slice ( #16686 )
...
* ReadAbleAccount.data returns slice
* more slice fixup
* more slice
* slice
2021-04-20 16:41:16 -05:00
Jack May
08d5253651
Enforce host aligned memory for program regions ( #16590 )
2021-04-20 11:07:30 -07:00
Jack May
01786f684e
Remove unwrap ( #16652 )
2021-04-19 20:17:56 -07:00
Tyera Eulberg
185bbf2db5
Wrap derivation_path::DerivationPath ( #16609 )
...
* Replace custom DerivationPath impl
* Add method to parse full-path from str with hardening
* Convert Bip44 to trait
* Hoist more work on derivation-path
* Privatize Bip44 trait
2021-04-19 20:57:43 +00:00
Alexander Meißner
9dfcb921cf
Refactoring: Move KeyedAccounts to InvokeContext ( #15410 )
...
Collects all parametric occurrences and the construction of keyed_accounts and puts them into InvokeContext.
2021-04-19 18:48:48 +02:00
Michael Vines
a911ae00ba
clippy
2021-04-18 20:55:02 -07:00
Tyera Eulberg
52f4b96a80
Move derivation path into sdk ( #16603 )
...
* Move DerivationPath to sdk
* Remove eprintln
2021-04-16 22:03:24 +00:00
Trent Nelson
285f3c9d56
Feature-gate hash-based duplicate transaction check
2021-04-16 18:51:18 +00:00
Justin Starry
f641429056
Remove blake3 from bpf program dependencies ( #16506 )
2021-04-13 10:06:05 +00:00
Dmitri Makarov
db3bca7edd
Add llvm feature option to compile for Solana BPF target ( #16495 )
2021-04-13 07:20:18 +00:00
Justin Starry
85eb37fab0
Merge pull request from GHSA-8v47-8c53-wwrc
...
* Track transaction check time separately from account loads
* banking packet process metrics
* Remove signature clone in status cache lookup
* Reduce allocations when converting packets to transactions
* Add blake3 hash of transaction messages in status cache
* Bug fixes
* fix tests and run fmt
* Address feedback
* fix simd tx entry verification
* Fix rebase
* Feedback
* clean up
* Add tests
* Remove feature switch and fall back to signature check
* Bump programs/bpf Cargo.lock
* clippy
* nudge benches
* Bump `BankSlotDelta` frozen ABI hash`
* Add blake3 to sdk/programs/Cargo.lock
* nudge bpf tests
* short circuit status cache checks
Co-authored-by: Trent Nelson <trent@solana.com>
2021-04-13 00:28:08 -06:00
Jack May
fa83f3bd73
Return sysvars via syscalls ( #16422 )
2021-04-12 16:04:57 -07:00
Dmitri Makarov
78d1d59889
Augment BPF binary dumps to resolve call instruction targets
2021-04-12 18:36:41 +02:00
Jon Cinque
448d5be79f
docker: Expose all ports in Dockerfile, add back localnet.sh ( #16401 )
...
* docker: Expose all ports in Dockerfile, add back localnet.sh
* Add documentation for where to find containers
* Obliterate script
2021-04-11 21:13:57 +02:00
François Garillot
b08cff9e77
Simplify some pattern-matches ( #16402 )
...
When those match an exact combinator on Option / Result.
Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust ).
2021-04-08 12:40:37 -06:00
Jack May
878e52f0b9
Fix cargo-build/test-bpf --workspace ( #16431 )
2021-04-07 17:22:55 -07:00
Jack May
92f4018b07
Cleanup unsupported sysvars ( #16390 )
...
* Cleanup unsupported sysvars
* fix ser description
2021-04-06 00:08:03 -07:00
Dmitri Makarov
1359bceb5d
Bump bpf-tools to version v1.5 ( #16331 )
...
The new version of bpf-tools eliminates the separate
rust-bpf-sysroot. The Rust standard libraries for the BPF target are
built in tree when the compiler is built. The standard libraries code
is slightly more optimized and some reduction of compute budget can be
expected with this version of bpf-tools.
2021-04-04 13:04:22 +00:00
Jack May
bcd89dd34c
Fix BPF ELF layout ( #16256 )
...
* Fix BPF ELF layout
* whitespace
2021-03-31 08:51:19 +00:00
Jack May
f84e88f0a2
Cleanup nits ( #16211 )
2021-03-30 12:16:21 -07:00
sakridge
54c68ea83f
Drop write lock on sysvars ( #15497 )
...
* Drop write lock on sysvars
* adds env var for demoting sysvar write lock demotion
* moves demote logic to is_writable
* feature gates sysvar write lock demotion
* adds builtins to write lock demotion
* adds system program id to builtins
* adds Feature111...
* adds an abi-freeze test
* mvines set of builtin program keys
Co-authored-by: Michael Vines <mvines@gmail.com>
* update tests
* adds bpf loader keys
* Add test sysvar
* Plumb demote_sysvar to is_writable
* more plumbing of demote_sysvar_write_locks to is_writable
* patches test_program_bpf_instruction_introspection
* hard codes demote_sysvar_write_locks to false for serialization/encoding methods
* Revert "hard codes demote_sysvar_write_locks to false for serialization/encoding methods"
This reverts commit ae3e2d2e777437bddd753933097a210dcbc1b1fc.
* change the hardcoded ones to demote_sysvar_write_locks=true
* Use data_as_mut_slice
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
2021-03-30 10:05:09 -07:00
Trent Nelson
9ba9d2a8ae
Allow incomplete features in frozen-abi
2021-03-30 02:32:53 +00:00
Justin Starry
abada56ba1
Print the rust version when building bpf programs ( #16181 )
2021-03-29 14:17:08 +08:00
Justin Starry
aabe186e3f
sdk: Use u32::MAX from std to unbreak BPF builds ( #16171 )
2021-03-27 15:53:25 +00:00
Tyera Eulberg
433f1ead1c
Rpc: enable getConfirmedBlock and getConfirmedTransaction to return confirmed (not yet finalized) data ( #16142 )
...
* Add Blockstore block and tx apis that allow unrooted responses
* Add TransactionStatusMessage, and send on bank freeze; also refactor TransactionStatusSender
* Track highest slot with tx-status writes complete
* Rename and unpub fn
* Add commitment to GetConfirmed input configs
* Support confirmed blocks in getConfirmedBlock
* Support confirmed txs in getConfirmedTransaction
* Update sigs-for-addr2 comment
* Enable confirmed block in cli
* Enable confirmed transaction in cli
* Review comments
* Rename blockstore method
2021-03-26 16:47:35 -06:00
Jon Cinque
cffa851e0f
sdk: Add try_from_slice_unchecked for Borsh ( #16098 )
...
* sdk: Add try_from_slice_unchecked for Borsh
* Add tests
* Rename + clarify comment
* Rename back to unchecked
2021-03-26 23:37:35 +01:00
Dmitri Makarov
658ddd1c9c
Bump bpf-tools to version v1.4 ( #16152 )
2021-03-26 19:21:41 +00:00
Michael Vines
07273bfa9e
Show bpf-tools download progress
2021-03-25 12:23:51 -07:00
Jeff Washington (jwash)
66c42f62d8
make AccountSharedData.data private to abstract storage ( #16091 )
...
* format
* 2 more tests
* use
2021-03-25 11:04:20 -05:00
Ryo Onodera
6d5c6c17c5
Simplify account.rent_epoch handling for sysvar rent ( #16049 )
...
* Add some code for special local testing
* Add comment to store_account_and_update_capitalization
* Simplify account.rent_epoch handling for sysvar rent
* Introduce *_for_test functions
* Add deprecation messages to existing api
2021-03-25 15:23:20 +09:00
Trent Nelson
8b3de72e2a
program: Correct clamp in Message::signer_keys()
2021-03-24 23:27:24 -06:00
Kristofer Peterson
6bc858a888
Refactored ShortU16Visitor::visit_seq() to reject overflows, extra leading zeros and ensure one-to-one encoding.
2021-03-24 21:53:35 -06:00
Trent Nelson
9153cb9237
sdk: ShortU16 - rename variables for clarity
...
ShortU16's implementation embeds its usage as the length of a
ShortVec, confusingly referring to both a 'len' and a 'size'
at the same time.
2021-03-24 21:53:35 -06:00
Trent Nelson
cc6dcb48d4
sdk: Add ShortU16 deser test
2021-03-24 21:53:35 -06:00
Dmitri Makarov
664ed76523
Bump bpf-tools to version v1.3 ( #16068 )
...
* Bump bpf-tools to version v1.3
This brings in the fix for increased compute budget that wasn't caught
when bpf-tools v1.2 were released.
* Adjust BPF test programs instruction counts
2021-03-24 07:16:38 +00:00
Jeff Washington (jwash)
2d24d13046
AccountsSharedData: data copy on write ( #15800 )
...
* Arc<AccountData>
* try custom serializer
* adapt test from Behzad's change
* clippy
* simplify serialization
* remove abi example derive
* refactor 'take'
* remove serialization
* remove serialize calls
* remove account_data
* remove intos
* remove left over file
2021-03-23 15:19:31 -05:00
Jeff Washington (jwash)
6f5d8d18e9
remove new alloc on deserialization ( #15636 )
2021-03-23 14:52:59 -05:00
Trent Nelson
482c027d3b
sq: optimize
2021-03-22 12:01:57 -06:00
Dmitri Makarov
14e45155e4
Bump bpf-tools to v1.2 and get rid of xargo
2021-03-19 12:09:15 +01:00
Justin Starry
4c5660ba7a
Santize instruction index when loading instruction from sysvar ( #15942 )
2021-03-19 09:32:41 +08:00
Jeff Washington (jwash)
9760fded2d
remove old code ( #15988 )
2021-03-18 17:51:49 +00:00
Jack May
7f500d610c
Add Close instrruction and tooling to upgradeable loader ( #15887 )
2021-03-17 21:39:29 -07:00
Trent Nelson
12399157f5
SDK: Allow integer math in bump allocator
2021-03-17 22:23:18 -06:00
Trent Nelson
854e6766ce
SDK: Ovf in epoch_schedule
2021-03-17 22:23:18 -06:00
Trent Nelson
98d7673a03
sdk/program: switch allow to mod-level for integer_arithmetic lint
2021-03-17 22:23:18 -06:00
Tyera Eulberg
5b2b824a53
Sdk: remove integer arithmetic ( #15962 )
...
* Fix timing
* Fix secp256k1_instruction
* Fix secp256k1 tests
2021-03-18 01:33:50 +00:00
Trent Nelson
bf33ce8906
sdk: Add accessor for signer pubkeys of a tx message
2021-03-16 22:09:46 -06:00
Jeff Washington (jwash)
806bfdd67b
set_data_from_slice ( #15854 )
...
* data_ensure_equal_to_slice
* rename and change to copy
2021-03-16 16:56:26 -05:00
Michael Vines
eb19e11688
Add cargo-bpf-test --no-run flag, matching cargo-test
2021-03-16 08:23:03 +00:00
Michael Vines
a2eb655322
=1.7.0
2021-03-16 07:51:07 +00:00
Jack May
5760cf0f41
nit: fix spelling ( #15908 )
2021-03-15 23:47:57 -07:00
Ryo Onodera
74aa32175b
Show flags for accounts in tx by solana confirm ( #15804 )
...
* Show flags for accounts in tx by solana confirm
* Address review comments
* Improve comment a bit
* Apply suggestions from code review
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Further apply review suggestions
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-03-16 14:44:48 +09:00
Jack May
ad9901d7c6
Charge compute budget for bytes passed via cpi ( #15874 )
2021-03-15 22:41:44 -07:00
Michael Vines
8567b41d5f
Improve Instruction::new deprecation warning
2021-03-15 20:04:20 -07:00
Jeff Washington (jwash)
c09ea2c314
More AccountSharedData construction ( #15844 )
...
* one more AccountSharedData construction
* one more construct
2021-03-15 19:27:17 -05:00
carllin
c1ba265dd9
Wallclock BankingStage Throttle ( #15731 )
2021-03-15 17:11:15 -07:00
Jack May
60e5fd11c9
Display actual account length ( #15875 )
2021-03-15 14:17:56 -07:00
Michael Vines
0c9ca5522c
Bump version to v1.7.0
2021-03-13 09:01:21 +00:00
behzad nouri
f2865dfd63
requires stakes for propagating crds values through gossip ( #15561 )
2021-03-12 15:50:14 +00:00
Tyera Eulberg
e5b644e830
Add trait for saturating arithmetic ( #15812 )
...
* Add SaturatingArithmetic trait
* Use Duration saturating arithmetic
* Use new macro to fix poh_config
2021-03-12 06:22:40 +00:00
Jack May
cc38ae72e7
Skip deserialization of readonly accounts ( #15813 )
2021-03-11 19:28:21 -08:00
Ryo Onodera
4bbeb9c033
Remove old feature: simple_capitalization ( #15763 )
...
* Remove old feature: simple_capitalization
* Fix another failing test in core
* Finish up test cleanup
* Further clean up a bit
2021-03-12 11:12:40 +09:00
Jeff Washington (jwash)
3419a5446e
AccountSharedData.set_data ( #15781 )
...
* account.set_data and resize_data
* remove data_resize
2021-03-11 16:40:45 -06:00
Trent Nelson
79ac1997de
sdk: add macro for unchecked div with const denominator
2021-03-11 08:44:36 +00:00
Trent Nelson
24d18b3cf2
docs: add docs links for crates published to crates.io
2021-03-11 08:38:18 +00:00
Jack May
478518308d
Share RO and Executable accounts within invocations ( #15799 )
2021-03-10 23:04:00 -08:00
Jeff Washington (jwash)
1135ffd595
mut data refs as slice ( #15782 )
2021-03-10 15:28:03 -06:00
Jack May
369e13b111
cleanup old runtime features ( #15787 )
2021-03-10 09:48:41 -08:00
Dmitri Makarov
c5a5d7457e
Bump bpf-tools to v1.1 ( #15776 )
2021-03-10 18:13:38 +01:00
Jeff Washington (jwash)
52e54e1100
account.data -> data() ( #15778 )
2021-03-09 22:31:33 +00:00
Jeff Washington (jwash)
8a3135d17b
Account->AccountSharedData ( #15691 )
2021-03-09 15:06:07 -06:00
carllin
2bee9435f3
Add tracer key for tracing transaction path through the network ( #15732 )
2021-03-08 19:31:00 -08:00
Tyera Eulberg
e3e8179f2d
Sdk: start to appease clippy's integer arithmetic check ( #15736 )
...
* Move to module-level clippy allowance
* Fix stake_weighted_timestamp math
* Fix genesis_config
* Fix shred_version
* Fix hard_forks
* Fix process_instruction
* Add ArithmeticOverflow ix error
* Fix nonce_keyed_account
* Update BankSlotDelta frozen abi due to new ix error
2021-03-08 18:37:57 -07:00
Ryo Onodera
8b0c6db871
Remove old feature: cumulative_rent_related_fixes ( #15754 )
2021-03-08 09:58:50 +09:00
Jack May
b53cb8eb2d
Deprecate Instruction::new ( #15695 )
2021-03-04 05:46:48 +00:00
Jack May
4a05210d8e
Clarify Instruction::new ( #15686 )
...
Not related to local-cluster, merging
2021-03-03 17:39:04 -08:00
Jeff Washington (jwash)
be35c1c1b7
add execute detail timings ( #15638 )
2021-03-03 17:07:45 -06:00
Justin Starry
b8e28b8c55
Remove unnecessary packet meta abi lock ( #15653 )
2021-03-03 17:31:52 +08:00
Jack May
a9c8dbfd0c
Add error reporting to system program ( #15644 )
2021-03-02 21:44:25 -08:00
Jack May
4789a13a6e
configure rust-bpf toolchain for each tree ( #15620 )
2021-03-02 00:45:28 -08:00
Trent Nelson
ef63ffce7d
Bump ed25519-dalek to 1.0.1
2021-03-01 21:10:46 +00:00
sakridge
8399851d11
check program owners ( #15495 )
...
* check program owners
* BankSlotDelta should change because InstructionError variant added
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-02-26 22:21:34 +00:00
Tyera Eulberg
eddb7f98f5
Check vote account initialization ( #15503 )
...
* Check account data_len on Vote account init
* Check account data populated on update_cached_accounts
2021-02-24 10:00:48 -07:00
Michael Vines
fd3b71a2c6
cargo fmt
2021-02-19 20:08:41 -08:00
Michael Vines
995bd0cb6b
Rename IOError to BorshIoError
2021-02-19 10:54:39 -08:00
Michael Vines
6a8dd86722
Remove unix path separators
2021-02-19 08:22:36 -08:00
Jack May
48785b507b
Bump Rust-BPF to v1.46 ( #15273 )
2021-02-18 11:30:08 -08:00
Jack May
02432a548f
Cleanup old features ( #15391 )
2021-02-18 09:56:11 -08:00
Jon Cinque
0f6f6080f3
sdk: Add Borsh support for types and utilities ( #15290 )
...
* sdk: Add Borsh to Pubkey
* Add serialization error for easier borsh integration
* Add Borsh usage to banks-client and sdk
* Rename SerializationError -> IOError
* Add new errors to proto
* Update Cargo lock
* Update Cargo.lock based on CI
* Clippy
* Update ABI on bank
* Address review feedback
* Update sanity program instruction count test
2021-02-18 11:14:56 +01:00
Tyera Eulberg
fcee227021
Add lamports overflow test for nonce withdraw ( #15383 )
2021-02-18 01:37:13 +00:00
Trent Nelson
7f7370c306
Re-allow clippy::integer_arithmetic at crate-level
2021-02-17 13:55:08 -07:00
Jon Cinque
3ac7e09de6
docs: Remove references to "create_address_with_seed" ( #15339 )
2021-02-17 14:25:02 +01:00
Tyera Eulberg
b821a5d8dd
Clean nonce
2021-02-16 19:25:00 -08:00
Tyera Eulberg
7e17a0d3bb
Move fn to sdk
2021-02-16 19:25:00 -08:00
Trent Nelson
b3256aa722
Bump rand_core to 0.6.2
...
https://rustsec.org/advisories/RUSTSEC-2021-0023
2021-02-15 22:51:35 +00:00
Trent Nelson
1a20ab968f
sdk: sanitize `Hash` base58 input
2021-02-13 08:40:35 +00:00
Jack May
6650fbf443
Add per-byte logging cost ( #15279 )
2021-02-12 00:55:17 +00:00
Michael Vines
47c60f8e98
Clean up mainnet-beta inflation candidate features
2021-02-10 17:46:22 -08:00
Tyera Eulberg
da6753b8c0
Warp timestamp and extend max-allowable-drift for accommodate slow blocks ( #15204 )
...
* Remove timestamp_correction feature gating
* Remove timestamp_bounding feature gating
* Remove unused deprecated ledger code
* Remove unused deprecated unbounded-timestamp code
* Enable independent adjustment of fast/slow timestamp bounding
* Update timestamp bounds to 25% fast, 80% slow; warp timestamp
* Update bank hash test
* Add PR number to feature
Co-authored-by: Michael Vines <mvines@gmail.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
2021-02-09 15:49:00 -07:00
Michael Vines
dc7041ba07
Require lockup authority to change withdraw authority on locked stake ( #14861 )
2021-02-05 22:40:07 -08:00
Michael Vines
2a60dd8492
Add w3m's inflation pubkeys ( #15142 )
2021-02-05 08:46:09 -08:00
Ryo Onodera
c69027e5aa
chore: bump serde from 1.0.118 to 1.0.122 ( #15126 )
...
* chore: bump serde from 1.0.118 to 1.0.122
* Update programs/bpf/Cargo.lock
2021-02-05 19:23:24 +09:00
Michael Vines
863f08f8d3
Sort inflation candidates alphabetically
2021-02-05 07:16:23 +00:00
sotcsa
e908a4b3fc
Inflation Nomination for sotcsa ( #15105 )
2021-02-04 21:45:17 -08:00
Jack May
bba1b49663
Generate keypair file for c program deployment ( #15080 )
...
* Generate keypair file for c program deployment
* Build and use solana-keygen in test-stable-perf
2021-02-04 13:56:12 -08:00
bonsfi
53dab29528
Add LowFeeValidation Nomination ( #15098 )
2021-02-04 10:50:44 -08:00
calvinzhou-rockx
c6f572c331
Enable inflation candidate for RockX ( #15099 )
2021-02-04 10:39:33 -08:00
DimAn
d87e0c3f1d
Inflation Nomination for Diman ( #15083 )
2021-02-04 09:04:23 -08:00
rk-p2p
2ed074ba2a
Nomination candidate for p2pvalidator ( #15079 )
2021-02-04 08:40:14 -08:00
Michael Vines
c3ba70300b
Correct stakeconomy::vote::id() ( #15062 )
2021-02-03 12:39:55 -08:00
Jack May
d24d5fba0e
Upgradeable loader max_data_len limit ( #15039 )
2021-02-03 09:16:25 -08:00
buburuza27
f2d415cf13
Nomination candidate for buburuza ( #15047 )
2021-02-03 08:30:44 -08:00
Jack May
286e4d6924
bump rust-bpf-sysroot to v0.14 ( #15040 )
2021-02-03 10:43:38 +00:00
bunghi
87815ae1fd
Nomination candidate for bunghi ( #15036 )
...
* Update feature_set.rs
* Update feature_set.rs
* Update sdk/src/feature_set.rs
* Update feature_set.rs
* Update sdk/src/feature_set.rs
Co-authored-by: Michael Vines <mvines@gmail.com>
2021-02-03 10:10:38 +00:00
Trent Nelson
894b412aef
docs: bump nofiles recommendations to match maps
2021-02-02 21:59:21 -07:00
dependabot[bot]
1df93fa2be
chore: bump serde from 1.0.112 to 1.0.118 ( #14828 )
...
* chore: bump serde from 1.0.112 to 1.0.122
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.112 to 1.0.122.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.122 )
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
* Update frozen_abi digest following serde update
* Revert "chore: bump serde from 1.0.112 to 1.0.122"
This reverts commit a3ef4442a4c985144ae2bd7ceaf8899a7ab8d7c0.
* Revert "[auto-commit] Update all Cargo lock files"
This reverts commit c41c3b005fb1ccade55155302c52cd5736c4b55f.
* chore: bump serde from 1.0.112 to 1.0.118
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.112 to 1.0.118.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.112...v1.0.118 )
Signed-off-by: dependabot[bot] <support@github.com>
* [auto-commit] Update all Cargo lock files
* Remove serum-dex pinning
* blind commit!
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: Ryo Onodera <ryoqun@gmail.com>
2021-02-02 23:28:16 +09:00
Brian Long
8e0fdff17c
Inflation Nomination for BL ( #14972 )
2021-02-01 20:21:30 -08:00
Leopold Schabel
c06568f3db
Certus One inflation enablement feature pair ( #14961 )
2021-02-01 08:12:01 -08:00
Michael Vines
e0f6695cc2
Update sdk/src/feature_set.rs
2021-01-30 10:04:50 -08:00
Stakeconomy.com
4ba9e39941
Update feature_set.rs
2021-01-30 10:04:50 -08:00
Michael Vines
15baf43d1e
Template for an Inflation Candidate nomination
...
To submit your nomination:
1. Replace all instances of "my_name" with a suitable alternative then address the "TODO" code comments
2. Submit a new Github pull request and work with the project contributors to merge your pull request
2021-01-30 10:04:50 -08:00
nampdn
f98889adc0
style(spacing): reformat tab spacing
2021-01-29 23:08:24 -08:00
Michael Vines
a7ff1684f5
Template for an Inflation Candidate nomination
...
To submit your nomination:
1. Replace all instances of "my_name" with a suitable alternative then address the "TODO" code comments
2. Submit a new Github pull request and work with the project contributors to merge your pull request
2021-01-29 23:08:24 -08:00
Jack May
07cef5a557
Buffer authority must match upgrade authority for deploys and upgrades ( #14923 )
2021-01-29 12:43:42 -08:00
Trent Nelson
85b5dbead6
Add feature for pending SPL Token self-transfer fix
2021-01-29 04:19:33 +00:00
Tyera Eulberg
ffa5c7dcc8
Deprecate commitment variants ( #14797 )
...
* Deprecate commitment variants
* Add new CommitmentConfig builders
* Add helpers to avoid allowing deprecated variants
* Remove deprecated transaction-status code
* Include new commitment variants in runtime commitment; allow deprecated as long as old variants persist
* Remove deprecated banks code
* Remove deprecated variants in core; allow deprecated in rpc/rpc-subscriptions for now
* Heavier hand with rpc/rpc-subscription commitment
* Remove deprecated variants from local-cluster
* Remove deprecated variants from various tools
* Remove deprecated variants from validator
* Update docs
* Remove deprecated client code
* Add new variants to cli; remove deprecated variants as possible
* Don't send new commitment variants to old clusters
* Retain deprecated method in test_validator_saves_tower
* Fix clippy matches! suggestion for BPF solana-sdk legacy compile test
* Refactor node version check to handle commitment variants and transaction encoding
* Hide deprecated variants from cli help
* Add cli App comments
2021-01-26 19:23:07 +00:00
Jack May
4a4881d30f
Update find_program_address docs ( #14840 )
2021-01-25 16:03:26 -08:00
Jack May
74c83e6854
Rotate feature key: use loaded executable accounts ( #14838 )
2021-01-25 15:34:45 -08:00
Michael Vines
cbffab7850
Upgrade to Rust v1.49.0
2021-01-23 19:16:36 -08:00
sakridge
191193289f
Upgrade sha2 to 0.9.3 ( #14746 )
2021-01-22 22:25:22 -08:00
Michael Vines
bf1943e489
Add solana-test-validator --warp-slot argument
2021-01-22 21:17:02 -08:00
Jack May
e505a9b209
Revert disabling script ( #14788 )
2021-01-23 01:08:06 +00:00
Jack May
77572a7c53
Track account writable deescalation ( #14626 )
2021-01-22 15:28:01 -08:00
Michael Vines
3c6dbd21d2
Add ic_msg()/ic_logger_msg() macros
2021-01-21 21:41:33 +00:00
Michael Vines
072e5e54d8
Add generalized voting process to enable full inflation
2021-01-20 23:37:21 -08:00
Trent Nelson
447e3de1f2
Nonce address doesn't sign AdvanceNonceAccount
2021-01-21 04:14:36 +00:00
Trent Nelson
2783aee483
SDK: Sanitize base58 signature input
2021-01-20 23:59:26 +00:00
Trent Nelson
250b3969d4
SDK: Sanitize base58 pubkey input
2021-01-20 23:59:26 +00:00
Tyera Eulberg
a7086a0f83
Cli: promote commitment to a global arg + config.yml ( #14684 )
...
* Make commitment a global arg
* Add commitment to solana/cli/config.yml
* Fixup a couple Display/Verbose bugs
2021-01-20 09:48:10 -07:00
Jack May
a480b63234
Bail on small deploy buffers ( #14677 )
2021-01-20 01:56:44 +00:00
Jack May
e3bd9e5300
Prevent the invoke and upgrade of programs in the same tx batch ( #14653 )
...
* Prevent the invoke and upgrade of programs in the same tx batch
* Pass program address as writable in the upgrade instruction
2021-01-19 16:24:44 -08:00
behzad nouri
c6ae0667e6
feature gates turbine retransmit peers patch ( #14631 )
2021-01-19 04:16:19 +00:00
Jack May
6e8a1ba7de
Load executable accounts from invoke context ( #14574 )
2021-01-14 00:19:22 -08:00
Tyera Eulberg
b0e6e29527
Update timestamp max allowable drift to 50% of PoH ( #14531 )
...
* Repurpose warp-timestamp feature for general bump
* Change max_allowable_drift to 50%
* Fill in PR#
* Fix rpc test setup
2021-01-11 23:27:30 +00:00
Jack May
ec48631fc5
Bail on all CPI errors ( #14500 )
...
* Bail on all CPI errors
* whitespace
2021-01-09 02:27:39 +00:00
Jack May
58487c6360
Add buffer authority to upgradeable loader ( #14482 )
2021-01-08 09:37:57 -08:00
Jeff Washington (jwash)
773b21b34e
consolidate DEFAULT_HASHES_PER_TICK ( #14463 )
2021-01-07 09:49:42 -06:00
Jeff Washington (jwash)
938d482135
consolidate constants related to time for future refactoring ( #14440 )
2021-01-07 09:49:24 -06:00
Jack May
5eacc5d08d
Enable program upgrades via CPI ( #14449 )
2021-01-06 14:31:14 -08:00
Jack May
a8b5a32b50
Gate cpi program account passing ( #14443 )
2021-01-05 21:53:41 +00:00
Ryo Onodera
aa4da339ff
Improve solana catchup ( #14313 )
...
* Improve solana catchup
* Overidable port, retry, args error clean up
* print cleanup
* Reduce diff
* Tweak warns a bit
2021-01-05 10:10:27 +09:00
Jack May
0619805806
Upgradeable programs needs program account's address as program id ( #14417 )
2021-01-04 21:45:05 +00:00
carllin
5affd8aa72
Add secondary indexes ( #14212 )
2020-12-31 18:06:03 -08:00
Jack May
2d8dacb72b
Gate CPI authorized programs ( #14361 )
2020-12-30 18:13:37 -08:00
Justin Starry
3d0cd2cdb0
Add --test arg to cargo-test-bpf ( #14342 )
2020-12-30 04:03:26 +00:00
Jack May
5524938a50
Limit CPI instruction size ( #14317 )
2020-12-29 01:14:17 +00:00
Trent Nelson
3881ae10fb
Deinitialize nonce data upon zero balance
2020-12-22 19:37:26 -07:00
Tyera Eulberg
7042f11791
Feature-gate stake-program-v3 ( #14232 )
...
* Remove deprecated legacy stake program
* Add legacy stake program
* Strip out duplicative legacy code
* Feature-deploy stake-program-v3
* Add ownership check in stake processor
2020-12-22 11:20:38 -07:00
Jack May
ab205b682a
Upgradeable programs called same as non-upgradeable ( #14239 )
...
* Upgradeable programs called same as non-upgradeable
* nudge
2020-12-22 09:26:55 -08:00
Jack May
3316e7166c
Rework upgradeable loader cli ( #14209 )
2020-12-21 13:02:53 -08:00
behzad nouri
7b08cb1f0d
improves performance in replay-stage ( #14217 )
...
bank::vote_accounts returns a hash-map which is slow to iterate, but all uses
only require an iterator:
https://github.com/solana-labs/solana/blob/b3dc98856/runtime/src/bank.rs#L4300-L4306
Similarly, calculate_stake_weighted_timestamp takes a hash-map whereas it only
requires an iterator:
https://github.com/solana-labs/solana/blob/b3dc98856/sdk/src/stake_weighted_timestamp.rs#L21-L28
2020-12-21 19:18:19 +00:00