Commit Graph

20620 Commits

Author SHA1 Message Date
Justin Starry a0f49c2e4f
Add assertions for computed block cost limit constants (#28056) 2022-09-26 12:50:31 +00:00
Justin Starry 242bd9be0d
Explorer: Remove unused assets (#28074) 2022-09-26 11:47:49 +00:00
Justin Starry fa0509cdd1
Explorer: Split off devDependencies from dependencies (#28073) 2022-09-26 11:45:55 +00:00
Justin Starry 874fbcb9d4
Explorer: Split out `SolBalance` component from utils (#28072)
Explorer: Split out SolBalance component from utils
2022-09-26 09:25:15 +00:00
Alexander Meißner 71aee4fcaf
Feature: Explicitly limit `TransactionContext::instruction_trace_capacity` (#27938)
* Renames instruction_stack_capacity => instruction_stack_capacity.

* Replaces number_of_instructions_at_transaction_level by instruction_trace_capacity.

* Adds MaxInstructionTraceLengthExceeded.

* Adjusts TransactionContext::new() parameter.

* Adds feature gate limit_max_instruction_trace_length.

* Adds test_max_instruction_trace_length().
2022-09-26 10:47:16 +02:00
Jeff Washington (jwash) de7a5f2c68
get rid of unnecessary mut (#28017) 2022-09-25 18:39:02 -07:00
behzad nouri f49beb0cbc
caches reed-solomon encoder/decoder instance (#27510)
ReedSolomon::new(...) initializes a matrix and a data-decode-matrix cache:
https://github.com/rust-rse/reed-solomon-erasure/blob/273ebbced/src/core.rs#L460-L466

In order to cache this computation, this commit caches the reed-solomon
encoder/decoder instance for each (data_shards, parity_shards) pair.
2022-09-25 18:09:47 +00:00
Jeff Biseda 9816c94d7e
metrics to distinguish why repair packets are dropped (#27960) 2022-09-24 23:20:05 -07:00
Tyera Eulberg 060ecf9cdb
Revert "chore: bump serde_yaml from 0.8.26 to 0.9.13 (#27970)" (#28055)
This reverts commit da9206fb87.
2022-09-25 04:49:11 +00:00
Brendan Kirby e0a10eb017
RELEASE.md cleanup (#28007)
README cleanup
2022-09-24 20:30:25 -06:00
Jeff Biseda 8b43215ddd
count unsigned repair requests (#27953) 2022-09-24 12:56:02 -07:00
behzad nouri 45e26574f3
removes redundant shred.sanitize() from blockstore (#28016)
Shreds received from other nodes over the socket are sanitized when the
payload is deserialized:
https://github.com/solana-labs/solana/blob/315707504/ledger/src/shred/legacy.rs#L137
https://github.com/solana-labs/solana/blob/315707504/ledger/src/shred/legacy.rs#L77
https://github.com/solana-labs/solana/blob/315707504/ledger/src/shred/merkle.rs#L355
https://github.com/solana-labs/solana/blob/315707504/ledger/src/shred/merkle.rs#L439

Similarly, shreds recovered from erasure codes are also sanitized at
deserialization:
https://github.com/solana-labs/solana/blob/f02fe9c7e/ledger/src/shredder.rs#L330
or explicitly so for Merkle shreds:
https://github.com/solana-labs/solana/blob/f02fe9c7e/ledger/src/shred/merkle.rs#L753

Shreds generated locally by the node itself during its leader slots do
not need to be sanitized.

So sanitizing shreds in blockstore is redundant and wasteful. In
particular this becomes more wasteful with Merkle shreds because
sanitizing shreds would require verifying Merkle proof.
As such the commit removes redundant shred.sanitize() from blockstore.
2022-09-24 16:31:50 +00:00
behzad nouri f02fe9c7e7
updates reed-solomon-erasure crate version to 6.0.0 (#28033)
Need to pick up:
https://github.com/rust-rse/reed-solomon-erasure/pull/104
in order to unblock:
https://github.com/solana-labs/solana/pull/27510
2022-09-24 15:00:13 +00:00
Justin Starry b93392cfca
Explorer: Support displaying and inspecting versioned transactions (#27825)
* Explorer: Bump @solana/web3.js to v1.63.1

* Explorer: Support displaying and inspecting versioned transactions
2022-09-24 07:10:14 +00:00
Justin Starry 7810387b00
fix: improve `MessageV0.getAccountKeys` API ergonomics (#28042)
fix: improve MessageV0.getAccountKeys API flexibility
2022-09-24 05:37:58 +00:00
Justin Starry e85900e094
Explorer: Fix balance delta display (#28041) 2022-09-24 05:20:48 +00:00
Justin Starry 22b966be76
Explorer: replace usages of bn.js with BigInt (#28040) 2022-09-24 05:05:41 +00:00
Alessandro Decina b9f4c8e3c0
BorrowedAccount: add set_data_from_slice(), make set_data() take owned values (#27836)
* BorrowedAccount: add set_data_from_slice(), make set_data() take owned values

set_data() used to take a slice and would force alloc+copy if the caller
has owned values (eg account creation, account lookup table).

Expose set_data_from_slice() for callers that have slices, and switch
set_data() to taking an owned Vec.

* BorrowAccount: refactor common accounts_update_delta code in helper method

* BorrowedAccount: add extend_from_slice()

This allows avoiding copies appending entries to account lookup tables.

* BorrowedAccount: remove unnecessary ifs around update_accounts_resize_delta
2022-09-24 01:37:02 +01:00
Tao Zhu e51cf46d6b
Remove priority from vote transactions (#28030)
vote transactions have same priority fee
2022-09-24 00:31:50 +00:00
Tao Zhu f64242847d
increase instruction data cost (#27992) 2022-09-23 16:15:31 -05:00
behzad nouri 9ee53e594d
patches clippy errors from new rust nightly release (#28028) 2022-09-23 20:57:27 +00:00
apfitzge ca55fc8a05
root_bank_cache (#27985)
* BankForks: atomic root

* root bank cache

* fix and clean up

* added some tests
2022-09-23 15:01:03 -05:00
apfitzge e8014aaf84
fix typo: lamporots to lamports (#27987) 2022-09-23 15:00:31 -05:00
Jeff Washington (jwash) 89b0abcf4d
get_one_epoch_old_slot_for_hash_calc_scan to handle many old append vecs (#28000) 2022-09-23 11:17:02 -07:00
Brooks Prumo d9b31fd6b0
ahv: Add debug logging for EAH (#27998) 2022-09-23 14:04:48 -04:00
Jeff Biseda 206cc9407b
allow unsigned repair requests (#27910) 2022-09-23 10:11:08 -07:00
behzad nouri 97c9af4c6b plumbs through flag to generate merkle variant of shreds 2022-09-23 16:45:18 +00:00
behzad nouri 7d3f3b2f7d generates merkle shreds from ledger entries
The commit adds methods to convert &[Entry] to vector of Merkle shreds.
2022-09-23 16:45:18 +00:00
Will Hickey 0a97a5a006
Update CI error message when the version number needs to be bumped (#27997)
* Update CI error message when the version number needs to be bumped
* Move channel version check to its own file and put it before nits
2022-09-23 11:09:45 -05:00
dependabot[bot] 2f24a357b6
chore: bump reqwest from 0.11.11 to 0.11.12 (#28003)
* chore: bump reqwest from 0.11.11 to 0.11.12

Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.11 to 0.11.12.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.11...v0.11.12)

---
updated-dependencies:
- dependency-name: reqwest
  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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-09-23 10:09:27 -06:00
behzad nouri 315707504e
boxes StakeState in stake_account::Error::InvalidDelegation (#28006)
This avoids clippy::result_large_err error on newer rust versions:
https://rust-lang.github.io/rust-clippy/master/#result_large_err
2022-09-23 14:04:44 +00:00
Alessandro Decina bad09812e3 AccountSharedData: optimize set_data_from_slice
Remove memcmp and try to avoid allocations by trying to reuse or extend
existing capacity.
2022-09-23 11:31:33 +01:00
steviez e4affb9fea
Add Blockstore::highest_slot() method (#27981) 2022-09-23 04:53:43 -05:00
Michael Vines fb686cc83b Nodes with 0% commission are now included in the `getBlock` RPC method `rewards` response field. 2022-09-22 20:31:41 -07:00
dependabot[bot] 9ba9d057cd
chore: bump semver from 1.0.13 to 1.0.14 (#27971)
* chore: bump semver from 1.0.13 to 1.0.14

Bumps [semver](https://github.com/dtolnay/semver) from 1.0.13 to 1.0.14.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.13...1.0.14)

---
updated-dependencies:
- dependency-name: semver
  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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-09-22 18:15:25 -06:00
steviez eaa4787201
Cleanup blockstore test (#27999) 2022-09-22 23:37:47 +00:00
dependabot[bot] d84a7a4ce9
chore: bump futures from 0.3.23 to 0.3.24 (#27972)
* chore: bump futures from 0.3.23 to 0.3.24

Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.23 to 0.3.24.
- [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.23...0.3.24)

---
updated-dependencies:
- dependency-name: futures
  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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-09-22 16:26:18 -06:00
dependabot[bot] da9206fb87
chore: bump serde_yaml from 0.8.26 to 0.9.13 (#27970)
* chore: bump serde_yaml from 0.8.26 to 0.9.13

Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.8.26 to 0.9.13.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.8.26...0.9.13)

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

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

* [auto-commit] Update all Cargo lock files

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-09-22 16:25:20 -06:00
behzad nouri 9a57c64f21
patches clippy errors from new rust nightly release (#27996) 2022-09-22 22:23:03 +00:00
Brooks Prumo ff71df4695
Remove unnecessary call to `set_startup_verification_complete()` (#27986) 2022-09-22 16:54:17 -04:00
steviez 0a0d31e5fb
Add missing rootSlot documentation (#27709) 2022-09-22 14:59:31 -05:00
Jon Cinque f3fcbdba29
bench-tps: Add instruction padding program support (#27813)
* bench-tps: Add instruction padding program support

* Add ability to customize program id

* Improve names and comments
2022-09-22 21:37:40 +02:00
apfitzge 64f64dedea
Use regex in get_snapshot_file_kind (#27728)
refactor get_snapshot_file_kind to use regex
2022-09-22 13:55:48 -05:00
Brooks Prumo 1ee595ca9c
remove AccountsDb::initial_blockstore_processing_complete (#27974) 2022-09-22 13:52:04 -04:00
apfitzge a846d50b6a
Interleaved snapshot unpack versioning (#27484)
* Issue #27346 - deserialize and check snapshot version before account fields

* Update comment on SnapshotFileKind

Co-authored-by: Brooks Prumo <brooks@prumo.org>

* SnapshotStorageRebuilderResult to RebuiltSnapshotStorage

* better error propagation from rebuild_storage

Co-authored-by: apfitzge <apfitzge@users.noreply.github.com>
Co-authored-by: Brooks Prumo <brooks@prumo.org>
2022-09-22 11:44:25 -05:00
Justin Starry 91d556dc66
docs: Add versioned tx info to exchange integration guide (#27564)
* docs: Add versioned tx info to exchange integration guide

* feedback, extra tips, formatting
2022-09-22 14:19:36 +08:00
Justin Starry 108b245e6b
Require program account to be writable in extend program data ix (#27911)
* Require program account to be writable in extend program data ix

* feedback
2022-09-22 12:03:06 +08:00
Justin Starry 00b0a92ec4
Support sending versioned txs in rpc client (#27933)
* Support sending versioned txs in rpc client

* Revert adding instructions_mut function
2022-09-22 01:25:43 +00:00
Varga-Somogyi Ákos e15a5c010e
feat: implement addSignature in VersionedTransaction (#27945)
* Implement addSignature in VersionedTransaction

* Update asserts

* VersionedTransaction.addSignature test

* Update VersionedTransaction tests
2022-09-21 17:22:40 -07:00
dependabot[bot] e1a49f7766
chore: bump indicatif from 0.17.0 to 0.17.1 (#27968)
* chore: bump indicatif from 0.17.0 to 0.17.1

Bumps [indicatif](https://github.com/console-rs/indicatif) from 0.17.0 to 0.17.1.
- [Release notes](https://github.com/console-rs/indicatif/releases)
- [Commits](https://github.com/console-rs/indicatif/compare/0.17.0...0.17.1)

---
updated-dependencies:
- dependency-name: indicatif
  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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-09-21 23:32:11 +00:00