Commit Graph

990 Commits

Author SHA1 Message Date
Michael Vines 8838a55a1a Bump spl-token and spl-memo crate versions 2020-11-04 21:44:33 +00:00
Alexander Meißner 4999fe298b
Rbpf v0.2.0 (#13365)
* Updates rbpf to v0.2.0,
which unifies the interfaces of the interpreter and the JIT.
However, the JIT is not enabled yet.
2020-11-04 18:46:26 +01:00
sakridge 55b0428ff7
Add store-tool (#13254) 2020-11-01 09:41:28 -08:00
Michael Vines 52a292a75b Add solana-program-test crate 2020-10-31 18:12:24 -07:00
Michael Vines e872715fd6 Switch to dirs-next 2020-10-31 18:56:20 +00:00
Michael Vines 660214754e `cargo update -p futures-task` / `cargo update -p futures-util` 2020-10-31 18:56:20 +00:00
Michael Vines da361afbb9 Revert "Updates rbpf to v0.2.0, (#12951)"
This reverts commit 6606590b81.
2020-10-29 21:45:24 -07:00
Michael Vines df8dab9d2b Native/builtin programs now receive an InvokeContext 2020-10-29 21:45:24 -07:00
Greg Fitzgerald ca00197009
Upgrade tarpc and tokio (#13293) 2020-10-29 19:21:18 -06:00
Alexander Meißner 6606590b81
Updates rbpf to v0.2.0, (#12951)
which unifies the interfaces of the interpreter and the JIT.
However, the JIT is not enabled yet.
2020-10-29 11:34:52 -07:00
behzad nouri ae91270961
implements ping-pong packets between nodes (#12794)
https://hackerone.com/reports/991106

> It’s possible to use UDP gossip protocol to amplify DDoS attacks. An attacker
> can spoof IP address in UDP packet when sending PullRequest to the node.
> There's no any validation if provided source IP address is not spoofed and
> the node can send much larger PullResponse to victim's IP. As I checked,
> PullRequest is about 290 bytes, while PullResponse is about 10 kB. It means
> that amplification is about 34x. This way an attacker can easily perform DDoS
> attack both on Solana node and third-party server.
>
> To prevent it, need for example to implement ping-pong mechanism similar as
> in Ethereum: Before accepting requests from remote client needs to validate
> his IP. Local node sends Ping packet to the remote node and it needs to reply
> with Pong packet that contains hash of matching Ping packet. Content of Ping
> packet is unpredictable. If hash from Pong packet matches, local node can
> remember IP where Ping packet was sent as correct and allow further
> communication.
>
> More info:
> https://github.com/ethereum/devp2p/blob/master/discv4.md#endpoint-proof
> https://github.com/ethereum/devp2p/blob/master/discv4.md#wire-protocol

The commit adds a PingCache, which maintains records of remote nodes
which have returned a valid response to a ping message, and on-the-fly
ping messages pending a pong response from the remote node.

When handling pull-requests, those from addresses which have not passed
the ping-pong check are filtered out, and additionally ping packets are
added for addresses which need to be (re)verified.
2020-10-28 17:03:02 +00:00
Michael Vines dd711ab5fb Rename solana-program-sdk to solana-program 2020-10-24 08:37:55 -07:00
Michael Vines 63db324204 Initial population of solana-program-sdk 2020-10-24 08:37:55 -07:00
Michael Vines 07a853d6cc Add cargo-build-bpf 2020-10-21 18:56:40 -07:00
carllin e6b821c392
Finer grained AccountsIndex locking (#12787)
Co-authored-by: Carl Lin <carl@solana.com>
2020-10-21 17:05:27 -07:00
Ryo Onodera 0776fa05c7
Add ledger-tool dead-slots and improve purge a lot (#13065)
* Add ledger-tool dead-slots and improve purge a lot

* Reduce batch size...

* Add --dead-slots-only and fixed purge ordering
2020-10-21 17:45:21 +00:00
Trent Nelson 86a982150c RPC: Don't send base64 TXs to old clusters 2020-10-21 08:33:28 +00:00
Trent Nelson 2905ccc7ec CLI: Print address ephemeral keypair seed phrase to stderr on deploy failure 2020-10-21 01:09:37 -06:00
Michael Vines 6858950f76 Remove frozen ABI modules from solana-sdk 2020-10-20 16:11:30 -07:00
dependabot[bot] 301f3096a0 chore: bump thiserror from 1.0.20 to 1.0.21
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.20 to 1.0.21.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.20...1.0.21)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-20 11:19:10 -07:00
Michael Vines 9c53e1dfb2 Add SyscallStubs to enable syscall interception when building programs for non-BPF 2020-10-19 21:00:17 +00:00
Ryo Onodera 54517ea454
Follow up to persistent tower with tests and API cleaning (#12350)
* Follow up to persistent tower

* Ignore for now...

* Hard-code validator identities for easy reasoning

* Add a test for opt. conf violation without tower

* Fix compile with rust < 1.47

* Remove unused method

* More move of assert tweak to the asser pr

* Add comments

* Clean up

* Clean the test addressing various review comments

* Clean up a bit
2020-10-19 16:37:03 +09:00
Tyera Eulberg 359707c85e
Convert Blockstore Rewards cf to protobuf (#12860)
* Add Blockstore protobuf cf type

* Add Rewards message to proto and make generated pub

* Convert Rewards cf to ProtobufColumn

* Add bench

* Adjust tags

* Move solana proto definitions and conversion methods to new crate
2020-10-15 18:04:10 -06:00
Tyera Eulberg d008dfb7ad
Bump spl-memo and spl-token versions (#12917) 2020-10-15 18:23:41 +00:00
carllin f8d338c9cb
Switch accounts storage lock to DashMap (#12126)
Co-authored-by: Carl Lin <carl@solana.com>
2020-10-13 18:29:50 -07:00
Alexandre Esteves 6bbf6a79b7
Check ELF file for errors before deploy (#12741)
* Check ELF file for errors before deploy

* Update cli/src/cli.rs

Co-authored-by: Michael Vines <mvines@gmail.com>

* Fix formatting

* Bump solana_rbpf

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-10-11 21:19:47 -07:00
Michael Vines 859eb606da Cargo.lock 2020-10-11 18:51:09 +00:00
Michael Vines c5c8da1ac0 Expose all rewards (fees, rent, voting and staking) in RPC getConfirmedBlock and the cli 2020-10-09 21:54:13 -07:00
Jack May c3907be623
Add adjustable stack size and call depth (#12728) 2020-10-09 13:07:09 -07:00
Ryo Onodera 1f4bcf70b0
Fix various ledger-tool error due to no builtins (#12759)
* Fix various ledger-tool error due to no builtins

* Add missing file...
2020-10-09 12:19:36 -06:00
Michael Vines 11df2e2236 Bump version to v1.5.0 2020-10-08 04:51:36 +00:00
Jack May 973f0965e1
Add ristretto multiply syscall (#12699) 2020-10-06 23:52:13 -07:00
Trent Nelson e35889542b RPC: Support base64 encoded transactions
Defaults to base58
2020-10-06 22:41:06 -06:00
behzad nouri 537bbde22e
builds crds filters in parallel (#12360)
Based on run-time profiles, the majority time of new_pull_requests is
spent building bloom filters, in hashing and bit-vec ops.

This commit builds crds filters in parallel using rayon constructs. The
added benchmark shows ~5x speedup (4-core machine, 8 threads).
2020-09-29 23:06:02 +00:00
Michael Vines 6071d0d206 Cargo.lock 2020-09-28 12:50:19 -07:00
dependabot[bot] 0718501c72 chore: bump rocksdb from 0.14.0 to 0.15.0
Bumps [rocksdb](https://github.com/rust-rocksdb/rust-rocksdb) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/rust-rocksdb/rust-rocksdb/releases)
- [Changelog](https://github.com/rust-rocksdb/rust-rocksdb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-rocksdb/rust-rocksdb/compare/v0.14.0...v0.15.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-28 09:52:31 -07:00
dependabot[bot] de04dcd9d6 chore: bump socket2 from 0.3.12 to 0.3.15
Bumps [socket2](https://github.com/alexcrichton/socket2-rs) from 0.3.12 to 0.3.15.
- [Release notes](https://github.com/alexcrichton/socket2-rs/releases)
- [Commits](https://github.com/alexcrichton/socket2-rs/compare/0.3.12...v0.3.15)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-25 20:14:09 -07:00
Trent Nelson 1014781b87 Bump jsonrpc-* to 15.0.0 2020-09-25 19:30:47 +00:00
Michael Vines 93ed0ab2bb Add feature management commands 2020-09-25 11:40:36 -07:00
Michael Vines 35f5f9fc7b Add feature set identifier to gossiped version information 2020-09-25 11:40:36 -07:00
Trent Nelson d95bce2600 cli-output: Add CliTokenAccount type 2020-09-24 21:50:06 -06:00
dependabot[bot] 018cb5035a chore: bump num-derive from 0.3.0 to 0.3.2
Bumps [num-derive](https://github.com/rust-num/num-derive) from 0.3.0 to 0.3.2.
- [Release notes](https://github.com/rust-num/num-derive/releases)
- [Changelog](https://github.com/rust-num/num-derive/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-derive/compare/num-derive-0.3.0...num-derive-0.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-24 16:56:12 -07:00
Trent Nelson 7cab638297 Factor the rest of CLI offline module out to clap-utils and cli-output crates 2020-09-23 15:58:44 -06:00
Trent Nelson 325a7e9f86 Move CLI cli_output module to its own crate 2020-09-23 15:58:44 -06:00
Trent Nelson ba353c2b1d Move CLI blockhash_query module into client crate 2020-09-23 15:58:44 -06:00
Trent Nelson a6533c3a21 Move CLI nonce account helpers in client 2020-09-23 15:58:44 -06:00
Tyera Eulberg e1a212fb79
Bump spl-token (#12395) 2020-09-22 17:08:54 -06:00
Trent Nelson 6767264aa1 CLI: Drop unused runtime dep 2020-09-21 19:05:51 +00:00
sakridge 3930cb865a
Add keccak-secp256k1 instruction (#11839)
* Implement keccak-secp256k1 instruction

Verifies eth addreses with ecrecover function

* Move secp256k1 test
2020-09-15 18:23:21 -07:00
Jack May 3278d78f08
Cache re-usable work performed by the loader (#12135) 2020-09-14 17:42:37 -07:00