Skip to content

[TieredStorage] Remove the general-purposed TieredStorageWriter#196

Merged
yhchiang-sol merged 1 commit intoanza-xyz:masterfrom
yhchiang-sol:ts-rm-general-writer
Mar 13, 2024
Merged

[TieredStorage] Remove the general-purposed TieredStorageWriter#196
yhchiang-sol merged 1 commit intoanza-xyz:masterfrom
yhchiang-sol:ts-rm-general-writer

Conversation

@yhchiang-sol
Copy link
Copy Markdown

Problem

tiered_storage/writer.rs was added when we planned to support multiple
tiers in the tiered-storage (i.e., at least hot and cold). However, as we
changed our plan to handle cold accounts as state-compressed accounts,
we don't need a general purposed tiered-storage writer at this moment.

Summary of Changes

Remove tiered_storage/writer.rs as we currently don't have plans to develop cold storage.

Test Plan

Existing tiered-storage tests.

@yhchiang-sol yhchiang-sol marked this pull request as draft March 11, 2024 23:27
@yhchiang-sol yhchiang-sol marked this pull request as ready for review March 12, 2024 02:57
Copy link
Copy Markdown

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiered_storage/writer.rs was added when we planned to support multiple
tiers in the tiered-storage (i.e., at least hot and cold). However, as we
changed our plan to handle cold accounts as state-compressed accounts,
we don't need a general purposed tiered-storage writer at this moment.

Why does this not also apply to TieredStorageReader?

@yhchiang-sol
Copy link
Copy Markdown
Author

Why does this not also apply to TieredStorageReader?

We probably want to keep the TieredStorageReader so that we can provide some backward compatibility
in case we introduce a new way to store hot storage in the future. But we only need to keep one write at a time so we can deprecate writer.rs.

@yhchiang-sol
Copy link
Copy Markdown
Author

But at least I find TieredReadableAccount can be repurposed to HotAccount #218

})
}

pub fn write_accounts<
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who—if anyone—called this function before? I'm guessing no one? Maybe only tests are writing accounts? And those are calling HotStorageWriter::write_accounts() directly?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No one in master. (Previously both hot and cold storage called this function in my draft development)

@yhchiang-sol yhchiang-sol merged commit 69b6d5a into anza-xyz:master Mar 13, 2024
codebender828 pushed a commit to codebender828/agave that referenced this pull request Oct 3, 2024
…-xyz#196)

#### Problem
tiered_storage/writer.rs was added when we planned to support multiple
tiers in the tiered-storage (i.e., at least hot and cold).  However, as we
changed our plan to handle cold accounts as state-compressed accounts,
we don't need a general purposed tiered-storage writer at this moment.


#### Summary of Changes
Remove tiered_storage/writer.rs as we currently don't have plans to develop cold storage.

#### Test Plan
Existing tiered-storage tests.
OliverNChalk pushed a commit to OliverNChalk/agave that referenced this pull request Nov 11, 2025
Transactions that use maximum possible account locks.  Read and write
lock variants.
OliverNChalk pushed a commit to OliverNChalk/agave that referenced this pull request Nov 11, 2025
It seems simpler to have two distinct generator templates: one for
attacks that want to use the maximum possible number of accounts in a
transaction, and another one that uses the maximum possible number of
accounts of the maximum size.

These two templates have constraints that are quite different, and it
simplifies both the implementation and the interfaces of the templates.

SQUASH: This change should be incorporated into the following changes:

  Brennan <brennan.watt@anza.xyz>
  Tue Sep 3 21:28:31 2024 -0700
  constrain max accounts, shrink batch size (anza-xyz#419)

  Brennan <brennan.watt@anza.xyz>
  Thu Apr 18 18:10:43 2024 -0700
  read max accounts attack (anza-xyz#327)

  Illia Bobyr <illia.bobyr@solana.com>
  Mon Oct 23 12:21:02 2023 -0700
  Read and write lock attack (anza-xyz#196)
OliverNChalk pushed a commit to OliverNChalk/agave that referenced this pull request Nov 11, 2025
Original names were not specific enough.  "Max" in the name could refer
to the transaction size, account size, number of accounts or, possibly,
even more other things.  And we already have a `max_accounts_tx`
template that indeed is about putting as many accounts into a
transaction - it is confusing that `read_max_accounts` and
`max_accounts_tx` are unrelated.

FIXUP: This change should be absorbed into the changes that touch
`read_max_accounts.rs` and `write_max_accounts.rs`:

```
❯ git log --format=%s agave/master..upstream/master -- core/src/banking_stage/adversary/transaction_generators/{read,write}_max_accounts.rs
SQUASH Split max_size_accounts_tx out of max_accounts_tx (anza-xyz#454)
constrain max accounts, shrink batch size (anza-xyz#419)
write max accounts test (anza-xyz#328)
read max accounts attack (anza-xyz#327)
Read and write lock attack (anza-xyz#196)
```
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.

2 participants