Commit Graph

439 Commits

Author SHA1 Message Date
Dmitri Makarov d6813b98d2 chore: move programs/bpf to programs/sbf 2022-10-13 11:40:40 -04:00
Alexander Meißner 58a9bf74e1
Moves AlignedMemory from solana_rbpf into a new crate: memory-managment. (#28079)
* Moves AlignedMemory from solana_rbpf into a new crate: memory-managment.

* Makes cargo clippy happy.

* deny clippy::integer_arithmetic

* Makes write_unchecked() take a generic parameter.

* Restricts AlignedMemory::write_unchecked() to Pod types.

* Adds DynamicLayoutArray.

* Moves is_memory_aligned() into crate root.
2022-10-05 08:39:55 +02:00
Tyera Eulberg 10db560278
Add TpuConnectionCache and begin disentangling quic and udp (#28080)
* Add new empty crates and tpu_connection_cache module

* Add BaseTpuConnection trait and impl for udp and quic

* Add ConnectionPool trait and impl for udp and quic (quic-client doesn't build)

* Add a couple quic-specific apis to QuicConfig (from ConnectionCache)

* Re-export quic- and udp-client modules to prep for move

* Move ConnectionCacheStats to new module

* Move consts

* Duplicate ConnectionCache into tpu_connection_cache (doesn't build)

* Move methods to QuicConfig and remove unneeded methods (doesn't build)

* Genericize new ConnectionCache

* Rename new struct

* Copy unit tests (tests don't build)

* Fixup unit tests

* Move quic-specific test to quic-client crate

* DRY by using ConnectionPool method

* Prevent evicting pool about to be used
2022-09-30 19:51:50 -06:00
Tyera Eulberg c24eaa36f8
Split up solana-client (#27246)
* Move thin-client to new crate

* Move tpu client and varieties to new crate

* Move pubsub-client to new crate

* Move rpc-client to new crate

* Add client-common crate to avoid circular dependencies

* Move rpc_cache and make less pub

* Remove unused unpub modules

* Add nonce-client

* Remove unused dependencies

* Fix rpc_client docs

* Move spinner to calling clients

* Rename client-common to rpc-client-api

* Remove unnecessary rpc_ prefix

* Remove unused ClientErrorKind variant

* Remove unnecessary Client prefix

* Move mod declarations into lib.rs and remove unnecessary files

* Rename nonce-client and remove redundant module name

* Restore mock_sender_for_cli in solana-client
2022-08-24 05:34:35 +00:00
Ryo Onodera ad3e10f3bd
Patch crossbeam-epoch to avoid overhead (#26555) 2022-08-09 21:41:51 +09:00
Ryo Onodera ecda3bec01
Revert "Remove resolver=2 from Cargo.toml and add it to the Windows build" (#27011)
Revert "Remove resolver=2 from Cargo.toml and add it to the Windows build (#26706)"

This reverts commit 2f6f5b11da.
2022-08-09 17:58:32 +09:00
Will Hickey 2f6f5b11da
Remove resolver=2 from Cargo.toml and add it to the Windows build (#26706) 2022-07-22 11:07:49 -05:00
Justin Starry 8e8c6e60ff
Allow extending upgradeable program data account length (#26386)
* Allow extending upgradeable program data account length

* Add is_writable check

* Fix cargo version

* System program fix, comment, and test

* Switch to u32 for serialized bytes value in ix
2022-07-11 22:46:32 +01:00
Dmitri Makarov 4dfaf15a46 Add cargo bpf tools that invoke newer sbf tools and issue deprecation notice 2022-06-03 14:12:42 -07:00
Dmitri Makarov 66366615bb Generate syscall headers 2022-05-05 19:50:54 -07:00
kirill lykov 76c80d9573
Add clap-v3-utils (#24096)
* Add clap-utils-v3

* update Cargo.lock

* address PR comment: rename crate

* address PR comment: rename to clap-v3-utils

* update dep version

* fix clippy errors

* update Cargo.lock
2022-04-19 11:48:34 +02:00
Will Hickey a5e740431a
Add resolver = 2 to fix Windows build error on Travis CI (#24196) 2022-04-11 16:39:14 -05:00
Tyera Eulberg fb67ff14de
Remove replica-node crates (#24152) 2022-04-06 16:52:19 -06:00
Tyera Eulberg 102dd68a03
Rename AccountsDb plugins to Geyser plugins (#23604) 2022-03-14 19:18:46 -06:00
Brooks Prumo d20dd21600
Sort tables in Cargo.toml files (#23602) 2022-03-11 11:05:57 -06:00
Justin Starry 813725dfec
Fix ed25519 builtin program handling (#23182)
* Fix ed25519 builtin program handling

* Fix tests

* Add integration tests for processing transactions with ed25519 ixs

* Fix another test

* fix formatting
2022-02-16 18:48:55 +00:00
anatoly yakovenko d343713f61
Optimize packet dedup (#22571)
* Use bloom filter to dedup packets

* dedup first

* Update bloom/src/bloom.rs

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

* Update core/src/sigverify_stage.rs

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

* Update core/src/sigverify_stage.rs

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

* Update core/src/sigverify_stage.rs

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

* fixup

* fixup

* fixup

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2022-01-19 13:58:20 -08:00
Lijun Wang 60850d71ce
Removed solana-accountsdb-plugin-postgres from the monorepo as it has its own (#22567)
Removed solana-accountsdb-plugin-postgres from the monorepo as it has its own  standalone repo now
2022-01-19 10:46:19 -08:00
Michael Vines 69e632a337 Adapt zk-token-{sdk,proof-program} for use in the monorepo 2022-01-05 08:51:18 -08:00
Michael Vines d896ff74ec Remove Apple M1 resolver workaround 2021-12-21 08:30:36 -08:00
Michael Vines 8d22ca5076 Add helper crate to generate syscalls.txt 2021-12-14 21:20:13 -08:00
Justin Starry 9b41ddd9ba
Add address lookup table program (#21616)
* Add address lookup table program

* feedback
2021-12-10 16:02:16 -05:00
Michael Vines 0937e407fa Remove solana-crate-features 2021-11-30 23:28:07 -08:00
ryleung-solana 4663b86b8b
Add DOS test that sends large transactions (#20624)
Problem
We need a test that stress-tests the network using large transactions, including sending multiple large transactions that reference independent sets of accounts, so they can be executed in parallel.

Summary of Changes
Adds such a test. Also adds a version of the tuner program that runs for a configurable number of iterations.
2021-10-29 15:57:32 -04:00
sakridge a8d78e89d3
Move test-validator to own module to reduce core dependencies (#20658)
* Move test-validator to own module to reduce core dependencies

* Fix a few TestValidator paths

* Use solana_test_validator crate for solana_test_validator bin

* Move client int tests to separate crate

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-10-29 01:27:07 +00:00
Jack May 785fcb63f5
Remove support for dynamically loaded native programs (#20444) 2021-10-06 14:53:23 -07:00
Michael Vines eb4ce3dfed Remove unused program 2021-10-06 10:37:58 -07:00
Lijun Wang fe97cb2ddf
AccountsDb plugin framework (#20047)
Summary of Changes

Create a plugin mechanism in the accounts update path so that accounts data can be streamed out to external data stores (be it Kafka or Postgres). The plugin mechanism allows

Data stores of connection strings/credentials to be configured,
Accounts with patterns to be streamed
PostgreSQL implementation of the streaming for different destination stores to be plugged in.

The code comprises 4 major parts:

accountsdb-plugin-intf: defines the plugin interface which concrete plugin should implement.
accountsdb-plugin-manager: manages the load/unload of plugins and provide interfaces which the validator can notify of accounts update to plugins.
accountsdb-plugin-postgres: the concrete plugin implementation for PostgreSQL
The validator integrations: updated streamed right after snapshot restore and after account update from transaction processing or other real updates.
The plugin is optionally loaded on demand by new validator CLI argument -- there is no impact if the plugin is not loaded.
2021-09-30 14:26:17 -07:00
Jack May 8fee9a2e1a
Dont call precompiled programs (#19930) 2021-09-29 06:25:08 +00:00
Jeff Washington (jwash) b2152be3b2
introduce bucket map (#19848)
* introduce bucket map

* rename BucketMap bits to num_buckets_pow2

* use u64::BITS

* Store the number of buckets in BucketMapConfig as a regular number

* remove redundant type aliases

* use Slot from sdk

* use Arc::clone() instead

* fixup erase drives

* rename num_buckets to max_buckets

* add doc to BucketMapConfig::new()

* add more documentation

* rename to DEFAULT_CAPACITY_POW2

* doc

* add more traits while we can

* rename capacity to capacity_pow2

* fix a naming for max_buckets_pow2

* remove unused/incorrect DataBucket::bytes

* rework benches a bit

* fixup bench docs

* rename create_bucket_capacity_pow2 to bucket_capacity_when_created_pow2

* rename BucketMapKeyValue to BucketItem

* rename to items_in_range

* remove values()

* remove addref and unref

* remove more addref and unref

* resurect addref and unref since tests use 'em for now

* rename to BucketStorage

* move stats in bucket_stats

* remove specializations (i don't think they are needed)

* move MaxSearch and RefCount into lib.rs

* move BucketItem to bucket_item.rs

* add doc

* keys no longer returns an option

* Revert "remove specializations (i don't think they are needed)"

This reverts commit b22f78e072cf0f7107851b08e58c2e3fead3f64d.

Co-authored-by: Brooks Prumo <brooks@solana.com>
2021-09-17 15:11:27 -05:00
Sean Young 8b9e472a6c feat: add ed25519 signature verify program
Solang requires a method for verify ed25519 signatures. Add a new
builtin program at address Ed25519SigVerify111111111111111111111111111
which takes any number of ed25519 signature, public key, and message.
If any of the signatures fails to verify, an error is returned.

The changes for the web3.js package will go into another commit, since
the tests test against a released solana node. Adding web3.js ed25519
testing will break CI.
2021-09-05 18:59:37 +01:00
Lijun Wang 8378e8790f
Accountsdb replication installment 2 (#19325)
This is the 2nd installment for the AccountsDb replication.

Summary of Changes

The basic google protocol buffer protocol for replicating updated slots and accounts. tonic/tokio is used for transporting the messages.

The basic framework of the client and server for replicating slots and accounts -- the persisting of accounts in the replica-side will be done at the next PR -- right now -- the accounts are streamed to the replica-node and dumped. Replication for information about Bank is also not done in this PR -- to be addressed in the next PR to limit the change size.

Functionality used by both the client and server side are encapsulated in the replica-lib crate.

There is no impact to the existing validator by default.

Tests:

Observe the confirmed slots replicated to the replica-node.
Observe the accounts for the confirmed slot are received at the replica-node side.
2021-09-01 14:10:16 -07:00
Tyera Eulberg 0b3fad19f4
Dedupe SendTransactionService(s) (#19354)
* Add new conjoined SendTransactionService

* Remove TODO

* nit A-Z

* Single use statement for banks crates

* Rename new crate
2021-08-23 22:32:15 +00:00
Lijun Wang 65ccfed868
Accounts db replication replica skeleton (#18767)
This is the first installment of the AccountsDb replication. Summary of Changes:

The rpc-node for AccountsDb replication executable cherry-picked from Steven's branch
Auto figuring out the snapshot to download via gossip
The replica now can download the snapshot, initialize the bank and AccountsDb, start the JsonRpcService
Integration test of a validator paired with a replica.
2021-07-28 09:31:43 -07:00
Jack May 6cf3c1ab8f
tx wide compute budget (#18631) 2021-07-16 00:31:22 -07:00
sakridge 7f2254225e
Move entry/poh to own crate to speed up poh bench build (#18225) 2021-07-14 14:16:29 +02:00
Justin Starry cfece66403
Remove unused exchange program and bench client (#18463) 2021-07-12 21:59:11 -05:00
Jack May 0d3e8ada94
Cleanup secp256k1 deps (#18618) 2021-07-13 00:36:19 +00:00
Michael Vines f859a39b86 Remove obsolete stake-monitor command 2021-06-16 16:10:36 -07:00
Alfonso Subiotto Marques 8a9b7f5ef2 Disable reed-solomon-erasure/simd-accel feature on aarch64 (Apple M1)
This feature requires clang to support -march=native on M1. Before this change,
cargo build would output a build error when building for aarch64.
2021-06-08 12:09:34 -07:00
Tyera Eulberg a66566e75b
Remove budget program (#17816) 2021-06-08 01:20:17 +00:00
Tyera Eulberg 544b3c0d17
Create solana-poh and move remaining rpc modules to solana-rpc (#17698)
* Create solana-poh crate

* Move BigTableUploadService to solana-ledger

* Add solana-rpc to workspace

* Move dependencies to solana-rpc

* Move remaining rpc modules to solana-rpc

* Single use statement solana-poh

* Single use statement solana-rpc
2021-06-04 09:23:06 -06:00
Dmitri Makarov b8897df515
Add rbpf-cli tool (#17378)
* Add rbpf-cli tool

* Replace explicit file type specification by required positional arg

- the type of file is determined automatically.  If ELF magic found,
  the program file is considered to be an executable ELF file, and
  an assembly input file otherwise.

* Add a note about tool's limitations and input format description
2021-05-28 11:28:30 +00:00
sakridge a8dca3976b
Refactor genesis download/load/check functions (#17276)
* Refactor genesis ingest functions

* Consolidate genesis.bin/genesis.tar.bz2 references
2021-05-24 16:45:36 +02:00
Solana Maintainers 0ebfa08860 Remove ramp-tps 2021-05-04 02:06:50 +00:00
Jeff Washington (jwash) 6d160768d7
delete vest program (#16795) 2021-04-26 08:50:46 -05:00
Michael Vines 3b79b21e9d Upgrade to Rust 1.51.0 2021-04-18 20:55:02 -07:00
Michael Vines b7aa366758 Remove stake-o-matic 2021-03-24 20:09:04 -07:00
sakridge 9b204febf3
Add accounts cluster bench (#14096)
* Add accounts cluster bench

* Transaction executor

* Re-allow clippy::integer_arithmetic

* Enable spl-token accounts and fixup transaction send/conf

* saturating_sub for debug builds

* Initialize RpcClients with confirmed commitment

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-02-25 19:51:46 -08:00
Jeff Washington (jwash) 18bd0c9a5b
speed up merkle calculation (#14710) 2021-01-22 09:21:50 -06:00