Commit Graph

17624 Commits

Author SHA1 Message Date
9c9f2dd5bd port counting vote CUs to block cost (#22477) 2022-01-14 10:50:29 -06:00
cddab635ff Cleanup activated rent_for_sysvars feature (#22454) 2022-01-14 20:34:09 +08:00
ae6c511f13 Refactor: Split vote_instruction.rs into multiple files (#22502) 2022-01-14 17:25:15 +08:00
93a7b94507 Add benchmark for vote processing (#22486) 2022-01-14 17:10:17 +08:00
f12a8fcd73 docs: fix get fee for message docs (#22501) 2022-01-14 01:34:05 -07:00
f804ccdece Store address table lookups in blockstore and bigtable (#22402) 2022-01-14 15:24:41 +08:00
4c577d7f8c Bank::get_fee_for_message is now nonce aware 2022-01-13 17:27:38 -08:00
4ab7d6c23e Filter out outdated slots (#22450)
* Filter out outdated slots

* Fixup error
2022-01-13 19:51:00 -05:00
eca8d21249 log internals (#22493) 2022-01-13 19:50:46 -05:00
d3b95b9226 Cleanup AccountStorage struct (#22463)
* Revert "chore: bump dashmap from 4.0.2 to 5.0.0 (#21824)"

This reverts commit 8aa3d690b5.

* Cleanup AccountStorage struct
2022-01-13 17:51:53 -06:00
7711cd74c3 partition_from_pubkey (#22430)
* Revert "chore: bump dashmap from 4.0.2 to 5.0.0 (#21824)"

This reverts commit 8aa3d690b5.

* partition_from_pubkey
2022-01-13 17:02:42 -06:00
66a97bdde0 Apply suggestions from code review
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2022-01-13 14:12:54 -07:00
b635073829 Add hidapi feature in remote-wallet 2022-01-13 14:12:54 -07:00
e291342c4a Revert "chore: bump dashmap from 4.0.2 to 5.0.0 (#21824)" (#22488)
This reverts commit 8aa3d690b5.
2022-01-13 13:06:39 -06:00
b82d71d22a Inline DEFAULT_SNAPSHOT_VERSION constant string (#22487) 2022-01-13 18:19:15 +00:00
1632ee03da nit: Traceable balance checks (#22462) 2022-01-13 09:09:22 -08:00
2756abce39 More serde snapshot cleanup (#22449) 2022-01-13 09:20:20 -06:00
9c3144e286 Refactor serde snapshot's "future" to "newer" (#22431) 2022-01-13 07:12:09 -06:00
ba046bd4dd chore:(deps): bump @types/jest from 27.0.3 to 27.4.0 in /explorer (#22483)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 27.0.3 to 27.4.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-13 09:06:32 +00:00
2370e61431 Perf: Store deserialized sysvars in the sysvars cache (#22455)
* Perf: Store deserialized sysvars in sysvars cache

* add bench
2022-01-13 05:36:21 +00:00
f2908ed475 ci: Patch solana-account-decoder for downstream builds (#22472) 2022-01-13 02:02:36 +01:00
6614727be8 downgrade individual per-program-timing to trace to reduce writes to influx 2022-01-12 18:52:13 -06:00
b211f839cb Fetch sysvars from invoke context for vote program (#22444) 2022-01-13 08:41:48 +08:00
eaae2f3538 Use modular_bitfield to bitpack IndexEntry (#22447) 2022-01-12 14:37:34 -06:00
7171c95bdd Refactor: move sysvar cache to new module 2022-01-12 12:35:28 -07:00
b27333e52d Update docs vis-a-vis prohibition of RentPaying accounts (#22438)
* Rent-exempt docs for exchange integrations

* Remove discussion of rent-paying accounts from developing docs

* Improve verbiage
2022-01-12 19:32:19 +00:00
4854fadc44 chore:(deps): bump sass from 1.45.0 to 1.47.0 in /explorer (#22453)
Bumps [sass](https://github.com/sass/dart-sass) from 1.45.0 to 1.47.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.45.0...1.47.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-12 09:21:29 +00:00
3e8ee27d9d chore:(deps): bump @metaplex/js from 4.9.0 to 4.11.3 in /explorer (#22452)
Bumps [@metaplex/js](https://github.com/metaplex/js) from 4.9.0 to 4.11.3.
- [Release notes](https://github.com/metaplex/js/releases)
- [Changelog](https://github.com/metaplex-foundation/js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/metaplex/js/compare/v4.9.0...v4.11.3)

---
updated-dependencies:
- dependency-name: "@metaplex/js"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-12 09:14:32 +00:00
8161cee70f Remove unnecessary var in banking_stage bench (#22408) 2022-01-11 22:25:21 -06:00
de2a7fdc6c update influx host 2022-01-11 23:23:15 -05:00
3ca16de851 Only examine explicit tx accounts for rent state (#22441)
* Add failing test

* Fix: only examine accounts explicitly included in a tx
2022-01-11 20:23:51 -07:00
c45dde6164 Handle accounts data size changes due to rent-collected accounts (#22412) 2022-01-11 17:20:28 -06:00
35a5dd9c45 Refactor: consolidate memo extraction for each message version (#22422) 2022-01-12 06:32:44 +08:00
157f165a3d Bump memmap2 from 0.5.1 to 0.5.2 (#22414)
* Bump memmap2 from 0.5.1 to 0.5.2

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.1...v0.5.2)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-01-11 15:08:13 -07:00
637e366b18 Prevent rent-paying account creation (#22292)
* Fixup typo

* Add new feature

* Add new TransactionError

* Add framework for checking account state before and after transaction processing

* Fail transactions that leave new rent-paying accounts

* Only check rent-state of writable tx accounts

* Review comments: combine process_result success behavior; log and metrics before feature activation

* Fix tests that assume rent-exempt accounts are okay

* Remove test no longer relevant

* Remove native/sysvar special case

* Move metrics submission to report legacy->legacy rent paying transitions as well
2022-01-11 11:32:25 -07:00
a49ef49f87 optimizes ReadOnlyAccountsCache LRU eviction implementation (#22403)
ReadOnlyAccountsCache is using a background thread, table scan and sort
to implement LRU eviction policy:
https://github.com/solana-labs/solana/blob/eaa52bc93/runtime/src/read_only_accounts_cache.rs#L66-L73
https://github.com/solana-labs/solana/blob/eaa52bc93/runtime/src/read_only_accounts_cache.rs#L186-L191
https://github.com/solana-labs/solana/blob/eaa52bc93/runtime/src/read_only_accounts_cache.rs#L222

DashMap internally locks each shard when accessed; so a table scan in
the background thread can create a lot of lock contention.

This commit adds an index-list queue containing cached keys in the order
that they are accessed. Each hash-map entry also includes its index into
this queue.
When an item is first entered into the cache, it is added to the end of
the queue. Also each time an entry is looked up from the cache it is
moved to the end of queue. As a result, items in the queue are always
sorted in the order that they have last been accessed. When doing LRU
eviction, cache entries are evicted from the front of the queue.
Using index-list, all queue operations above are O(1) with low overhead
and so above achieves an efficient implementation of LRU cache eviction
policy.
2022-01-11 17:25:28 +00:00
8b66625c95 convert std::sync::mpsc to crossbeam_channel (#22264) 2022-01-11 02:44:46 -08:00
3c44d405c7 feat: add Connection.getFeeForMessage (#22128)
* web3.js: add Connection.getFeeForMessage

* throw if value is null

* fix null value

* fix types
2022-01-11 17:49:28 +08:00
d064c40617 update metrics url 2022-01-10 21:36:44 -05:00
4214c69694 update metrics url 2022-01-10 21:35:37 -05:00
ec364cc737 ci: Add Anchor and Anchor projects to the downstream build (#22098)
* ci: Add Anchor and Anchor projects to the downstream build

* Separate downstream anchor projects into separate step

* Decrease anchor project build time
2022-01-11 00:21:53 +01:00
49da347d84 limits gossip vote stats to the top most voted slots (#22416) 2022-01-10 21:23:41 +00:00
2cc6f863bf Bump etcd-client from 0.8.2 to 0.8.3 (#22415)
Bumps [etcd-client](https://github.com/etcdv3/etcd-client) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/etcdv3/etcd-client/releases)
- [Commits](https://github.com/etcdv3/etcd-client/compare/0.8.2...0.8.3)

---
updated-dependencies:
- dependency-name: etcd-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-10 13:25:15 -07:00
0869f644fc Bump merlin from 2.0.1 to 3.0.0 (#22331)
* Bump merlin from 2.0.1 to 3.0.0

Bumps [merlin](https://github.com/zkcrypto/merlin) from 2.0.1 to 3.0.0.
- [Release notes](https://github.com/zkcrypto/merlin/releases)
- [Changelog](https://github.com/zkcrypto/merlin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/zkcrypto/merlin/compare/2.0.1...3.0.0)

---
updated-dependencies:
- dependency-name: merlin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-01-10 11:18:15 -07:00
04a2c19c87 Bump memmap2 from 0.5.0 to 0.5.1 (#22409)
* Bump memmap2 from 0.5.0 to 0.5.1

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-01-10 11:14:56 -07:00
5f1f4dcbdd Use struct to pass all Tpu sockets as one argument to Tpu::new() (#21965)
Tpu::new() now matches Tvu::new() in having struct to reduce argument
list. Additionally, Rust supports partial moves, so there is no need to
clone the Tvu sockets out of Node object.
2022-01-10 11:29:48 -06:00
aadf4b9b63 Moves InvokeContext::return_data to TransactionContext. (#22411) 2022-01-10 18:26:51 +01:00
9bc2592da1 Use lazy_rent_collection directly (#22410) 2022-01-10 10:47:08 -06:00
eeec1ce2ad Add local cluster test to repro slot hash expiry bug (#21873) 2022-01-10 00:58:21 -05:00
39327ec753 Bump crossbeam-channel from 0.5.1 to 0.5.2 (#22405)
* Bump crossbeam-channel from 0.5.1 to 0.5.2

Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.1...crossbeam-channel-0.5.2)

---
updated-dependencies:
- dependency-name: crossbeam-channel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-01-09 22:32:29 -07:00