mergify[bot]
8ee5fbc5c0
simulateTransaction now returns the correct error code if accounts are provided as input ( #21716 )
...
(cherry picked from commit 824994db69f8f09fc2e051abe4f5a8c0f090a123)
Co-authored-by: Michael Vines <mvines@gmail.com>
2021-12-09 01:12:42 +00:00
mergify[bot]
f2a6b94e5c
SDK: Add stdlib.h include to pull in abort()
( #21700 ) ( #21705 )
...
(cherry picked from commit 923720f529c8decd564194ae0c3b77fc720a8a95)
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-12-08 17:31:11 +00:00
mergify[bot]
ef970bb14a
- Implicitly fixes invoke_context.return_data not being reset between instructions in process_message. ( #21671 ) ( #21684 )
...
- Lets InvokeContext::process_cross_program_instruction() handle the first invocation depth too.
- Marks InvokeContext::verify(), InvokeContext::verify_and_update() and InvokeContext::process_executable_chain() private.
- Renames InvokeContext::process_cross_program_instruction() to InvokeContext::process_instruction().
- Removes InvokeContext::new_mock_with_sysvars().
(cherry picked from commit 1df88837c8d11c40bcdf2800ecc4606493bbfd67)
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
2021-12-08 10:48:49 +00:00
Jarred Nicholls
cabd851904
Avoid entropy sources when constructing a solana_program::message::Message.
...
The solana-program crate can be used in certain embedded environments (HSMs) where
the source of entropy, whether used for cryptographic purposes or not, is tightly
controlled. In these cases, using the default OS source of entrophy is not always
acceptable. Thus, using the default Rust stdlib entropy source for seeding its
default hasher, is prohibited. This means any use of HashMap/HashSet must be able
to be constructed and used with a custom hasher implementation.
This commit removes the use of Itertools::unique() to dedupe Instructions that are
being compiled into a new Message, which uses a default-configured HashMap
under-the-hood. Instead, we use a BTreeSet which does not invoke any entropy
source in order to seed a hash implementation.
(cherry picked from commit 4da435f2a031423d2c1194b90070edad63945cf2)
2021-12-07 22:36:21 -08:00
mergify[bot]
2d2ef59550
Ensure we have keys to activate these features ( #21669 ) ( #21674 )
...
(cherry picked from commit 45e56c599d726766f7c4440a73ff29b77fa5abf6)
Co-authored-by: Sean Young <sean@mess.org>
2021-12-07 23:24:11 +00:00
mergify[bot]
b7b56d5016
Docs: Solflare web/app updates ( #21540 ) ( #21668 )
...
* Update Solflare description
* Add Solflare to mobile wallets
* Sort mobile wallets alphabetically
* Sort web wollets alphabetically
* Update docs/src/wallet-guide/apps.md
* Update docs/src/wallet-guide/apps.md
* Update docs/src/wallet-guide/web-wallets.md
* Update docs/src/wallet-guide/web-wallets.md
* Update docs/src/wallet-guide/apps.md
Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
(cherry picked from commit a2477c1f32404b17d09072edf8ab81c5d0678fc6)
Co-authored-by: Boris Vujicic <turshija@gmail.com>
2021-12-07 16:44:28 +00:00
mergify[bot]
18e3a635b4
docs: Fix SOL staked formula ( #21615 ) ( #21667 )
...
Fix the formula on the proposal page: https://docs.solana.com/implemented-proposals/ed_overview/ed_validation_client_economics/ed_vce_state_validation_protocol_based_rewards
(cherry picked from commit b57097ef18ab250aeb4ea8d3d111748ab4c41440)
Co-authored-by: Melroy van den Berg <melroy@melroy.org>
2021-12-07 16:01:12 +00:00
mergify[bot]
2b4347d502
Add option to reclaim accounts-cluster-bench accounts/lamports (backport #21656 ) ( #21658 )
...
* Add option to reclaim accounts-cluster-bench accounts/lamports (#21656 )
* Add option to reclaim accounts-cluster-bench accounts/lamports
* lint
(cherry picked from commit 205fd957226417992acf72f0e8f13f63cbea5b62)
# Conflicts:
# accounts-cluster-bench/Cargo.toml
* Fix conflict
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-12-07 09:18:48 +00:00
mergify[bot]
87accd16d8
Fixup flaky tests ( #21617 ) ( #21647 )
...
* Fixup flaky tests
* Fixup listeners
(cherry picked from commit f493a882588be8467998ef71ac6cb226683fd41a)
Co-authored-by: carllin <carl@solana.com>
2021-12-07 03:54:14 +00:00
mergify[bot]
0e969015fc
Add offline and fee-payer utilities to CLI vote module ( #21579 ) ( #21649 )
...
* create-vote-account: add offline, nonce, fee_payer capabilities
* vote-authorize: add offline, nonce, fee-payer
* vote-update-things: add offline, nonce, fee-payer
* withdraw-vote: add offline, nonce, fee-payer
* close-vote-acct: add fee-payer
* Allow WithdrawVoteAccount to empty account, since offline operations cannot perform account state queries as in CloseVoteAccount
* Fix lint
* Update offline-signing docs
* Add some parse unit tests
* Add offline integration test
(cherry picked from commit 873fe81bc048599b540cf511872380d77be38f56)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-12-07 01:51:02 +00:00
mergify[bot]
46935c022e
Ensure that StakeDelegations and StakeHistory serde ( #21640 ) ( #21653 )
...
Add tests to StakeDelegations and StakeHistory to ensure that the outer
types serialize and deserialize correctly to/from the inner types.
(cherry picked from commit da4015a959e1ae318092d95933300d7fab356175)
Co-authored-by: Brooks Prumo <brooks@solana.com>
2021-12-07 01:44:49 +00:00
mergify[bot]
8a7106bc08
Remove activated feature for filtering invalid stakes from rewards ( #21641 ) ( #21651 )
...
(cherry picked from commit a1adcb23b6d62c5fc0b08193a2d2c8106448c87f)
Co-authored-by: Justin Starry <justin@solana.com>
2021-12-07 00:58:31 +00:00
mergify[bot]
89d2f34a03
Reject vote withdraws that create non-rent-exempt accounts (backport #21639 ) ( #21645 )
...
* Reject vote withdraws that create non-rent-exempt accounts (#21639 )
* Reject vote withdraws that create non-rent-exempt accounts
* fix mocked instruction test
(cherry picked from commit e123883b2698070acac4543d2f372ede18a60ad7)
# Conflicts:
# sdk/src/feature_set.rs
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com>
2021-12-07 00:42:01 +00:00
mergify[bot]
b3fa1e4550
Move transaction error code into new module ( #21635 ) ( #21638 )
...
(cherry picked from commit 3dab1e711d7ae92e30cee4d05a0231397dae4475)
Co-authored-by: Justin Starry <justin@solana.com>
2021-12-06 20:11:20 +00:00
mergify[bot]
58c755e1d4
Rework docs for Pubkey::find_program_address and friends ( #21528 ) ( #21637 )
...
* Rework docs for Pubkey::find_program_address and friends
* Remove circular dependency
* Minor tweaks
* Apply suggestions from code review
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Sort solana-program dev-dependencies
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(cherry picked from commit d1c101cde2a258106dbb86239830fc97f64d078b)
Co-authored-by: Brian Anderson <andersrb@gmail.com>
2021-12-06 19:04:35 +00:00
mergify[bot]
60085305b4
Fix spelling of 'Borsh' ( #21624 )
...
(cherry picked from commit f3c2803af92c67272050a4c75ba64826a9d6e2b4)
Co-authored-by: Brian Anderson <andersrb@gmail.com>
2021-12-06 05:31:28 +00:00
mergify[bot]
b4c8e095bd
adds back position field to coding-shred-header ( #21600 ) ( #21620 )
...
https://github.com/solana-labs/solana/pull/17004
removed position field from coding-shred-header because as it stands the
field is redundant and unused.
However, with the upcoming changes to erasure coding schema this field
will no longer be redundant and needs to be populated.
(cherry picked from commit cd17f63d818fc5f403678f670a9384579a5cfb9c)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-12-05 16:40:22 +00:00
mergify[bot]
3e28ffa884
Bump RpcClient node versions ( #21612 ) ( #21613 )
...
* Bump blockhash/fee api check versions
* Bump snapshot api check version
(cherry picked from commit 3e5a5a834f2b1e1e80e65ec0e196c9db6cfbb2fa)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-12-05 01:08:22 +00:00
Jeff Biseda
9c6b95e1e1
fix distance calculation in get_closest_completion ( #21601 )
2021-12-03 22:36:46 -08:00
Michael Vines
4c4bc873a0
Revert "Disable brew update"
...
This reverts commit 7261268572ddb79aae0636c16fdd5fa6ea39e1b3.
2021-12-03 22:11:32 -08:00
Michael Vines
7261268572
Disable brew update
2021-12-03 21:57:06 -08:00
Michael Vines
a86e81fee9
Use gnu tar
2021-12-03 21:48:11 -08:00
dependabot[bot]
446089edb4
chore: bump retain_mut from 0.1.4 to 0.1.5 ( #21599 )
...
Bumps [retain_mut](https://github.com/upsuper/retain_mut ) from 0.1.4 to 0.1.5.
- [Release notes](https://github.com/upsuper/retain_mut/releases )
- [Commits](https://github.com/upsuper/retain_mut/compare/v0.1.4...v0.1.5 )
---
updated-dependencies:
- dependency-name: retain_mut
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-03 22:11:42 -07:00
fee1-dead
c4a9c8b5e9
Remove dependency on hex
( #21567 )
...
* Remove dependency on `hex`
* Update lock file
* Use `debug_struct` instead of own format
* Share code, add test, and fix rent_epoch spelling
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-12-03 20:53:35 -07:00
tjshipe
e130b2cffc
Add reduce only to mango instruction parsing ( #21583 )
...
* add reduce only to mango instruction parsing
* yarn format
2021-12-04 00:21:42 +00:00
carllin
a433bb310d
Add ability to update entire vote state ( #20014 )
2021-12-03 16:01:21 -05:00
Michael Vines
4dcf594856
solana-test-validator no longer limits the size of the genesis archive
...
When using `--clone` with a large number of accounts it is possible to
surpass the default 10MB limit
2021-12-03 12:36:09 -08:00
Michael Vines
c9bfc99c72
Unvendor OpenSSL for Windows to avoid CI troubles with perl.exe
2021-12-03 19:42:44 +00:00
Michael Vines
689b8d720e
Drop obsolute branches from backport candidates
2021-12-03 10:21:09 -08:00
Brooks Prumo
46fe56171b
Make StakeHistory clone-on-write ( #21573 )
2021-12-03 12:10:29 -06:00
Justin Starry
1430b58a6d
Remove deprecated slow epoch boundary methods ( #21568 )
2021-12-03 17:59:10 +00:00
Michael Vines
377efefead
Update OSX build to XCode 12
...
Vendored OpenSSL is failing to build on the Travis default OS X image
2021-12-03 09:26:34 -08:00
Michael Vines
b8837c04ec
Reformat imports to a consistent style for imports
...
rustfmt.toml configuration:
imports_granularity = "One"
group_imports = "One"
2021-12-03 09:19:13 -08:00
Brooks Prumo
0ef1b25e4b
Make StakeDelegations clone-on-write ( #21542 )
2021-12-03 08:54:38 -06:00
Alexander Meißner
1a4a039913
Adds feature reject_empty_instruction_without_program. ( #21591 )
2021-12-03 15:47:18 +01:00
Alexander Meißner
015250f96c
Feature gates for rbpf v0.2.16 ( #21590 )
...
- Adds feature reject_section_virtual_address_file_offset_mismatch.
- Adds feature start_verify_shift32_imm.
- Enables enable_symbol_and_section_labels only in the rbpf-cli.
2021-12-03 15:45:25 +01:00
Alexander Meißner
a9d5ef2055
Cleanup: InvokeContext accessors ( #21574 )
...
* Removes blockhash accessors from InvokeContext.
* Removes lamports_per_signature accessors from InvokeContext.
* Removes return_data accessors from InvokeContext.
* Removes feature_set accessor from InvokeContext.
* Removes instruction_recorders and instruction_index accessors from InvokeContext.
* Moves get_sysvars() into InvokeContext.
* Removes compute_meter parameter from InvokeContext::new().
* Removes InvokeContext::new_mock_with_sysvars_and_features().
* Removes InvokeContext::update_timing().
2021-12-03 12:15:22 +01:00
dependabot[bot]
dab0e8fdc7
chore:(deps): bump @metaplex/js from 4.5.1 to 4.6.0 in /explorer ( #21588 )
...
Bumps [@metaplex/js](https://github.com/metaplex/js ) from 4.5.1 to 4.6.0.
- [Release notes](https://github.com/metaplex/js/releases )
- [Changelog](https://github.com/metaplex/js/blob/main/CHANGELOG.md )
- [Commits](https://github.com/metaplex/js/compare/v4.5.1...v4.6.0 )
---
updated-dependencies:
- dependency-name: "@metaplex/js"
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-03 09:09:10 +00:00
dependabot[bot]
70de8313df
chore:(deps): bump @blockworks-foundation/mango-client in /explorer ( #21587 )
...
Bumps [@blockworks-foundation/mango-client](https://github.com/blockworks-foundation/mango-client-v3 ) from 3.2.9 to 3.2.10.
- [Release notes](https://github.com/blockworks-foundation/mango-client-v3/releases )
- [Commits](https://github.com/blockworks-foundation/mango-client-v3/commits )
---
updated-dependencies:
- dependency-name: "@blockworks-foundation/mango-client"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-03 09:09:02 +00:00
dependabot[bot]
877a05ec19
chore:(deps): bump @solana/spl-token-registry in /explorer ( #21586 )
...
Bumps [@solana/spl-token-registry](https://github.com/solana-labs/token-list ) from 0.2.556 to 0.2.588.
- [Release notes](https://github.com/solana-labs/token-list/releases )
- [Changelog](https://github.com/solana-labs/token-list/blob/main/CHANGELOG.md )
- [Commits](https://github.com/solana-labs/token-list/compare/v0.2.556...v0.2.588 )
---
updated-dependencies:
- dependency-name: "@solana/spl-token-registry"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-03 09:08:55 +00:00
Jarred Nicholls
18a16ad956
Support building solana-program on 32-bit architectures that do not ( #21577 )
...
have 64-bit atomics by using a Mutex<u64> on 32-bit architectures.
Currently the usage of atomics are only in functions that support
tests and benchmarks.
2021-12-03 01:18:21 +00:00
Michael Vines
1ae9cdcb43
RPC: Ensure innerInstructions/logMessages metadata is null
when --enable-cpi-and-log-storage
is disabled
2021-12-02 16:24:54 -08:00
Tyera Eulberg
2b269dbe0e
Ledger-tool: only require ledger dir when necessary ( #21575 )
...
* Don't canonicalize ledger_path unless ledger_path will be used
* Single use statement
2021-12-02 17:23:51 -07:00
Brooks Prumo
bdc33ba0a1
Remove unnecessary Option ( #21569 )
2021-12-02 20:19:22 +00:00
Tao Zhu
bf5b7f5d7f
report compute units without tx_wide_compute_cap feature enabled ( #21421 )
2021-12-02 12:14:57 -06:00
Jeff Washington (jwash)
f0b32b75ab
AcctIdx: use ZeroLamport trait ( #21552 )
2021-12-02 12:10:11 -06:00
Jeff Washington (jwash)
314605e149
AcctIdx: test cleanup ( #21550 )
2021-12-02 12:09:37 -06:00
behzad nouri
9886366977
exempts AccountsHashes from stake check ( #21565 )
...
Otherwise getHealth fails if account hashes are not propagated.
2021-12-02 18:01:32 +00:00
Jack May
976eb81d4f
Cleanup the bank's use of nonces ( #21246 )
2021-12-02 09:57:05 -08:00
Alexander Meißner
bfdb775ffc
Unifies ThisInvokeContext and dyn trait InvokeContext. ( #21563 )
2021-12-02 18:47:16 +01:00