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

wip: changes to clean/shrink/zero lamports #186

Conversation

jeffwashington
Copy link
Owner

Problem

we need to keep track of zero lamport accounts

Summary of Changes

This is a hack branch, but has code that is useful.

Fixes #

kevinheavey and others added 9 commits September 10, 2024 19:27
* extract feature-set crate

* update feature_set dependents

* re-export with deprecation notice

* fix path after rebase

* fmt

* fmt after rebase

* fixes after rebase

* unused import

* fix import

* unused import

* post-rebase fixes

* fix path

* missing frozen-abi support

* update lock file

* use workspace lints

* fix paths

* fix import

* remove unused import

* remove unused deps

* consolidate imports

* add back dep (not unused after all)
* extract solana-pubkey from solana-program

* make curve25519_dalek an optional dep

* make sha2 optional in solana-pubkey

* move pubkey wasm code to solana-pubkey

* make serde optional in solana-pubkey

* make bytemuck optional in solana-pubkey

* put syscalls behind target_os = "solana"

* move rand to dev deps

* remove thiserror

* remove num_derive

* make std optional

* use std when target_arch = "wasm32"

* fix frozen-abi support

* update digests

* update digests

* update nits.sh

* update lock file

* make some doc examples text-only because order-crates-for-publishing.py is wrong

* add dev-context-only-utils to appease ci

* fmt

* fix unused import when target_os = "solana"

* fix imports in wasm target

* fix import issue

* activate std feat when borsh feat is activated

* fix a conditional import

* fix more feature issues

* add default-features = false (otherwise we can't disable default features anywhere in the workspace)

* activate std feature explicitly

* clean up imports

* fix test features

* fix lints

* post-rebase fixes

* make FromStr, Display and Debug no_std

* fmt

* update digest

* fix duplicate line post-rebase

* stop avoiding circular dev dep since CI now accommodates this

* make rustc_version optional

* fix doc link

* fix frozen-abi deps

* update digests

* fmt

* don't require std for FromStr

* simplify some imports

* use as_ref instead of to_bytes

Co-authored-by: Jon C <[email protected]>

* use as_ref instead of to_bytes

Co-authored-by: Jon C <[email protected]>

* remove unnecessary test criterion in #[cfg()]

Co-authored-by: Jon C <[email protected]>

* remove unnecessary test criterion in #[cfg()]

Co-authored-by: Jon C <[email protected]>

* remove unrelated change

* but don't remove #[cfg(test)]

* call out doc tests in explanation of circular dev dep

* add missing conversion

* remove unnecessary #[cfg(feature = "std")]

* use strum to check that FromPrimitive impls are exhaustive

* sort deps

* add test for From<u64>

---------

Co-authored-by: Jon C <[email protected]>
* write integration tests for nonce transactions

these pass against master as-written

* advance nonce when creating rollback accounts

previously rollback accounts carried the fee payer that was to be committed, but an untouched nonce
now, the account saver can use the nonce and fee payer from rollback accounts identically, possibly merging them for a fee-paying nonce

* fix nonce-related unit tests

* remove nonce hack from integration test

* support four tx states in svm integration

* advance nonce in check transactions

* fix tests for new interfaces

* remove last blockhash timing and tx result mutator

* change copy mut to proper accountshareddata function

* adddress feedback

* please clippy

* fix merge issues

* get lamports_per_signature from blockhash

* revert niche lps change

* fix merge issues again
* Introduce ledger-tool simulate-block-production

* Move counting code out of time-sensitive loop

* Avoid misleading ::clone() altogether

* Use while instead of loop+break

* Add comment of using BTreeMap

* Reduce simulation jitter due to mem deallocs

* Rename to CostTracker::new_from_parent_limits()

* Make ::load() take a slice

* Clean up retracer code a bit

* Add comment about BaningTracer even inside sim

* Remove redundant dcou dev-dependencies

* Apply suggestions from code review

Co-authored-by: Andrew Fitzgerald <[email protected]>

* Fix up and promote to doc comments

* Make warm-up code and doc simpler

* Further clean up timed_batches_to_send

* Fix wrong units...

* Replace new_with_dummy_keypair() with traits

* Tweak --no-block-cost-limits description

* Remove redundant dev-dependencies

* Use RwLock to mimic real ClusterInfo

* Fix typo

* Refactor too long BankingSimulator::start()

* Reduce indent

* Calculate required_duration in advance

* Use correct format specifier instead of cast

* Align formatting by using ::*

* Make envs overridable

* Add comment for SOLANA_VALIDATOR_EXIT_TIMEOUT

* Clarify comment a bit

* Fix typoss

* Fix typos

Co-authored-by: Andrew Fitzgerald <[email protected]>

* Use correct variant name: DeserializeError

* Remove SimulatorLoopLogger::new()

* Fix typos more

* Add explicit _batch in field names

* Avoid unneeded events: Vec<_> buffering

* Manually adjust logging code styles

* Align name: spawn_sender_loop/enter_simulator_loop

* Refactor by introducing {Sender,Simulator}Loop

* Fix out-of-sync sim due to timed preprocessing

* Fix too-early base_simulation_time creation

* Don't log confusing info! after leader slots

* Add justification comment of BroadcastStage

* Align timeout values

* Comment about snapshot_slot=50

* Don't squash all errors unconditionally

* Remove repetitive exitence check

* Promote no_block_cost_limits logging level

* Make ci/run-sanity.sh more robust

* Improve wordking of --enable-hash-overrides

* Remove marker-file based abortion mechanism

* Remove needless touch

---------

Co-authored-by: Andrew Fitzgerald <[email protected]>
* Add publish-docs.sh to build.sh

* Add debugging echos

* Fake being in CI

* Update vercel doc project names

* Remove debugging echos. Remove CI var.
)

* banking_stage: do not insert legacy vote ixs, refactor & unstaked

* pr feedback: use matches instead of separate fn
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.

8 participants