Skip to content

Conversation

@joncinque
Copy link
Contributor

Problem

It's time to move over the SPL Slashing program implementation to its specific repo, but it hasn't been done.

Summary of changes

Following the PR for the token program at solana-program/token#12, I ran:

# add the remote for the source repo
git remote add spl https://github.com/solana-labs/solana-program-library.git
# fetch the master from spl under a different local branch
git fetch spl master:fromspl
git switch fromspl
# be safe, remove the remote
git remote rm spl
# filter the stake related files
python3 ../../git-filter-repo \
  --path slashing/program \
  --path-rename slashing/program:program \
  --force
# re-add this repo
git remote add origin [email protected]:joncinque/slashing.git
git fetch origin main
git switch main
git switch fromspl
git rebase main

NOTE: CI is not included yet

cc @AshwinSekar

AshwinSekar and others added 6 commits January 8, 2025 13:53
* slashing: add duplicate block proof verification

* pr feedback: use local record dep

* pr feedback: update to v2.1 crates

* pr feedback: rename errors for consistency

* pr feedback: do not log pubkey

* pass along workspace lints

* pr feedback: use zerocopy for instruction data

* add one epoch statue of limitations

* pr feedback: zerocopy from proof account to proof data struct

* Fix `proof_account_length` for the new size of a proof account

* pr feedback: revert Cargo.lock

* pr feedback: remove unecessary allow(dead_code)

* pr feedback: use SLOT - 1 and constants in test code

* pr feedback: return error if proof buffer is too small for shred1_length

* pr feedback: remove lifetime on shred reference in get_payload

* pr feedback: use rwlock in test rather than unsafe const modification

* pr feedback: use epoch schedule sysvar instead of hardcoding length

* Add Cargo.lock just for slashing crate
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.68 to 2.0.3.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.68...2.0.3)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.215 to 1.0.216.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.215...v1.0.216)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.20.0 to 1.21.0.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.20.0...v1.21.0)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.11.0 to 3.12.0.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](jonasbb/serde_with@v3.11.0...v3.12.0)

---
updated-dependencies:
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.216 to 1.0.217.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.216...v1.0.217)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@joncinque joncinque requested a review from febo January 8, 2025 12:56
@joncinque joncinque merged commit b972abf into solana-program:main Jan 8, 2025
@joncinque joncinque deleted the fromspl branch January 8, 2025 15:54
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