Skip to content

Conversation

@febo
Copy link
Contributor

@febo febo commented Nov 12, 2024

Problem

PR #12 was "squashed & merged", which does not preserve the history.

Solution

This PR re-adds the files so they can be "rebased & merged" instead. PR #15 reverted #12.

mvines and others added 30 commits November 1, 2024 12:01
* Move stake state / instructions into solana_program

* Update account-decoder

* Update cli and runtime

* Update all other parts

* Commit Cargo.lock changes in programs/bpf

* Update cli stake instruction import

* Allow integer arithmetic

* Update ABI digest

* Bump rust mem instruction count

* Remove useless structs

* Move stake::id() -> stake::program::id()

* Re-export from solana_sdk and mark deprecated

* Address feedback

* Run cargo fmt
* Fix link target in doc comment

* Fix formatting of log examples in process_instruction

* Fix doc markdown in solana-gossip

* Fix doc markdown in solana-runtime

* Escape square braces in doc comments to avoid warnings

* Surround 'account references' doc items in code spans to avoid warnings

* Fix code block in loader_upgradeable_instruction

* Fix doctest for loader_upgradable_instruction
* stake: Remove v2 program references

* Remove stake v2 feature, along with stake rewrite
…#20392)

* Add struct and convenience methods to track stake activation status

* fix nits

* rename
rustfmt.toml configuration:
  imports_granularity = "One"
  group_imports = "One"
…128)

* And short descriptions to all solana-program modules and macros.

Also fill out some of the docs within these modules.

* Update sdk/program/src/lib.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/sanitize.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/pubkey.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/program_memory.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/program_memory.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/program_memory.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/program_memory.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/program_memory.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update hash module docs

* Make solana-program crate docs match Pubkey docs

* Update sdk/program/src/program_memory.rs

Co-authored-by: Tyera Eulberg <[email protected]>
* Upgrade to Rust v1.63.0

* Add nightly_clippy_allows

* Resolve some new clippy nightly lints

* Increase QUIC packets completion timeout

Co-authored-by: Michael Vines <[email protected]>
This reverts commit f48ca035dbc3aa82ef42e100b97fffbe72015ac4.
* Upgrade to Rust v1.63.0

* Add nightly_clippy_allows

* Resolve some new clippy nightly lints

* Increase QUIC packets completion timeout

* Update quinn-udp crate

Co-authored-by: Michael Vines <[email protected]>
* Bump borsh to 0.10.3

transaction-status relies on SPL which still requires borsh 0.9, so
until SPL also gets updated that package alone will use an older version of
borsh.

* ci: Temporarily disable spl and openbook-dex builds
joncinque and others added 26 commits November 1, 2024 12:01
* stake: pub use config constants for api backwards compatibility

* Add deprecate

Co-authored-by: Trent Nelson <[email protected]>

---------

Co-authored-by: Trent Nelson <[email protected]>
* allow pedantic invalid cast lint

* allow lint with false-positive triggered by `test-case` crate

* nightly `fmt` correction

* adapt to rust layout changes

* remove dubious test

* Use transmute instead of pointer cast and de/ref when check_aligned is false.

* Renames clippy::integer_arithmetic to clippy::arithmetic_side_effects.

* bump rust nightly to 2023-08-25

* Upgrades Rust to 1.72.0

---------

Co-authored-by: Trent Nelson <[email protected]>
…2606)

* fix stake deactivation in the same epoch after redelegation bug

add tests

refactor common code into fn

avoid early return

add feature gate for the new stake redelegate behavior

move stake tests out of cli

add stake-program-test crate

reimplemnt stake test with program-test

remove stake-program-test crate

reviews

add setup.rs

remove clippy

reveiws

* reviews

* review comments

---------

Co-authored-by: HaoranYi <[email protected]>
* sdk: Update to borsh 1, revert borsh 0.9 / 0.10

* Restore borsh 0.10 and 0.9 support

* Update sbf lockfile

* Add borsh 0.10 implementations for stake types

* Fix weirdness on whitespace

* Update to borsh 1.2.1

* Update changelog

* compute-budget: Move `pack` under dev-context-only-utils

* Revert test to use HashMap

* transaction-status: Add comment about borsh version
refactor: optional stake_history arg is never none
* feat: updated readme

* fix: updated links

* fix: proposal links

* fix: more links

* fix: json-rpc links

* fix: more links

* fix: zk links

* fix: managing forks

* fix: links for deprecated methods
* ff cleanup: reduce_stake_warmup_cooldown

* update instruction comments to indicate stake config is unused
* Add new StakeError variant

* Add closure to return error if EpochRewards::active

* Use error_during_epoch_rewards for Instructions that mutate stake accounts

* Use try instead of manually matching Ok/Err

* Consolidate error_during_epoch_rewards check

* Add new test helper

* Add test demonstrating which ix return StakeError::EpochRewardsActive

* Remove single-use fn
* make frozen-abi optional in solana-program

* fix syntax error

* activate solana-program's frozen-abi feature in dev deps of program and sdk

* undo putting solana-program itself in solana-program dev deps

* add missing whitespace

Co-authored-by: Tyera <[email protected]>

---------

Co-authored-by: Tyera <[email protected]>
clippy: legacy_numeric_constants
implement ProgramError conversion for StakeError
* make borsh optional in sdk and program

* fmt

* don't include borsh in dev-context-only-utils
implement two new instructions for moving delegated stake and undelegated lamports, respectively, between accounts with the same Authorized and Lockup using the Staker authority
* extract decode-error crate

* update decode_error dependents and re-export in sdk and program

* fmt

* fix bad import after rebase
* stake: Remove redelegate code and tests

* Mark stake flags as deprecated

* Remove usage of feature gate

* Add a changelog entry for the removal

* Remove repeated #[allow(deprecated)]s

* Re-add "redelegate-stake" command

* Remove feature

* Make CI happy -> `hidden_unless_forced()`
* fix: remove expensive versioned epoch stakes clone

* Add custom partialeq impl for dcou
* improve type safety in stake state module

* feedback

* fix new method
* extract clock crate

* update clock usage in solana-program

* fmt

* fmt after rebase

* update lock file after rebase

* fmt after rebase

* fmt after rebase

* fmt

* make serde optional in solana-clock

* fix description

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

* fix docs link

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

* fix accidental deletions from workspace members table

---------

Co-authored-by: Jon C <[email protected]>
@febo febo requested a review from joncinque November 12, 2024 12:07
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks good! For reference, the PR that was landed and reverted is #12, not #10

@febo febo merged commit 08122b3 into solana-program:master Nov 12, 2024
@febo febo deleted the stake-from-agave branch November 12, 2024 12:24
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.