Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make getRecentPerformanceSamples() return the number of vote and non-vote transactions #29159

Closed
steviez opened this issue Dec 9, 2022 · 16 comments · Fixed by #29388
Closed
Assignees

Comments

@steviez
Copy link
Contributor

steviez commented Dec 9, 2022

Problem

Currently, the getRecentPerformanceSamples() RPC method allows a user a query the number of transactions over some time window. The returned data contains the total number of transactions, but doesn't provide any insight into the number of vote vs. non-vote transactions. It would be nice for this method to return the number of votes and non-votes to have more granular data about the cluster.

Proposed Solution

Supposing that we want to we want to adjust the return type of getRecentPerformanceSamples() as suggested above, a couple things need to happen:

  • Currently, SamplePerformanceService pushes PerfSample structs into the Blockstore. The number of transactions is queried from a Bank in this service; we'll need to store / be able to query the number of votes and non-votes in Bank.
  • Adding extra field(s) to PerfSample stored in the Blockstore will be a breaking change if we store these items in the same column. Something will need to be done to address the incompatibility, such as adding a custom deserializer to the struct, such that both old and new instances of the struct in the Blockstore can be read out.
  • Update the existing RPC function to return the new type (and whatever is entailed with making a change to this API).
    • Per some discussion on Discord, adding new fields is alright as the expectation is that older clients will ignore unknown fields if they get a response from server with newer version
@steviez
Copy link
Contributor Author

steviez commented Dec 9, 2022

Some more / context discussion in Discord:
https://discord.com/channels/428295358100013066/488758828330909706/1050539084583546880

@ngundotra
Copy link
Contributor

@CriesofCarrots
Copy link
Contributor

CriesofCarrots commented Dec 15, 2022

@ilya-bobyr , I'm probably a good person to help review work on this

@CriesofCarrots
Copy link
Contributor

Also, consider adding a minimumContextSlot input parameter to this method (https://discord.com/channels/428295358100013066/673718028323782674/1052811908845146162)

@0xksure
Copy link

0xksure commented Dec 19, 2022

Have anyone started on a branch? Would be very interested in tagging along on this.

@CriesofCarrots
Copy link
Contributor

CriesofCarrots commented Dec 20, 2022

In consideration of the new Bank fields, we have another use-case that would benefit from the ability to query the total number of committed transactions in Bank

@ilya-bobyr
Copy link
Contributor

Here is a change that address this request: #29353
Or, at least, it is a first step :)

The PR description explains the details. One difference with what was suggested in the issue is that instead of trying to deserialize two different versions of the stats, I've put new stats into a new column. It seems both better from the maintenance standpoint, and was actually much easier to implement.

I could not find a way to support deserialization based on the total object size when working with the serde/bincode combination. And rocksdb interaction layer has a deep assumption that values stored in columns can be deserialized with serde/bincode.

Making a decision about the data structure format based on the binary size also seems fragile. I think, there is a good chance more fields will be added into the performance stats set, and the need to count the number of committed transactions seems to be supporting this assumption.

@CriesofCarrots I could probably help with the other use case as well, now that I've spent some time learning this part of the codebase. Or do you want to combine these changes?

I was also wondering if it would make sense to add the non-vote transaction count to the explorer UI?
Should it be a separate change? Do we care about this stat in there?

@0xksure Check the linked PR. It is a single commit, not a branch, as it seems to be a rather tightly connected change.

@ilya-bobyr
Copy link
Contributor

Another thing I'm still not sure about is the quality of the test coverage.

I think, I could add a local cluster test that would run a cluster with a single transaction, and then check that one transaction is reported in the cluster performance stats. One potential problem here is that the performance metrics seems to be collected based on a 30 seconds intervals. It would be non-optimal for a test to have to run for so long.

I also wonder if I should add a unit test or even several into runtime/src/bank.rs. The functionality I've added is similar to the existing stats. And I have updated all the unit tests in there to check the new stat. But, there could be some use cases that would not be covered by the existing tests.

@steviez
Copy link
Contributor Author

steviez commented Dec 21, 2022

I was also wondering if it would make sense to add the non-vote transaction count to the explorer UI?

Yep, being able to display non-vote tx count in explorer was the main motivation for this item 😄.

Should it (explorer update) be a separate change?

Yes, we should update explorer in a separate PR. I think solana-labs/explorer#211 is tracking update for the explorer, and @ngundotra may have already looked at what would be needed once the updated RPC method has landed,

One difference with what was suggested in the issue ...

Fair enough - the issue writeup was meant as a primer to get started. I think we can discuss the merits of implementation details in the PR

@0xksure
Copy link

0xksure commented Dec 21, 2022

Yes, we should update explorer in a separate PR. I think solana-labs/explorer#211 is tracking update for the explorer, and @ngundotra may have already looked at what would be needed once the updated RPC method has landed

I guess an update to web3 is necessary as well. From what I can tell it's enough to update the PerfSampleResult schema and the PerfSample type

@ngundotra
Copy link
Contributor

@steviez how does the release schedule work for RPC updates like this? I'll have to update

async getRecentPerformanceSamples(
limit?: number,
): Promise<Array<PerfSample>> {
const unsafeRes = await this._rpcRequest(
'getRecentPerformanceSamples',
limit ? [limit] : [],
);
const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);
if ('error' in res) {
throw new SolanaJSONRPCError(
res.error,
'failed to get recent performance samples',
);
}
return res.result;
}
before getting this into the Explorer UI

@steviez
Copy link
Contributor Author

steviez commented Dec 21, 2022

how does the release schedule work for RPC updates like this?

Recall that RPC nodes are running the same client as validators. Additionally, RPC operators typically lag behind the latest suggested version by a couple of releases for any given cluster (for the sake of stability).

MNB should be pushing towards v1.14 in Jan; if we want to consume this ASAP in explorer, we'd probably need to backport the change to v1.14. That being said, we have been trying to clamp down the backport process to critical issues in favor of getting onto a schedule where we are regularly pushing out releases.

From a functionality standpoint, I'd say this change is not critical. But, given the optics that come with TPS, we might opt to backport so we can push this out sooner. A discussion to be had in the releng channel once this lands.

@ilya-bobyr
Copy link
Contributor

In consideration of the new Bank fields, we have another use-case that would benefit from the ability to query the total number of committed transactions in Bank

Thinking a bit more about it. In bank.rs I see this:

        let CommitTransactionCounts {
            committed_transactions_count,
            committed_non_vote_transactions_count,
            committed_with_failure_result_count,
            signature_count,
        } = counts;

        let tx_count = if self.bank_tranaction_count_fix_enabled() {
            committed_transactions_count
        } else {
            committed_transactions_count.saturating_sub(committed_with_failure_result_count)
        };

        self.increment_transaction_count(tx_count);

So, depending on the bank_tranaction_count_fix, numTransactions in the RPC response is either the total number of committed transactions, or the number of transactions that committed with a successful result.

I can easily add, for example, numCommitedTransactions to record the total number of committed transactions.
Unless someone has a different suggestion on the details of this.

As it would not require a change in the stat storage, it could also be a separate change.
But as they look close enough, I can combine them in a single branch.
Would it save effort in the release process?

@CriesofCarrots
Copy link
Contributor

Hey @ilya-bobyr and all. Sorry, I missed the latest discussion here before commenting on the PR. I think it will be easier to talk about Bank and Blockstore changes separately, and we can do that on the separate PRs I've suggested over there. Wdyt?

I could not find a way to support deserialization based on the total object size when working with the serde/bincode combination. And rocksdb interaction layer has a deep assumption that values stored in columns can be deserialized with serde/bincode.

Making a decision about the data structure format based on the binary size also seems fragile. I think, there is a good chance more fields will be added into the performance stats set, and the need to count the number of committed transactions seems to be supporting this assumption.

Bincode can be instructed to fail if the data size is not correct, so it would be straightforward to attempt deserialization into each format in turn.
However, since you mention that there may be more fields added in the future, I now think that the best approach is probably to make the new data struct use protobuf serde. We have supporting apis already, like get_protobuf_or_bincode(). The Rewards and TransactionStatus columns use this approach, so their history will probably be instructive.

But anyway, we can discuss this more on the blockstore PR.

As it would not require a change in the stat storage, it could also be a separate change.
But as they look close enough, I can combine them in a single branch.
Would it save effort in the release process?

Generally, more smaller, separate PRs, the better. But as I mentioned on your existing PR, both the stat-storage change and the numCommittedTransactions change will require snapshot handling, and we can definitely lump them in the same new snapshot version. Let's sync up to see if it makes sense to approach this work in parallel :)

ilya-bobyr added a commit that referenced this issue Jan 3, 2023
A subsequent change to `SamplePerformanceService` introduces non-vote transaction counts, which `bank`s need to store.

Part of work on #29159
nickfrosty pushed a commit to nickfrosty/solana that referenced this issue Jan 4, 2023
A subsequent change to `SamplePerformanceService` introduces non-vote transaction counts, which `bank`s need to store.

Part of work on solana-labs#29159
nickfrosty added a commit to nickfrosty/solana that referenced this issue Jan 6, 2023
* chore: update docusaurus to latest version

* fix: added required fields

* fix: custom layout pages

* fix: updated doc keywords to array

* fix: remobed breadcrumbs for the default

* feat: added new JSON API example

* feat: created api partial pages

* fix: updated links

* feat: added api landing page and updates api sidebar

* fix: updated the call to action on the http method page

* fix: mobile responsive-ness

* fix: updated sidebar link

* fix: updated internal linking to use new api page

* rolls back merkle shreds on testnet (solana-labs#29340)

solana-labs#29339
adds hash domain to merkle shreds. In order to merge that change, need
to temporarily disable merkle shreds on testnet.

* remove acctdb.min_num_stores (solana-labs#29335)

* Remove println (solana-labs#29342)

* exclude Vote transactions from updating min-fee-cache (solana-labs#29341)

* Add metrics for min/max priority fee per slot, and counters for fee/non-fee transactions (solana-labs#29330)

* Add metrics for min/max priority fee per slot, and counters for fee/non-fee txs

* get fee range of prioritized transactions only

* Update runtime/src/prioritization_fee.rs

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* Update runtime/src/prioritization_fee.rs

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* fix format

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* test_utils::create_test_accounts pre-allocates an append vec first (solana-labs#29336)

* test_utils::create_test_accounts pre-allocates an append vec first

* remove comment

* introduce ShrinkInProgress (solana-labs#29329)

* introduce ShrinkInProgress

* remove redundant check

* add comments

* Fix "tranaction" typo in code base (solana-labs#29347)

Fix typos

* [docs] updating the "writing programs" section (solana-labs#29197)

* docs: added limitations page

* fix: updated deprecated cargo test-bpf

* docs: moved content off of overview

* fix: added compute budget description

* fix: updated compute buddget

* fix: rearranged sections

* fix: update code snippet

* docs: overview page and links

* [docs] Updated transactions overview page (solana-labs#29345)

fix: added broad overview

* docs: transactions fees/confirmation and deploying programs (solana-labs#28895)

docs: adds and updates

* Remove checks for activated feature check_physical_overlapping (solana-labs#29355)

* fix: client-test timeout (solana-labs#29364)

* fix: retry counter doesn't count

* set timeout for wait_for

* Expand solana-sdk API docs. (solana-labs#29063)

* Expand solana-sdk API docs.

* Update sdk/src/genesis_config.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Update sdk/src/hard_forks.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Update sdk/src/builtins.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Update sdk/src/builtins.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Update sdk/src/rpc_port.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Update sdk/src/lib.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Clarify derivation_path docs

* 'entry point' -> 'entrypoint'

Co-authored-by: Tyera <teulberg@gmail.com>

* Add fee-payer arg to solana feature activate (solana-labs#29367)

* replace ./cargo with cargo in sbf/bpf build scripts (solana-labs#29371)

* Make connection cache to support specified client endpoint (solana-labs#29240)

ConnectionCache is being used for managing connections for sending messages using quic. In the current implementation the connection's endpoint is created in a lazy initialized fashion and set to one per connection pool. In repair we need all connections to use the same Endpoint so that the server can send back the response to the same Endpoint.

* chore: bump futures-util from 0.3.24 to 0.3.25 (solana-labs#29337)

* chore: bump futures-util from 0.3.24 to 0.3.25

Bumps [futures-util](https://github.com/rust-lang/futures-rs) from 0.3.24 to 0.3.25.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](rust-lang/futures-rs@0.3.24...0.3.25)

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

* get rid of ./cargo when building downstream projects (solana-labs#29372)

* vote: Prevent commission update in the second half of epochs (solana-labs#29362)

* vote: Prevent commission update in the second half of epochs

* Address feedback

* Fix tests

* Make the feature enabled by single-contributor

* Use a cooler pubkey

* ci: trigger downstream pipeline when cargo-[test|build]-[bpf|sbf] is modified (solana-labs#29390)

* ci: trigger stable-sbf pipeline when cargo-[test|build]-[bpf|sbf] is modified (solana-labs#29391)

* Security TXT: Add source_release and source_revision fields (solana-labs#29392)

* Fix BigTable upload early return (solana-labs#29378)

* Change Err when slot range is empty to Ok and log; add method docs

* Update var and log to be more correct

* Promote log level to warn

* Minor cleanup on bigtable_upload (solana-labs#29379)

Adjust some logs, and remove an unnecessary cloned().

* Adjust ledger-tool bigtable upload starting-slot default value (solana-labs#29384)

Currently, if starting-slot is unspecified, a value of 0 will be chosen.
In the common case where someone is operating on a much more recent
range, this would result in a ton of wasted operations & time.

Instead, choose a smarter default value for starting-slot based on what
we detect is currently in the blockstore.

* feat: Allow for verifying the sigs of partially signed txs in web3.js (solana-labs#29249)

* feat: allow for verifying the sigs of partially signed txs

* fix: make comment ab verifying sigs more specific

Co-authored-by: Steven Luscher <steveluscher@users.noreply.github.com>

* feat: add tests for partial signed tx verification

* fix: revert lockfile changes

* fix: make tests more modular

* fix: run linter

Co-authored-by: Steven Luscher <steveluscher@users.noreply.github.com>

* Increase Stalebot's operation consumption limit by another 50%

* feat: add getInflationRate RPC call to web3.js (solana-labs#29377)

* Add getInflationRate RPC call

* Fix code formatting

Co-authored-by: steveluscher <me+github@steveluscher.com>

* Temporary increase the build redundancy threshold (solana-labs#29412)

* Add an option to reinstall sbf-tool binaries by cargo-build-sbf (solana-labs#29410)

* Enable full output of cargo-build-sbf tests (solana-labs#29411)

* test: fix get inflation rate test failed at test:live (solana-labs#29413)

* Bump sbf-tools to v1.32 (solana-labs#29325)

* Bump sbf-tools to v1.32

This version of sbf-tools is based on Rust 1.65.0 and LLVM 15.0.

* Temporary ignore build-sbf tests until issue with buildkite cache resolved

* ci: fix web3-commit-lint (solana-labs#29414)

chore: update web3 package-lock.json

* Re-enable cargo-build-sbf tests (solana-labs#29415)

* Plumb dumps from replay_stage to repair (solana-labs#29058)

* Plumb dumps from replay_stage to repair

When dumping a slot from replay_stage as a result of duplicate or
ancestor hashes, properly update repair subtrees to keep weighting and
forks view accurate.

* add test

* pr comments

* experiments different turbine fanouts for propagating shreds (solana-labs#29393)

The commit allocates 2% of slots to running experiments with different
turbine fanouts based on the slot number.
The experiment is feature gated with an additional feature to disable
the experiment.

* Increase the Stalebot operations limit by another 50%.

* Double the Stalebot operations limit

* Add more logging and documentation to flaky optimistic confirmation tests (solana-labs#29418)

* Revert "add retry for flakey local cluster test (solana-labs#29228)"

This reverts commit 7a97121.

* Add logging for repair

* replaced ./cargo with cargo in build docs (solana-labs#29375)

* expands test coverage for merkle/legacy shreds sigverify (solana-labs#29424)

* expands test coverage for sign_shreds_gpu (solana-labs#29429)

* Crank Stalebot's operations limit up to a level that should handle all issues

This thing seems to have been humming along at 300 in the dead zone between NA night and Europe morning. Let's see if it can handle the entire corpus.

* simplifies shreds sigverify (solana-labs#29436)

Simplifying this code in preparation of removing merkle roots from
shreds binary.

* fix typo in rpc client (solana-labs#29434)

* fix typo in runtime docs

* fix typo in rpc client

* chore: typecheck web3.js tests (solana-labs#29422)

* fix: web3.js test typescript errors

Fixes the typescript errors throughout the
web3.js test suite

* fix: node14 test

AbortController is a default in node16 but needs
to be imported for node14

* fix: additional typescript errors

Adds the tests to the tsconfig to auto-include mocha
and fixes remaining typescript errors

* fix: graphql-tools to work with typescript

version of graphql-tools initially installed has incompatible
types preventing ./scripts/typegen.sh from passing when tests
are added to the include path of tsconfig.json

* Don't build typedefs for tests

Co-authored-by: steveluscher <me+github@steveluscher.com>

* implements shred::layout::get_merkle_root (solana-labs#29437)

In preparation of removing merkle roots form shreds binary, the commit
adds api to recover the root from the merkle proof embedded in shreds
payload.

* Update SECURITY.md

* feat: add commission fields matching RPC spec to web3.js client (solana-labs#29435)

* fix: adds commission field matching RPC spec

* fix: update optional to follow type pattern

* chore: bump @babel/runtime from 7.18.0 to 7.20.7 in /web3.js (solana-labs#29439)

Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.18.0 to 7.20.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.20.7/packages/babel-runtime)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump @solana/buffer-layout from 4.0.0 to 4.0.1 in /web3.js (solana-labs#29441)

Bumps [@solana/buffer-layout](https://github.com/solana-labs/buffer-layout) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/solana-labs/buffer-layout/releases)
- [Changelog](https://github.com/solana-labs/buffer-layout/blob/master/CHANGELOG.md)
- [Commits](https://github.com/solana-labs/buffer-layout/commits)

---
updated-dependencies:
- dependency-name: "@solana/buffer-layout"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump @babel/plugin-transform-runtime from 7.17.0 to 7.19.6 in /web3.js (solana-labs#29442)

chore: bump @babel/plugin-transform-runtime in /web3.js

Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.17.0 to 7.19.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.19.6/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump bn.js from 5.2.0 to 5.2.1 in /web3.js (solana-labs#29443)

Bumps [bn.js](https://github.com/indutny/bn.js) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/indutny/bn.js/releases)
- [Changelog](https://github.com/indutny/bn.js/blob/master/CHANGELOG.md)
- [Commits](indutny/bn.js@v5.2.0...v5.2.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* adds shred::layout::get_signed_data (solana-labs#29438)

Working towards removing merkle root from shreds payload, the commit
implements api to obtain signed data from shreds binary.

* removes merkle root comparison in erasure_mismatch (solana-labs#29447)

Merkle shreds within the same erasure batch have the same merkle root.
The root of the merkle tree is signed. So either the signatures match
or one fails sigverify, and the comparison of merkle roots is redundant.

* generalizes the return type of Shred::get_signed_data (solana-labs#29446)

The commit adds an associated SignedData type to Shred trait so that
merkle and legacy shreds can return different types for signed_data
method.
This would allow legacy shreds to point to a section of the shred
payload, whereas merkle shreds would compute and return the merkle root.
Ultimately this would allow to remove the merkle root from the shreds
binary.

* chore: bump @rollup/plugin-json from 4.1.0 to 6.0.0 in /web3.js (solana-labs#29452)

Bumps [@rollup/plugin-json](https://github.com/rollup/plugins/tree/HEAD/packages/json) from 4.1.0 to 6.0.0.
- [Release notes](https://github.com/rollup/plugins/releases)
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/json/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/url-v6.0.0/packages/json)

---
updated-dependencies:
- dependency-name: "@rollup/plugin-json"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump @typescript-eslint/parser from 5.40.1 to 5.47.1 in /web3.js (solana-labs#29453)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.40.1 to 5.47.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.47.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add test_shrink_ancient_overflow (solana-labs#29363)

* cleanup 'shrinking_in_progress' (solana-labs#29359)

* feature: set rent_epoch to Epoch::MAX (solana-labs#28690)

* check android builds

* feature: set rent_epoch to Epoch::MAX

* tweaks

* Update runtime/src/rent_collector.rs

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

* simplify changes to tests

* back out some test changes

* calculate_rent_result passes through Exempt

* move calc outside loop

* if rent epoch is already max, use 'NoRentCollectionNow'

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

* test permutations of set_exempt_rent_epoch_max (solana-labs#29461)

* add test and comments (solana-labs#29459)

* simplify get_storages_for_slot (solana-labs#29463)

* handle ancient overflow case correctly (solana-labs#29458)

* migrate tests to not use AccountStorage::get (solana-labs#29464)

* decrease frequency of random shrink of ancient append vec (solana-labs#29462)

* remove metric time_hashing_skipped_rewrites_us (solana-labs#29470)

* Fix snapshot download test (solana-labs#29457)

snapshot download tests will now attempt to load the downloaded snapshot

* test_rent_exempt_temporal_escape works in passes (solana-labs#29460)

* cleanup in account_storage.rs (solana-labs#29467)

* Snapshot download test (solana-labs#29474)

* remove skip rewrite code from collect_rent_from_accounts (solana-labs#29472)

* skip_rewrites will only be feature driven (solana-labs#29468)

* filter get_snapshot_storages for requested_slots earlier (solana-labs#29465)

* filter get_snapshot_storages for requested_slots earlier

* Update runtime/src/accounts_db.rs

Co-authored-by: apfitzge <apfitzge@gmail.com>

Co-authored-by: apfitzge <apfitzge@gmail.com>

* add test (solana-labs#29471)

* Cli: refactor program code slightly (solana-labs#29477)

* Remove unused messages Vecs

* Remove superfluous Option in check_payer and send_deploy_messages

* Remove superfluous Option in do_process_program_write_and_deploy

* Remove unnecessary block-wrapping in do_process_program_write_and_deploy

* Cli: the authority passed to `solana program write-buffer` must be a proper signer (solana-labs#29476)

* Fix upgrade signer parsing in program deploy (noop)

* Fix buffer-authority signer parsing in program write-buffer (error on Pubkey input)

* Move async remove to snapshot_utils.rs (solana-labs#29406)

* remove unnecessary type (solana-labs#29473)

* refactor RecycleStores::add_entries (solana-labs#29475)

* refactor RecycleStores::add_entries

* pr feedback

* add AccountStorage.is_empty (solana-labs#29478)

* add test method get_and_assert_single_storage (solana-labs#29481)

* add test method assert_no_storages_at_slot() (solana-labs#29483)

* remove single use AccountStorage.slot_store_count (solana-labs#29479)

* get_snapshot_storages removes call to AccountStorage.get (solana-labs#29466)

* remove should_retain from mark_dirty_dead_stores (solana-labs#29358)

* typo (solana-labs#29485)

* update leger tool help for db verify refcounts (solana-labs#29486)

* Add retries for get_latest_blockhash for accounts cluster bench (solana-labs#29456)

* retry get_latest_blockhash

* more retries for get_latest_blockhash

* retry for get_fee too

* clippy

* fmt

* sleep

* Update accounts-cluster-bench/src/main.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* Update accounts-cluster-bench/src/main.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* rename

Co-authored-by: Tyera <teulberg@gmail.com>

* dedups gossip addresses, taking the one with highest weight (solana-labs#29421)

dedups gossip addresses, keeping only the one with the highest weight

In order to avoid traffic congestion or sending duplicate packets, when
sampling gossip nodes if several nodes have the same gossip address
(because they are behind a relayer or whatever), they need to be
deduplicated into one.

* add AccountStorage.get_slot_storage_entry (solana-labs#29480)

* cleanup get_snapshot_storages (solana-labs#29488)

* cleanup get_snapshot_storages

* pr feedback

* add AccountStorage.is_empty_entry for tests (solana-labs#29489)

* bank: Record non-vote transaction count (solana-labs#29383)

A subsequent change to `SamplePerformanceService` introduces non-vote transaction counts, which `bank`s need to store.

Part of work on solana-labs#29159

* chore: add missing members back to workspace.members (solana-labs#29450)

* frozen-abi/macro

* program-runtime

* sdk/macro

* sdk/program

* storage-bigtable/build-proto

* fix sorting

* recovers merkle roots from shreds binary in {verify,sign}_shreds_gpu (solana-labs#29445)

{verify,sign}_shreds_gpu need to point to offsets within the packets for
the signed data. For merkle shreds this signed data is the merkle root
of the erasure batch and this would necessitate embedding the merkle
roots in the shreds payload.
However this is wasteful and reduces shreds capacity to store data
because the merkle root can already be recovered from the encoded merkle
proof.

Instead of pointing to offsets within the shreds payload, this commit
recovers merkle roots from the merkle proofs and stores them in an
allocated buffer. {verify,sign}_shreds_gpu would then point to offsets
within this new buffer for the respective signed data.

This would unblock us from removing merkle roots from shreds payload
which would save capacity to send more data with each shred.

* should_move_to_ancient_append_vec works with a single storage (solana-labs#29484)

* Fix typo in blockstore_metrics.rs (solana-labs#29503)

embeded -> embedded

* chore: added algolia keys

* get_storages_for_slot uses get_slot_storage_entry (solana-labs#29498)

* fix: update the api pages for rent PRs

* Rework method for reporting security problems (solana-labs#29511)

* solana-install: check for fixed releases directly (solana-labs#29365)

when initializing, if a specific release is requested, we only need to confirm it exists
this can be done with the download url itself, rather than pulling the list of releases

* Fix TransactionPrecompileVerification RPC error (solana-labs#29490)

* make rpc test tolerant of rent_epoch being set to max (solana-labs#29508)

* logger: Update to env_logger 0.9.3 (solana-labs#29510)

* remove unnecessary to_vec() (solana-labs#29516)

* filter_storages ignores reclaims (solana-labs#29512)

* cleanup ancient append vec tests (solana-labs#29514)

* migrate tests to get_slot_storage_entry (solana-labs#29515)

* require repair request signature, ping/pong for Testnet, Development clusters (solana-labs#29351)

* Adds SnapshotError::IoWithSourceAndFile (solana-labs#29527)

* remove store_ids from a few shrink data structures (solana-labs#29360)

* get_storage_to_move_to_ancient_append_vec returns a single append vec (solana-labs#29482)

get_storages_to_move_to_ancient_append_vec returns a single append vec

* use get_storage_for_slot() in tests (solana-labs#29517)

* process_storage_slot takes a single append vec (solana-labs#29519)

* Stream the executed transaction count in the block notification (solana-labs#29272)

Problem

The plugins need to know when all transactions for a block have been all notified to serve getBlock request correctly. As block and transaction notifications are sent asynchronously to each other it will be difficult.

Summary of Changes

Include the executed transaction count in block notification which can be used to check if all transactions have been notified.

* fixes errors from clippy::useless_conversion (solana-labs#29534)

https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

* Fixes format string (solana-labs#29533)

* fixes errors from clippy::needless_borrow (solana-labs#29535)

https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

* shrink_slot_forced uses a single append vec (solana-labs#29521)

* migrate tests to use get_storage_for_slot (solana-labs#29518)

* fixes errors from clippy::redundant_clone (solana-labs#29536)

https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone

* Update CI pipeline to only run `checks` step on version bump PRs (solana-labs#29243)

* Add logic to buildkite pipeline so version bump PRs don't run the full CI

* simplifies sigverify copy_return_values (solana-labs#29495)

* shrink fns take a single append vec (solana-labs#29522)

* Refine appendvec sanitize error message to include path (solana-labs#29541)

* Removed assert on write_version ordering  (solana-labs#29530)

Removed assert on write_version ordering as snapshot created by earlier version
is not honoring that.

* storage rebuilder regex cleanup (solana-labs#29408)

* storage rebuilder regex cleanup

* Update runtime/src/snapshot_utils/snapshot_storage_rebuilder.rs

Co-authored-by: apfitzge <apfitzge@gmail.com>

Co-authored-by: apfitzge <apfitzge@gmail.com>

* conflict fix

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Co-authored-by: Jeff Washington (jwash) <jeff.washington@solana.com>
Co-authored-by: Tyera <tyera@solana.com>
Co-authored-by: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com>
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
Co-authored-by: Alessandro Decina <alessandro.d@gmail.com>
Co-authored-by: Yihau Chen <a122092487@gmail.com>
Co-authored-by: Brian Anderson <andersrb@gmail.com>
Co-authored-by: Tyera <teulberg@gmail.com>
Co-authored-by: kirill lykov <kirill.lykov@solana.com>
Co-authored-by: Lijun Wang <83639177+lijunwangs@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Jon Cinque <jon@solana.com>
Co-authored-by: Daniel Kilimnik <daniel@neodyme.io>
Co-authored-by: steviez <steven@solana.com>
Co-authored-by: Nico Schapeler <38372048+cryptopapi997@users.noreply.github.com>
Co-authored-by: Steven Luscher <steveluscher@users.noreply.github.com>
Co-authored-by: TJDawson10 <taylordaws47@gmail.com>
Co-authored-by: steveluscher <me+github@steveluscher.com>
Co-authored-by: Dmitri Makarov <dmakarov@users.noreply.github.com>
Co-authored-by: Ashwin Sekar <ashwin@solana.com>
Co-authored-by: gr8den <gr8@nxt.ru>
Co-authored-by: Trent Nelson <trent@solana.com>
Co-authored-by: Kollan House <KollanH@gmail.com>
Co-authored-by: Brooks Prumo <brooks@prumo.org>
Co-authored-by: Brennan Watt <brennan.watt@solana.com>
Co-authored-by: apfitzge <apfitzge@gmail.com>
Co-authored-by: Xiang Zhu <xzhu70@gmail.com>
Co-authored-by: HaoranYi <haoran.yi@gmail.com>
Co-authored-by: Illia Bobyr <illia.bobyr@solana.com>
Co-authored-by: Ikko Ashimine <eltociear@gmail.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
Co-authored-by: hana <81144685+2501babe@users.noreply.github.com>
Co-authored-by: Jeff Biseda <jbiseda@gmail.com>
Co-authored-by: Brooks <brooks@solana.com>
Co-authored-by: Will Hickey <will.hickey@solana.com>
gnapoli23 pushed a commit to gnapoli23/solana that referenced this issue Jan 10, 2023
A subsequent change to `SamplePerformanceService` introduces non-vote transaction counts, which `bank`s need to store.

Part of work on solana-labs#29159
gnapoli23 pushed a commit to gnapoli23/solana that referenced this issue Jan 10, 2023
A subsequent change to `SamplePerformanceService` introduces non-vote transaction counts, which `bank`s need to store.

Part of work on solana-labs#29159
gnapoli23 pushed a commit to gnapoli23/solana that referenced this issue Jan 10, 2023
A subsequent change to `SamplePerformanceService` introduces non-vote transaction counts, which `bank`s need to store.

Part of work on solana-labs#29159
gnapoli23 pushed a commit to gnapoli23/solana that referenced this issue Jan 10, 2023
A subsequent change to `SamplePerformanceService` introduces non-vote transaction counts, which `bank`s need to store.

Part of work on solana-labs#29159
ilya-bobyr added a commit that referenced this issue Jan 18, 2023
Allow interested parties to see both total and non-vote transaction
counts in each performance sample.

Fixes #29159
@ilya-bobyr
Copy link
Contributor

I must admit, I completely missed this:

Also, consider adding a minimumContextSlot input parameter to this method (discord.com/channels/428295358100013066/673718028323782674/1052811908845146162)

Here is the referenced message:

I think the fix is probably to add min context slot to getRecentPerformancSamples so requests from nodes that are behind fail.

I do not understand what it means.
@CriesofCarrots Could you clarify what is the meaning of minimumContextSlot?

Should I move it into another issue or reopen this one?

@steviez
Copy link
Contributor Author

steviez commented Jan 18, 2023

Should I move it into another issue or reopen this one?

Let's leave this issue closed, I think you can either make a new issue or just a new PR.

Could you clarify what is the meaning of minimumContextSlot?

To start out, I would suggest picking another method from the API that has a minContextSlot arg, and trace that through code to see how it affects the results.

As to why we need it here, note that the methods you added record the number of transactions and slots processed in some amount of time. However, those performance samples are unaware of the state of the node in relation to the cluster. For example, suppose a node was just recently offline.

In order to catch up, by definition, the node will have to replay slots faster than the cluster is producing them. If we get some perf. samples from this node while it is catching up, the tx processed numbers will be deceptively high (because we report transactions-per-second, not transactions-per-slot), and not representative of what the cluster is actually doing in realtime.

Setting a minContextSlot could help us filter out samples from a catchup period

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants