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

Runtime: add RentCollectorWithMetrics wrapper type for SVM #29

Closed

Conversation

buffalojoec
Copy link
Owner

Problem

Building on [PR], Bank requires a type that can implement the new SVMRentCollector trait, but override check_rent_state_with_account in order to inject functionality to submit logs and metrics during rent state evaluation.

Summary of Changes

Introduce a wrapper type to the runtime - RentCollectorWithMetrics - that simply wraps RentCollector and implements SVMRentCollector by passing-through the implemented methods to the underlying RentCollector. Then implement the override for check_rent_state_with_account to submit logs and metrics.

…ana-labs#2423)

A previous commit unified the code to output a slot between the
bigtable block and blockstore slot commands. In doing so, support for
blockstore slot when tx metadata is absent was unintentionally broken

This re-adds support for using the blockstore slot command when the
blockstore does not contain tx metadata
wen-coding and others added 25 commits August 21, 2024 17:12
…checking it in ProgressMap. (solana-labs#2676)

* Check poh_recorder.start_slot() hasn't been dumped previously before checking it in progress_map.

* Add more comments and put in checks for maybe_start_leader.

* Update core/src/replay_stage.rs

Co-authored-by: Ashwin Sekar <[email protected]>

* Use a slot which I am not leader to avoid dumping my own slot panic.

* Address reviewer comments.

* Address reviewer comments.

---------

Co-authored-by: Ashwin Sekar <[email protected]>
…#1923)

* cli: Plumb down `ComputeUnitLimit` to resolve tx

* Use simulated compute units in transaction

* wallet: Use simulated compute units for non-nonce transactions

* Modify transfer test
… drop (solana-labs#1871)

* reopen after shrink_progress drop

* add test

* allow deadcode

* docu the whole fn

---------

Co-authored-by: HaoranYi <[email protected]>
Co-authored-by: HaoranYi <[email protected]>
* feat: support committing fee-only transactions

* update and add new tests

* fix sbf test

* feedback

* fix new test

* test cleanup
…#2646)

We need the receiver to hold just one message so there is no need
to have an unbounded channel.
…ds (solana-labs#2673)

* gossip: ignore retransmitter signatures when comparing duplicate shreds

* pr feedback: compare rest of payload instead of setting sig

* pr feedback: remove dcou, pub(super)
refactor: remove redundant references in entrypoint! macro
…olana-labs#2700)

* replay: do not early return when marking slots duplicate confirmed

* pr feedback: catch panic explicitely, comments, add root test case

* pr feedback: add custom string to panic message

* pr feedback: add slot to log, use should_panic

* pr feedback: notification for {slot} -> notification for slot {slot}
* build(deps): bump quote from 1.0.36 to 1.0.37

Bumps [quote](https://github.com/dtolnay/quote) from 1.0.36 to 1.0.37.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](dtolnay/quote@1.0.36...1.0.37)

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

Signed-off-by: dependabot[bot] <[email protected]>

* Update all Cargo files

---------

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

* cli: Use a better amount during transaction simulation

#### Problem

There are issues with the current strategy of simulating a test
transaction in the `resolve_spend_message`. If the transaction is
creating an account, the test transaction will fail because not enough
lamports are sent to the destination.

#### Summary of changes

It's a tricky situation in which we can't always be correct, since
there's a chicken-and-egg situation with calculating the fee for spend
variants of `All` and `RentExempt` if the sender and the fee payer are
the same account.

To get the simulation correct in almost all situations, we simulate with
the real transfer amount. But if the fee payer is the sender, we
simulate with `0`. But we also add a new variant on `SpendAmount` to
cover some minimum amount required that must be transferred. Currently,
the only situations in which we have an issue are:

* creating a nonce account
* creating a stake account
* transferring SOL

Those first two have a minimum requirement, so use that. The third works
fine with a 0 amount, since it's just a SOL transfer.

* Address feedback
refactor: clean up invoke_builtin_function
…bs#2707)

ff cleanup: remove enable_gossip_duplicate_proof_ingestion, it's active everywhere.
@buffalojoec buffalojoec force-pushed the svm-rent-collector-bank-impl branch from 0c59dc9 to e421201 Compare August 23, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.