Commit Graph

1014 Commits

Author SHA1 Message Date
Tyera Eulberg 8c40dd34b2
solana-tokens: optimize PickleDb dumps (#13879)
* Dump PickleDb after transaction sends/confirmation

* Dump PickleDb on ctrlc

* Don't exit during tests

* Add build_messages helper and test db dump

* Add send_messages helper and test db dump

* Add combined test

* Add log_transaction_confirmations helper and test db dump

* Add update_finalized_transactions test

* Return error instead of process::exit

* Close TestValidator
2020-12-01 19:22:27 -07:00
Michael Vines ec167aead9 Remove --notify-on-transaction support.
It's not longer useful due to the volume of transactions on mainnet-beta
and there are now other means of monitoring transactions
2020-11-28 23:51:07 -08:00
dependabot[bot] f96c4ec84e chore: bump async-trait from 0.1.36 to 0.1.42
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.36 to 0.1.42.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.36...0.1.42)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-25 09:34:31 -08:00
Michael Vines 215ddecaa5 Add base64+zstd encoding for RPC account data 2020-11-25 02:03:23 +00:00
Alexander Meißner c833ede4af
Rbpf v0.2.1 (#13732)
* Refactoring to match rbpf-v0.2.1 and add JIT compilation caching.

* Removes obsolete bpf-trace.py which has been replaced by the rbpf CLI tool.
2020-11-24 18:00:19 +01:00
carllin 791fb17437
Prevent scans on unrooted slots from seeing partial clean (#13628)
Co-authored-by: Carl Lin <carl@solana.com>
2020-11-20 13:01:04 -08:00
dependabot[bot] 2cab684ffb chore: bump pretty-hex from 0.1.1 to 0.2.1
Bumps [pretty-hex](https://github.com/wolandr/pretty-hex) from 0.1.1 to 0.2.1.
- [Release notes](https://github.com/wolandr/pretty-hex/releases)
- [Commits](https://github.com/wolandr/pretty-hex/compare/v0.1.1...v0.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-20 07:12:22 -08:00
dependabot[bot] 856693ac1f chore: bump lru from 0.6.0 to 0.6.1
Bumps [lru](https://github.com/jeromefroe/lru-rs) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/jeromefroe/lru-rs/releases)
- [Changelog](https://github.com/jeromefroe/lru-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jeromefroe/lru-rs/compare/0.6.0...0.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-19 14:28:50 -08:00
Tyera Eulberg 2ef4369237
Distribute spl tokens (#13559)
* Add helpers to covert between sdk types

* Add distribute-spl-tokens to args and arg-parsing

* Build spl-token transfer-checked instructions

* Check spl-token balances properly

* Add display handling to support spl-token

* Small refactor to allow failures in allocation iter

* Use Associated Token Account for spl-token distributions

* Add spl token support to balances command

* Update readme

* Add spl-token tests

* Rename spl-tokens file

* Move a couple more things out of commands

* Stop requiring lockup_date heading for non-stake distributions

* Use epsilon for allocation retention
2020-11-19 10:32:31 -07:00
dependabot[bot] 892a2eacff chore: bump nix from 0.17.0 to 0.19.0
Bumps [nix](https://github.com/nix-rust/nix) from 0.17.0 to 0.19.0.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.17.0...v0.19.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-18 08:40:46 -08:00
dependabot[bot] 7640841b02 chore: bump goauth from 0.7.2 to 0.8.1
Bumps [goauth](https://github.com/durch/rust-goauth) from 0.7.2 to 0.8.1.
- [Release notes](https://github.com/durch/rust-goauth/releases)
- [Commits](https://github.com/durch/rust-goauth/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-17 23:30:51 -08:00
Michael Vines 78dc334afe Add real --version 2020-11-17 17:59:33 -08:00
Greg Fitzgerald 47fbfc52de
Revert solana-tokens to RpcClient (#13623)
* Revert solana-tokens to RpcClient

* Fixup check_payer_balances tests

* Use RpcClient::new_with_commitment in other tests

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-11-17 21:53:49 +00:00
Tyera Eulberg ef99689592
Improve TestValidator instantiation (#13627)
* Add TestValidator::new_with_fees constructor, and warning for low bootstrap_validator_lamports

* Add logging to solana-tokens integration test to help catch low bootstrap_validator_lamports in the future

* Reasonable TestValidator mint_lamports
2020-11-16 23:27:36 -07:00
Michael Vines ab5814cd90 Cargo.lock 2020-11-16 11:00:40 -08:00
dependabot[bot] fc54fb88ae chore: bump futures from 0.3.5 to 0.3.8
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.5 to 0.3.8.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.5...0.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-14 08:31:19 -08:00
joshua-maros a8a77614fe
Fix potential undefined behavior (#13555)
* Switch to ouroboros 0.5.1

* Update other lock files
2020-11-13 18:12:41 +09:00
Trent Nelson 6dc735e996 ip-echo-server: Don't use framed decoder, it can't be read-limited 2020-11-13 07:53:19 +00:00
Michael Vines 114b91afe6 program-test now generates new blockhashes for test usage 2020-11-11 20:29:00 -08:00
Greg Fitzgerald dadea873a9
Send BanksClient RPC requests before returning futures (#13539)
* Send RPC requests before returning futures

* Add process_transactions()
2020-11-11 18:56:26 -07:00
Greg Fitzgerald 2660b44d91
Remove need for BanksClientExt trait (#13519) 2020-11-10 19:30:25 -07:00
Ryo Onodera a81e7e7749
Output more inflation calc details in ledger-tool (#13345)
* Output more inflation calc details in ledger-tool

* Fix broken ci...

* Rename confusing variables

* Fix panic by wrapping PointValue with Opiton...

* Minor modifications

* Remove explict needless flush; Drop already does

* Yet another csv field adjustments

* Add data_size and rename epochs to earned_epochs

* Introduce null_tracer

* Unwrap Option in new_from_parent_with_tracer

* Don't shorten identifiers

* Allow irrefutable_let_patterns temporalily

* More null_tracer

* More field adjustments
2020-11-08 16:43:50 +09:00
Michael Vines b511e51415 Define BPF_OUT_DIR for program-test, also handle -- arguments better 2020-11-05 14:29:17 -08:00
Michael Vines c988d0f573 Cargo.lock 2020-11-05 14:29:17 -08:00
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