Commit Graph

75 Commits

Author SHA1 Message Date
Michael Vines 6858950f76 Remove frozen ABI modules from solana-sdk 2020-10-20 16:11:30 -07:00
Trent Nelson 3c7b9c2938 Move remaining nonce utils from runtime to SDK 2020-09-30 05:45:42 +00:00
Jack May 2ff983647f
Move process_instruction defs to runtime (#12507) 2020-09-29 01:36:46 -07:00
carllin 06f84c65f1
Fix rooted accounts cleanup, simplify locking (#12194)
Co-authored-by: Carl Lin <carl@solana.com>
2020-09-28 16:04:46 -07:00
Michael Vines 93259f0bae Runtime feature activation framework 2020-09-25 11:40:36 -07:00
Justin Starry 6601ec8f26
Record and store invoked instructions in transaction meta (#12311)
* Record invoked instructions and store in transaction meta

* Enable cpi recording if transaction sender is some

* Rename invoked to innerInstructions
2020-09-24 22:36:22 +08:00
anatoly yakovenko c67f8bd821
Forward transactions to the expected leader instead of your own TPU port (#12004)
* Use PoHRecorder to send to the right leader

* cleanup

* fmt

* clippy

* Cleanup, fix bug

Co-authored-by: Carl <carl@solana.com>
2020-09-08 17:00:49 +08:00
Jack May 7c736f71fe
Make BPF Loader static (#11516) 2020-08-14 12:32:45 -07:00
carllin 7e25130529
Send votes from banking stage to vote listener (#11434)
*  Send votes from banking stage to vote listener

Co-authored-by: Carl <carl@solana.com>
2020-08-07 11:21:35 -07:00
Michael Vines 7db144c5da Remove legacy_system_instruction_processor0 2020-08-04 00:45:09 +00:00
Greg Fitzgerald 16eeea4f82
Move SendTransactionService to solana_runtime (#10972) 2020-07-09 18:28:26 +00:00
Ryo Onodera 39b3ac6a8d
Introduce automatic ABI maintenance mechanism (2/2; rollout) (#8012)
* Introduce automatic ABI maintenance mechanism (2/2; rollout)

* Fix stable clippy

* Change to symlink

* Freeze abi of Tower

* fmt...

* Improve dev-experience!

* Update BankSlotDelta

$ diff -u /tmp/abi8/*7dg6BreYxTuxiVz6aLvk3p2Z7GQk2cJqfGvC9h4FAoSj* /tmp/abi8/*9chBcbXVJ4fK7uGgydQzam5aHipaAKFw6V4LDFpjbE4w*
--- /tmp/abi8/bank__BankSlotDelta_frozen_abi__test_abi_digest_7dg6BreYxTuxiVz6aLvk3p2Z7GQk2cJqfGvC9h4FAoSj      2020-06-18 18:01:22.831228087 +0900
+++ /tmp/abi8/bank__BankSlotDelta_frozen_abi__test_abi_digest_9chBcbXVJ4fK7uGgydQzam5aHipaAKFw6V4LDFpjbE4w      2020-07-03 15:59:58.430695244 +0900
@@ -140,7 +140,7 @@
                                                         field u8
                                                             primitive u8
                                                         field solana_sdk::instruction::InstructionError
-                                                            enum InstructionError (variants = 34)
+                                                            enum InstructionError (variants = 35)
                                                                 variant(0) GenericError (unit)
                                                                 variant(1) InvalidArgument (unit)
                                                                 variant(2) InvalidInstructionData (unit)
@@ -176,6 +176,7 @@
                                                                 variant(31) CallDepth (unit)
                                                                 variant(32) MissingAccount (unit)
                                                                 variant(33) ReentrancyNotAllowed (unit)
+                                                                variant(34) MaxSeedLengthExceeded (unit)
                                                     variant(9) CallChainTooDeep (unit)
                                                     variant(10) MissingSignatureForFee (unit)
                                                     variant(11) InvalidAccountIndex (unit)

* Fix some merge conflicts...
2020-07-06 20:22:23 +09:00
carllin 7a71580d53
Add heaviest subtree utility functions (#10863)
Co-authored-by: Carl <carl@solana.com>
2020-07-01 08:45:32 +00:00
Greg Fitzgerald 50b3fa83a0
Move BankCommitmentCache to solana_runtime (#10816)
* Remove Blockstore member variable from BlockCommitmentCache

* Hoist is_confirmed_rooted() to its only caller

BlockCommitmentCache no longer depends on Blockstore

* Move BlockCommitmentCache to solana_runtime
2020-06-25 22:06:58 -06:00
Greg Fitzgerald 6ee222363e
Move BankForks to solana_runtime (#10637)
* Move BankForks to solana_runtime

* Update imports
2020-06-17 15:27:03 +00:00
Michael Vines 7e2651ca51
RPC simulateTransaction endpoint now returns program log output (#10432) 2020-06-06 10:18:28 -07:00
Michael Vines 1331c9a680 Add legacy_system_instruction_processor 2020-06-03 16:04:06 -07:00
Kristofer Peterson b7a32f01c0
Multi-version snapshot support (#9980)
* Multi-version snapshot support

* rustfmt

* Remove CLI options and runtime support for selection output snapshot version.
Address some clippy complaints.

* Muzzle clippy type complexity warning.

Despite clippy's suggestion, it is not currently possible to create type aliases
for traits and so everything within the 'Box<...>' cannot be type aliased.

This then leaves creating full blown traits, and either implementing
said traits by closure (somehow) or moving the closures into new structs
implementing said traits which seems a bit of a palaver.

Alternatively it is possible to define and use the type alias 'type ResultBox<T> = Result<Box<T>>'
which does seems rather pointless and not a great reduction in complexity but is enough to keep clippy happy.

In the end I simply went with squelching the clippy warning.

* Remove now unused Serialize/Deserialize trait implementations for AccountStorageEntry and AppendVec

* refactor versioned de/serialisers

* rename serde_utils to serde_snapshot

* move call to accounts_db.generate_index() back down to context_accountsdb_from_stream()

* update version 1.1.1 to 1.2.0
remove nested use of serialize_bytes

* cleanups

* Add back measurement of account storage entry serialization.
Remove construction of Vec and HashMap temporaries during serialization.

* consolidate serialisation test cases into serde_snapshot.
clean up leakage of implementation details in serde_snapshot.

* move short term / legacy snapshot code into child module

* add serialize_iter_as_tuple

* preliminary integration of following commit

commit 6d58b73c47294bfb93465d5a83cd2175660b6e6d
Author: Ryo Onodera <ryoqun@gmail.com>
Date:   Wed May 20 14:02:02 2020 +0900

    Confine snapshot 1.1 relic to versioned codepath

* refactored serde_snapshot, rustfmt
legacy accounts_db format now "owns" both leading u64s, legacy bank_rc format has none

* reduce type complexity (clippy)
2020-05-23 02:54:24 +09:00
Jack May 36627fb8b3
move builtin programs out of bank (#10132)
automerge
2020-05-19 19:45:30 -07:00
Kristofer Peterson 4ca352a344
Use serde provided serialization for atomics (#10096)
automerge
2020-05-18 08:30:27 -07:00
Jack May eb1acaf927
Remove archiver and storage program (#9992)
automerge
2020-05-14 18:22:47 -07:00
Jack May efad193180
Make default programs static (#9717) 2020-04-27 21:05:12 -07:00
Jack May 241a05fc52
Add native loader entry points (#9486) 2020-04-15 09:41:29 -07:00
Jack May ad0482be73
Revert "Add native loader entry points (#9275)" Breaks genesis_config abi (#9377)
This reverts commit ed86d8d1fc.
2020-04-08 14:36:18 -07:00
Jack May ed86d8d1fc
Add native loader entry points (#9275) 2020-04-03 17:40:59 -07:00
carllin 9dc69d9843
Store and compute node/stake state in EpochStakes struct (#8958)
* Store and compute needed bank state in EpochStakes struct
2020-03-25 12:19:15 -07:00
Trent Nelson fd00e5cb35
Store FeeCalculator with blockhash in nonce accounts (#8650)
* Copy current state version to v0

* Add `FeeCalculator` to nonce state

* fixup compile

* Dump v0 handling...

Since we new account data is all zeros, new `Current` versioned accounts
look like v0. We could hack around this with some data size checks, but
the `account_utils::*State` traits are applied to `Account`, not the
state data, so we're kind SOL...

* Create more representative test `RecentBlockhashes`

* Improve CLI nonce account display

Co-Authored-By: Michael Vines <mvines@gmail.com>

* Fix that last bank test...

* clippy/fmt

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-03-05 07:40:26 -07:00
Michael Vines 73063544bd Move shred_version module to sdk/ 2020-02-24 14:46:12 -07:00
Michael Vines 989355e885 Add ability to hard fork at any slot (#7801)
automerge
2020-01-24 17:27:04 -08:00
Trent Nelson 1ffd6b4b4d
Add program and runtime support for Durable Transaction Nonces (#6845)
* Rework transaction processing result forwarding

Durable nonce prereq

* Add Durable Nonce program API

* Add runtime changes for Durable Nonce program

* Register Durable Nonce program

* Concise comments and bad math

* Fix c/p error

* Add rent sysvar to withdraw ix

* Remove rent exempt required balance from Meta struct

* Use the helper
2019-12-07 12:54:10 -07:00
Rob Walker 7cf90766a3
add epoch_schedule sysvar (#6256)
* add epoch_schedule sysvar

* book sheesh!
2019-10-08 22:34:26 -07:00
Greg Fitzgerald fb39bd45d7
Revert "Rename solana-runtime to sealevel (#6239)" (#6247)
This reverts commit 2e921437cd.
2019-10-04 19:33:29 -06:00
Greg Fitzgerald 2e921437cd Rename solana-runtime to sealevel (#6239)
automerge
2019-10-04 15:02:44 -07:00
Rob Walker 5cbd1190b2
transaction batch (#5962)
* transaction batch

* fixup
2019-09-19 10:06:08 -07:00
Parth 7dfb735db9
randomize tx ordering (#4978)
Summary of Changes:
This change adds functionality to randomize tx execution for every entry. It does this by implementing OrderedIterator that iterates tx slice as per the order specified. The order is generated randomly for every entry.
2019-08-28 21:08:32 +05:30
Rob Walker 0ffe7a9c8f
plumb some rent (#5610)
* plumb some rent

* nits

* fixups

* fixups

* fixups
2019-08-23 14:04:53 -07:00
carllin 1dbb5c8647
Deserialize snapshots (#5417)
* Deserialize snapshots
2019-08-05 22:53:19 -07:00
Trent Nelson 111d0eb89b
runtime: Add bench for accounts::hash_internal_state (#5157)
* runtime: Add bench for accounts::hash_internal_state

* fixup! cargo fmt

* fixup! cargo clippy

* fixup! Use a more representitive number of accounts

* fixup! More descriptive name for accounts creation helper
2019-07-19 10:32:29 -06:00
Jack May 0dcdc37fec
Split BPF loader to match the rest of the programs (#4636) 2019-06-12 08:49:59 -07:00
Rob Walker e56430c9fb
make runtime depend on bpf_loader (#4601)
* make runtime depend on bpf_loader

* remove vote redundancy, move bpf_loader to genesis, export program\! from bpf_loader crate

* move bpf_loader specification into genesis

* bpf tests to use genesis with bpf

* need to avoid depending on programs, except for macros
2019-06-11 10:27:22 -07:00
sakridge 966b6999d1
Accounts index opt (#4621)
* Add accounts_index bench

* Don't take the accounts index lock unless needed

* Accounts_index remove insert return vec and add capacity stats

* Use hashbrown hashmap for accounts_index
2019-06-10 18:15:39 -07:00
Sagar Dhawan 688f8a669a
Add a storage accounts cache to Bank (#4578) 2019-06-06 17:40:01 -07:00
Sathish 182096dc1a
Create bank snapshots (#4244)
* Revert "Revert "Create bank snapshots (#3671)" (#4243)"

This reverts commit 81fa69d347.

* keep saved and unsaved copies of status cache

* fix format check

* bench for status cache serialize

* misc cleanup

* remove appendvec storage on purge

* fix accounts restore

* cleanup

* Pass snapshot path as args

* Fix clippy
2019-05-30 21:31:35 -07:00
Michael Vines 39b40dfff8
Remove runtime dependency on storage (#4480) 2019-05-30 10:54:28 -07:00
Michael Vines b37d2fde3d
Add storage mining pool (#4364)
* Add storage mining pool

* Set gossip port

* Add create-storage-mining-pool-account wallet command

* Add claim-storage-reward wallet command

* Create storage account upfront

* Add storage program to genesis

* Use STORAGE_ACCOUNT_SPACE

* Fix tests

* Add wallet commands to create validator/replicator storage accounts

* Add create_validator_storage_account()

* Storage stage no longer implicitly creates a storage account
2019-05-23 14:50:23 -07:00
Rob Walker 87414de3e2
switch over to passive stakes (#4295)
* add failing test

* switch over to passive stakes

* test multiple stakers
2019-05-16 08:23:31 -07:00
Rob Walker 628128b376
add passive staking to local_cluster (#4285)
* add passive staking to local_cluster

* add stake_program to genesis

* use equal stakes in local_cluster tests
2019-05-15 12:15:31 -07:00
carllin 3bd921264a
Move EpochSchedule into own module (#4272) 2019-05-13 16:24:32 -07:00
Rob Walker 0d2574f8f0
get DLL names from programs that made the DLL (#4269)
* get program names from programs

* fixup
2019-05-13 14:17:44 -07:00
Rob Walker 81fa69d347
Revert "Create bank snapshots (#3671)" (#4243)
This reverts commit abf2b300da.
2019-05-09 19:27:27 -07:00