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

feat: upgrade to v2.0.2 #3

Merged
merged 121 commits into from
Jul 17, 2024
Merged

feat: upgrade to v2.0.2 #3

merged 121 commits into from
Jul 17, 2024

Conversation

neutrinoks
Copy link

Problem

Our Agave fork got outdated and needed to be upgraded.

Summary of Changes

Rebased commit at tag v2.0.2 into our existing feat/risc0 branch with changes to work in Sovereign.

@neutrinoks neutrinoks self-assigned this Jul 17, 2024
@neutrinoks neutrinoks changed the title Feat/upgrade to v2.0.2 feat: upgrade to v2.0.2 Jul 17, 2024
godmodegalactus and others added 27 commits July 17, 2024 11:33
get rid of const in tests

Co-authored-by: HaoranYi <haoran.yi@solana.com>
* rpc: add tpu_forwards/tpu_forwards_quic to getClusterNodes

* add tvu

* order

* add tpu_vote

* add serve_repair

* fix tests

* fix name in tests

* remove tvu / repair quic
* remove unused build dep `cc` from solana-program

* remove cc from workspace
* Remove redundant Option return type from accountinfo_from_shared_account_data

* Remove redundant Option return type from accountinfo_from_stored_account_meta
There are a handful of commands that specify AccountsDb config. To
create consistency between all these commands and remove repeated code,
build all of the arguments in a helper function that is passed to the
relevant commands.
…s for partitions (anza-xyz#1769)

Simplify assertion that epoch contains enough slots for partitions
…a-xyz#1758)

* docs: update ZK Token Proof program to ZK ElGamal Proof program

* remove blank line at eof
* local program cache: add `modified_entries` field

* use `modified_entries` for modified program cache

* invoke context: make `program_cache_for_tx_batch` mutable

* invoke context: unify local program cache instances

* remove `find_program_in_cache` alias
* Add num_partitions field to Rewards proto definition

* Add type to hold rewards plus num_partitions

* Add Bank method to get rewards plus num_partitions for recording

* Update Blockstore::write_rewards to use num_partitions

* Update RewardsRecorderService to handle num_partitions

* Populate num_partitions in ReplayStage::record_rewards

* Write num_partitions to Bigtable

* Reword KeyedRewardsAndNumPartitions method

* Clone immediately

* Determine epoch boundary by checking parent epoch

* Rename UiConfirmedBlock field

* nit: fix comment typo

* Add test_get_rewards_and_partitions

* Add pre-activation test

* Add should_record unit test
)

* send actual gossip ip:port when running solana-gossip rpc-url

* refactor gossip_addr out from spy and rpc methods
* add `zk-elgamal-proof-program-enabled` feature gate

* reserve account for zk elgamal proof program

* add zk elgamal proof as builtin program

* cargo lock

* cargo sort

* replace feature gate key to start with `zk..`

* add simd number

* update `elgamal_program` to `zk_elgamal_proof_program`
There are several arguments to control snapshot configuration in the
various ledger-tool commands. The inclusion of args in each command
is inconsistent, especially for commands outside of main.rs

This change consolidates the snapshot related arguments into a single
function to help create consistency and reduce duplicate code
…z#1673)

AccountsBackgroundService performs several operations that can take a
long time to complete and do not check the exit flag mid-operation.
Thus, ledger-tool can get hung up for a while waiting for ABS to
finish. However, many ledger-tool command do not ABS to have finished.

So, return a handle to the ABS thread and allow the caller to decide
whether to join ABS or not. As of right now, create-snapshot is the
only command that requires ABS to have finished before continuing.
* extract curve25519 crate

* remove obsolete comment

* fix Cargo.toml files

* fix imports

* update lock file

* remove unused deps from zk-token-sdk

* fmt

* add solana-curve25519 patch

* add missing override to programs/sbf/Cargo.toml

* copy over an allow()

* move new crate to curves dir

* use workspace version

* add back missing dev dep

* add missing dependencies to programs/sbf

* fmt

* move dep to the correct dependency table

* remove #[cfg(not(target_os = "solana"))] above errors mod
mergify bot and others added 26 commits July 17, 2024 11:51
…#1953) (anza-xyz#1962)

Remove deprecated symbols from solana-sdk (anza-xyz#1953)

* Remove deprecated Account methods

* Remove deprecated info macro

* Remove deprecated Signature method

* Remove deprecated native_loader method

* Remove deprecated transaction method (deprecated in v1.9)

* Remove deprecated entrypoint definitions

* Remove deprecated program_stubs macro

(cherry picked from commit e2643f3)

Co-authored-by: Tyera <tyera@anza.xyz>
… methods (backport of anza-xyz#1956) (anza-xyz#1963)

Remove deprecated BanksClient methods and dependent ProgramTest methods (anza-xyz#1956)

* Remove deprecated Banks client/interface methods

* Remove dependent deprecated program-test methods

(cherry picked from commit 6e4e82e)

Co-authored-by: Tyera <tyera@anza.xyz>
…a-xyz#1955) (anza-xyz#1978)

Remove deprecated spl-token conversion methods (anza-xyz#1955)

(cherry picked from commit 58027a3)

Co-authored-by: Tyera <tyera@anza.xyz>
…-xyz#1958) (anza-xyz#1977)

Remove deprecated symbols from solana-program (anza-xyz#1958)

* Remove SLOT_MS

* Remove deprecated Pubkey methods

* Remove deprecated info! macro

* Delete deprecated and dangling borsh 0.9 module

* Remove deprecated UpgradeableLoaderState methods

* Remove FeeCalculator deprecated method

* Remove deprecated Instruction ctor

* Remove deprecated legacy-message methods (deprecated in v1.9)

(cherry picked from commit 2f85940)

Co-authored-by: Tyera <tyera@anza.xyz>
…-xyz#1959) (anza-xyz#1979)

* Handle deprecated Instructions sysvar methods (anza-xyz#1959)

* Remove deprecated legacy-message methods (deprecated in v1.9)

* Unpub deprecated method load_current_index; dedupe

* Unpub deprecated method load_instruction_at; dedupe

* Remove allow(deprecated) tags

* Make load_instruction_at available to benches

(cherry picked from commit adb9d9e)

# Conflicts:
#	sdk/program/Cargo.toml
#	sdk/program/src/sysvar/instructions.rs

* Fix conflicts

---------

Co-authored-by: Tyera <tyera@anza.xyz>
…ort of anza-xyz#1972) (anza-xyz#1990)

* Remove deprecated address_lookup_table_account re-export (anza-xyz#1972)

* Remove deprecated re-export

* Remove deprecated stuff from example_mocks

* Remove deprecated programs/alt re-export

(cherry picked from commit f681fe8)

# Conflicts:
#	sdk/program/src/lib.rs

* Fix conflict

---------

Co-authored-by: Tyera <tyera@anza.xyz>
…yz#1980) (anza-xyz#1988)

Remove deprecated, unused methods from Bank (anza-xyz#1980)

Remove deprecated methods from Bank (not in use)

(cherry picked from commit 0313047)

Co-authored-by: Tyera <tyera@anza.xyz>
* Refactor cost tracking (anza-xyz#1954)

* Refactor and additional metrics for cost tracking (anza-xyz#1888)

* Refactor and add metrics:
- Combine remove_* and update_* functions to reduce locking on cost-tracker and iteration.
- Add method to calculate executed transaction cost by directly using actual execution cost and loaded accounts size;
- Wireup histogram to report loaded accounts size;
- Report time of block limits checking;
- Move account counters from ExecuteDetailsTimings to ExecuteAccountsDetails;

* Move committed transactions adjustment into its own function

* remove histogram for loaded accounts size due to performance impact

(cherry picked from commit f8630a3)

* rename cost_tracker.account_data_size to better describe its purpose is to tracker per-block new account allocation

---------

Co-authored-by: Tao Zhu <82401714+tao-stones@users.noreply.github.com>
Co-authored-by: Tao Zhu <tao@solana.com>
…-xyz#2001)

Bump ThinClient since version (anza-xyz#1991)

(cherry picked from commit 1063be7)

Co-authored-by: Tyera <tyera@anza.xyz>
… (anza-xyz#2000)

Add suggestion to deprecation message (anza-xyz#1993)

(cherry picked from commit c848645)

Co-authored-by: Tyera <tyera@anza.xyz>
…nza-xyz#2002)

* Remove assorted deprecated symbols (anza-xyz#1995)

* Remove deprecated method from program-test

* Remove deprecated programs stuff from TestValidator

* Remove deprecated method from TestValidator (deprecated in v1.11.0)

* Remove deprecated re-export from cluster_info

(cherry picked from commit efdbdc0)

# Conflicts:
#	gossip/src/cluster_info.rs

* Fix conflict

---------

Co-authored-by: Tyera <tyera@anza.xyz>
…za-xyz#1964) (anza-xyz#1994)

Use node's latest vote for commitment calc. too (anza-xyz#1964)

* Use node's latest vote for commitment calc. too

* Make local_cluster test use finalized

* Update core/src/commitment_service.rs

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

* Don't wrap with Option and update tests

---------

Co-authored-by: Tyera Eulberg <tyera@anza.xyz>
Co-authored-by: Tyera <teulberg@gmail.com>
(cherry picked from commit 5562989)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
…z#1903) (anza-xyz#1989)

Remove deprecated CommitmentLevel variants (anza-xyz#1903)

* Remove deprecated CommitmentLevel variants and CommitmentConfig methods

* Remove deprecated variants from BlockCommitmentCache usage

* Remove deprecated variants from rpc

* Remove maybe_map_commitment from RpcClient

(cherry picked from commit 2e3c2c7)

Co-authored-by: Tyera <tyera@anza.xyz>
…port of anza-xyz#2004) (anza-xyz#2009)

Remove deprecated symbols from recent_blockhashes_account (anza-xyz#2004)

* Move recent_blockhashes_account to runtime

* Fixup imports

* Reduce pub

* Remove unused method

* Duplicate code to limit pub and dependency complexity

* Move test-only fn into tests module

(cherry picked from commit f77658b)

Co-authored-by: Tyera <tyera@anza.xyz>
…anza-xyz#2008)

Remove rpc methods from mock sender (anza-xyz#1996)

Remove deleted RPC methods from mock_sender

(cherry picked from commit 27988e7)

Co-authored-by: Tyera <tyera@anza.xyz>
…2005) (anza-xyz#2013)

Deprecate RpcRequest::GetStakeActivation (anza-xyz#2005)

* Correct deprecation note

* Deprecate rpc-client-api request

(cherry picked from commit 0deb6fb)

Co-authored-by: Tyera <tyera@anza.xyz>
…) (backport of anza-xyz#1992) (anza-xyz#2041)

Remove deprecated symbols from solana-client (mostly re-exports) (anza-xyz#1992)

* Remove usage of deprecated re-export from SendTransactionService

* Remove usage of deprecated re-export from core

* Remove usage of deprecated re-export from solana-dos

* Remove deprecated ConnectionCache methods

* Remove deprecated udp_client re-export

* Remove deprecated tpu_connection re-export

* Remove deprecated quic_client re-export

(cherry picked from commit 3cd7621)

Co-authored-by: Tyera <tyera@anza.xyz>
…nza-xyz#2006) (anza-xyz#2042)

Update changlog re: removal of deprecated symbols (anza-xyz#2006)

* Format SDK changes as bulleted list, and make deprecation removal generic

* Add changelog line for solana-program

* Add line for solana-client

* Update CHANGELOG.md

(cherry picked from commit b61ce73)

Co-authored-by: Tyera <tyera@anza.xyz>
anza-xyz#2043)

Clean up disable_fees_sysvar feature (anza-xyz#2003)

* Clean up disable_fees_sysvar

* Remove bank fees test

* Remove unused rpc response types

* Fixup sysvar_cache tests

* Remove fees-sysvar from bootstrap_validator_stake_lamports; no longer included

* Update account counts, since fees no longer touched

* Update bank hashes in test, since fees sysvar is not populated

* Remove test case passing fees sysvar as account

(cherry picked from commit 1c34908)

Co-authored-by: Tyera <tyera@anza.xyz>
…nza-xyz#2036) (anza-xyz#2044)

Remove get_stake_activation methods from RpcClient (anza-xyz#2036)

* Remove dangling JsonRpcRequestProcessor method

* Remove get_stake_activation methods from RpcClient

* Remove getStakeActivation from mock_sender

* Remove unused rpc response type

(cherry picked from commit 3079181)

Co-authored-by: Tyera <tyera@anza.xyz>
…xyz#2061)

Update install docs to agave (anza-xyz#2060)

* s/SOLANA/AGAVE

* s/solana.com/anza.xyz

(cherry picked from commit b1bb9ff)

Co-authored-by: Tyera <tyera@anza.xyz>
…nza-xyz#2063)

Removes unused deprecated cli args (anza-xyz#2058)

(cherry picked from commit 05134be)

Co-authored-by: Brooks <brooks@anza.xyz>
…a-xyz#2045) (anza-xyz#2052)

Remove rpc- and pubsub-client version querying (anza-xyz#2045)

* Remove filter mapping

* Remove unused internal module

* Remove unused pubsub-client stuff

* Remove unused RpcClient encoding maping, node_version

(cherry picked from commit 69d2eb8)

Co-authored-by: Tyera <tyera@anza.xyz>
) (anza-xyz#2069)

Remove deprecated Memcmp filter symbols (anza-xyz#2050)

* Add test to demonstrate serialization and acceptable json inputs

* Remove custom serialization

* Unpub deprecated fields

* Remove deprecated, unused field

* Remove deprecated MemcmpEncodedBytes variant

* Remove deprecated error variants

* Add back custom deserialization to support missing 'encoding' field

* Update tests to demonstrate consistency and changes

* Add helper fns to use in rpc spl-token filter checks

* Update base64 syntax and remove allow-deprecated

(cherry picked from commit 3b3ffbb)

Co-authored-by: Tyera <tyera@anza.xyz>
Copy link

@DudessaPr DudessaPr left a comment

Choose a reason for hiding this comment

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

lgtm 🌟

@neutrinoks neutrinoks merged commit 72528b5 into feat/risc0 Jul 17, 2024
1 check passed
@neutrinoks neutrinoks deleted the feat/upgrade-to-v2.0.2 branch July 17, 2024 08:47
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.