Commit Graph

11452 Commits

Author SHA1 Message Date
Josh bb72cbe7ae
add token type on token instructions + symbol on amount (#12398) 2020-09-23 07:51:54 -07:00
Tyera Eulberg 6563726f22
Fix solana-tokens check_payer_balances for distribute-stake (#12380)
* Handle distribute-stakes properly

* Remove dry-run gating for balance checks

* Reword and simplify InsufficientFunds errors

* Split up test and add helpers

* Rename sol_for_fees -> unlocked_sol

* Refactor distribute_allocations to collect Messages

* Clippy

* Clean up dangling bids
2020-09-23 02:39:05 +00:00
Tyera Eulberg 1afb138a2c
A-Z deps 2020-09-22 18:03:53 -06:00
Tyera Eulberg e1a212fb79
Bump spl-token (#12395) 2020-09-22 17:08:54 -06:00
Josh 65a6bfad09
Add blockstore column to store performance sampling data (#12251)
* Add blockstore column to store performance sampling data

* introduce timer and write performance metrics to blockstore

* introduce getRecentPerformanceSamples rpc

* only run on rpc nodes enabled with transaction history

* add unit tests for get_recent_performance_samples

* remove RpcResponse from rpc call

* refactor to use Instant::now and elapsed for timer

* switch to root bank and ensure not negative subraction

* Add PerfSamples to purge/compaction

* refactor to use Instant::now and elapsed for timer

* switch to root bank and ensure not negative subraction

* remove duplicate constants

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-09-22 12:26:32 -07:00
dependabot[bot] afd9bfc45f
chore:(deps): bump @testing-library/user-event in /explorer (#12389)
Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 12.1.5 to 12.1.6.
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testing-library/user-event/compare/v12.1.5...v12.1.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-22 08:17:08 +00:00
dependabot[bot] 4955898e75
chore:(deps): bump @types/node from 14.11.1 to 14.11.2 in /explorer (#12388)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.11.1 to 14.11.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-22 08:11:31 +00:00
Michael Vines 4fa443becf Simplify cli node version output, display semver only by default 2020-09-22 07:03:43 +00:00
Bartosz Lipinski ef60d0f5ba
explorer/: Deactivated stake accounts report as delegated (#12262)
* feat: add getStakeActivation to web3.js

* feat: add activation status to delegation card

* style: pretty

* feat: add epoch to getStakeActivation call

* feat: add unit test for getStakeActivation in web3.js

* feat: add test for getStakeActivation in web3.js

* feat: add getStakeActivation

* chore: add rollup watch

* feat: use string literal for stake activation state

* fix: dont display empty () for not delegated accounts

* fix: remove optional chaining due to issue with esdoc

* chore: remove optional_chaining

* feat: add live test for getStakeActivation

* feat: add active/inactive stake to account page

* feat: extend _buildArgs to support additional options, simplify unit test

* chore: update @solana/web3.js tp 0.76.0

* style: resolve linter issues

Co-authored-by: Justin Starry <justin@solana.com>
2020-09-22 13:41:39 +08:00
sakridge 7dd4de80eb
Add docs for secp256k1 and instruction introspection. (#12369) 2020-09-21 13:50:23 -07:00
Trent Nelson 6767264aa1 CLI: Drop unused runtime dep 2020-09-21 19:05:51 +00:00
Josh 02ba197a06
introduce new serum wrapped token labels (#12342) 2020-09-21 10:19:11 -07:00
dependabot[bot] 2cd404b8dd
chore: bump rpc-websockets from 7.4.5 to 7.4.6 in /web3.js (#12367)
Bumps [rpc-websockets](https://github.com/elpheria/rpc-websockets) from 7.4.5 to 7.4.6.
- [Release notes](https://github.com/elpheria/rpc-websockets/releases)
- [Commits](https://github.com/elpheria/rpc-websockets/compare/v7.4.5...v7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-21 09:00:47 +00:00
dependabot[bot] f99151eab9
chore: bump rollup from 2.27.1 to 2.28.1 in /web3.js (#12365)
Bumps [rollup](https://github.com/rollup/rollup) from 2.27.1 to 2.28.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v2.27.1...v2.28.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-21 08:58:01 +00:00
dependabot[bot] c9b8b76793
chore: bump typescript from 4.0.2 to 4.0.3 in /web3.js (#12363)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.2...v4.0.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-21 08:52:13 +00:00
dependabot[bot] d23126a10c
chore:(deps): bump @types/react-select in /explorer (#12364)
Bumps [@types/react-select](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-select) from 3.0.19 to 3.0.20.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-select)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-21 08:45:41 +00:00
dependabot[bot] f13e4b64d6
chore:(deps): bump @sentry/react from 5.23.0 to 5.24.2 in /explorer (#12362)
Bumps [@sentry/react](https://github.com/getsentry/sentry-javascript) from 5.23.0 to 5.24.2.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.23.0...5.24.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-21 08:35:36 +00:00
Jack May 65049bd112
Bump rust-bpf to v0.2.4 (#12361) 2020-09-20 23:10:50 +00:00
sakridge 22d8b3c3f8
Cleanup and feature gate instruction processing (#12359) 2020-09-20 10:58:12 -07:00
Michael Vines 65b247a922 Bind to correct RPC addresses 2020-09-20 07:32:25 +00:00
Michael Vines 76dada3118 Use validator_config for RPC address instead of cluster_info for port verification checks 2020-09-20 02:34:20 +00:00
sakridge f561eb917f
Add way to look at tx instructions (#11943) 2020-09-19 12:17:46 -07:00
Michael Vines cd852a5c22
Document that testnet has a faucet 2020-09-19 08:41:58 -07:00
Michael Vines 208dd1de3a Move TestValidator into its own module 2020-09-19 08:35:26 -07:00
Michael Vines 1a03afccb1 validator/ cleanup 2020-09-19 08:35:26 -07:00
Ryo Onodera cb8661bd49
Persistent tower (#10718)
* Save/restore Tower

* Avoid unwrap()

* Rebase cleanups

* Forcibly pass test

* Correct reconcilation of votes after validator resume

* d b g

* Add more tests

* fsync and fix test

* Add test

* Fix fmt

* Debug

* Fix tests...

* save

* Clarify error message and code cleaning around it

* Move most of code out of tower save hot codepath

* Proper comment for the lack of fsync on tower

* Clean up

* Clean up

* Simpler type alias

* Manage tower-restored ancestor slots without banks

* Add comment

* Extract long code blocks...

* Add comment

* Simplify returned tuple...

* Tweak too aggresive log

* Fix typo...

* Add test

* Update comment

* Improve test to require non-empty stray restored slots

* Measure tower save and dump all tower contents

* Log adjust and add threshold related assertions

* cleanup adjust

* Properly lower stray restored slots priority...

* Rust fmt

* Fix test....

* Clarify comments a bit and add TowerError::TooNew

* Further clean-up arround TowerError

* Truly create ancestors by excluding last vote slot

* Add comment for stray_restored_slots

* Add comment for stray_restored_slots

* Use BTreeSet

* Consider root_slot into post-replay adjustment

* Tweak logging

* Add test for stray_restored_ancestors

* Reorder some code

* Better names for unit tests

* Add frozen_abi to SavedTower

* Fold long lines

* Tweak stray ancestors and too old slot history

* Re-adjust error conditon of too old slot history

* Test normal ancestors is checked before stray ones

* Fix conflict, update tests, adjust behavior a bit

* Fix test

* Address review comments

* Last touch!

* Immediately after creating cleaning pr

* Revert stray slots

* Revert comment...

* Report error as metrics

* Revert not to panic! and ignore unfixable test...

* Normalize lockouts.root_slot more strictly

* Add comments for panic! and more assertions

* Proper initialize root without vote account

* Clarify code and comments based on review feedback

* Fix rebase

* Further simplify based on assured tower root

* Reorder code for more readability

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-09-19 14:03:54 +09:00
Tyera Eulberg 28f2c15597
Add get_token_account methods (#12346) 2020-09-18 20:45:13 -06:00
Michael Vines 0ed7b0561e Improve error message when .config/solana/id.json is not found 2020-09-18 16:29:12 -07:00
Trent Nelson a695561f86 💉 2020-09-18 21:25:30 +00:00
Trent Nelson 327c3d4154 Remove Ledger wallet approval output from examples 2020-09-18 21:25:30 +00:00
Trent Nelson cee8db0da3 Listify newly created account properties 2020-09-18 21:25:30 +00:00
Trent Nelson add08c673e Justify installing spl-token 2020-09-18 21:25:30 +00:00
Trent Nelson 42b40b7d34 Withdraw is a verb 2020-09-18 21:25:30 +00:00
Trent Nelson 7ee07fd4e8 Apply suggestions from code review
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-09-18 21:25:30 +00:00
Trent Nelson f52fdc8546 Update docs/src/integrations/exchange.md
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-09-18 21:25:30 +00:00
Trent Nelson 11a8abe3bf Docs: Add SPL Token exchange integration 2020-09-18 21:25:30 +00:00
Tyera Eulberg 06906413ef
Unbreak 'Listening for Deposits' section (#12338) 2020-09-18 15:05:13 -06:00
Juha Vieresjoki 1211d8118c common component for more readable slot numbers 2020-09-18 10:55:36 -07:00
Michael Vines c4913e3c9e SendTransactionServices now exit their thread on channel drop instead of by a flag 2020-09-18 17:29:10 +00:00
Michael Vines 75c3690ccd Give the duplicate send_transaction_service a different thread name 2020-09-18 17:29:10 +00:00
Justin Starry f03621d24a
Fix explorer token crash on unknown instruction (#12329) 2020-09-18 18:05:31 +08:00
dependabot[bot] fdbb22dc07
chore: bump prettier from 2.1.1 to 2.1.2 in /web3.js (#12328)
Bumps [prettier](https://github.com/prettier/prettier) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.1.1...2.1.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-18 09:40:01 +00:00
dependabot[bot] 77e3c3970c
chore: bump eslint-plugin-flowtype from 4.7.0 to 5.2.0 in /web3.js (#12326)
Bumps [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) from 4.7.0 to 5.2.0.
- [Release notes](https://github.com/gajus/eslint-plugin-flowtype/releases)
- [Commits](https://github.com/gajus/eslint-plugin-flowtype/compare/v4.7.0...v5.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-18 08:32:24 +00:00
dependabot[bot] cf175fdc98
chore:(deps): bump @solana/web3.js from 0.75.2 to 0.76.0 in /explorer (#12327)
Bumps [@solana/web3.js](https://github.com/solana-labs/solana-web3.js) from 0.75.2 to 0.76.0.
- [Release notes](https://github.com/solana-labs/solana-web3.js/releases)
- [Commits](https://github.com/solana-labs/solana-web3.js/compare/v0.75.2...v0.76.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-18 08:26:50 +00:00
dependabot[bot] 1a0b791f9a
chore: bump semantic-release from 17.1.1 to 17.1.2 in /web3.js (#12324)
Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 17.1.1 to 17.1.2.
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](https://github.com/semantic-release/semantic-release/compare/v17.1.1...v17.1.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-18 08:24:40 +00:00
dependabot[bot] 22000f7dba
chore:(deps): bump @types/node from 14.10.3 to 14.11.1 in /explorer (#12325)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.10.3 to 14.11.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-18 08:19:15 +00:00
carllin 3533e11786
Fix blockstore processor squash (#12319) 2020-09-17 21:33:08 -07:00
Tyera Eulberg 58542cf7f6
Add Pack and COption to sdk (#12294)
* Add COption to sdk

* Add Pack to sdk

* Except program_option from nits check

* No Default::default
2020-09-17 21:10:02 -06:00
Justin Starry 19f412b85c
Disable sentry in development and catch reporting errors (#12321) 2020-09-18 10:47:58 +08:00
behzad nouri 9b866d79fb
shards crds values based on their hash prefix (#12187)
filter_crds_values checks every crds filter against every hash value:
https://github.com/solana-labs/solana/blob/ee646aa7/core/src/crds_gossip_pull.rs#L432
which can be inefficient if the filter's bit-mask only matches small
portion of the entire crds table.

This commit shards crds values into separate tables based on shard_bits
first bits of their hash prefix. Given a (mask, mask_bits) filter,
filtering crds can be done by inspecting only relevant shards.

If CrdsFilter.mask_bits <= shard_bits, then precisely only the crds
values which match (mask, mask_bits) bit pattern are traversed.
If CrdsFilter.mask_bits > shard_bits, then approximately only
1/2^shard_bits of crds values are inspected.

Benchmarking on a gce cluster of 20 nodes, I see ~10% improvement in
generate_pull_responses metric, but with larger clusters, crds table and
2^mask_bits are both larger, so the impact should be more significant.
2020-09-17 14:05:16 +00:00