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

[1.0.0] SLASHING #162

Merged
merged 38 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
eb706a6
fix CLI for slashing
jbrower95 Dec 16, 2024
4d8aeff
save
jbrower95 Dec 16, 2024
81a6f05
save
jbrower95 Dec 16, 2024
639ff0f
fix complete
jbrower95 Dec 16, 2024
0f0c406
fix find-stale-pods
jbrower95 Dec 17, 2024
05ab85a
change to GetWithdrawableShares
jbrower95 Dec 17, 2024
82fba93
use beacon strategy
jbrower95 Dec 17, 2024
d692923
check != to null address
jbrower95 Dec 17, 2024
736ba36
Merge pull request #160 from Layr-Labs/jb/fix-cli-slashing
jbrower95 Dec 17, 2024
972ac7f
fix: handle the pending checkpoint case
gpsanant Dec 17, 2024
6697b27
Merge pull request #161 from Layr-Labs/gpsanant/fix-pending-checkpoin…
jbrower95 Dec 17, 2024
9223cd2
save stubs
jbrower95 Dec 17, 2024
ab15d5d
save
jbrower95 Dec 17, 2024
5922718
blocked on queued withdrawal helper
jbrower95 Dec 17, 2024
b23d4a3
save
jbrower95 Dec 17, 2024
6a3eb67
rm unnecessary args
jbrower95 Dec 17, 2024
9a1ff01
Fix lint
jbrower95 Dec 17, 2024
fccb46e
finish initial impl, just missing PrepareAccount calls
jbrower95 Dec 18, 2024
7ae70fb
build and lint
jbrower95 Dec 18, 2024
614f53c
add more docs
jbrower95 Dec 18, 2024
f5b1b2a
fix isExecutable
jbrower95 Dec 18, 2024
d4a32f9
early return with no afforded or none at all
jbrower95 Dec 18, 2024
6e7c30d
add --amountWei field
jbrower95 Dec 18, 2024
795d6c6
push
jbrower95 Dec 18, 2024
94ce18d
update pipeline
jbrower95 Dec 18, 2024
6ded515
Rename pipeline
jbrower95 Dec 18, 2024
5b12211
fix
jbrower95 Dec 18, 2024
195663a
cap withdrawals taking into account in-flight withdrawals
jbrower95 Dec 18, 2024
46a0174
fix affordability calc
jbrower95 Dec 18, 2024
2ce1119
fix typo
jbrower95 Dec 18, 2024
e271029
fix: cleanup show withdrawals
gpsanant Dec 18, 2024
d2a8aa6
save queueWithdrawal
jbrower95 Dec 18, 2024
45f86ba
Merge branch 'jb/withdrawals' of github.com:Layr-Labs/eigenpod-proofs…
jbrower95 Dec 18, 2024
f78a8eb
chore: logs
gpsanant Dec 18, 2024
ec66f13
fix complete all withdrawals
jbrower95 Dec 18, 2024
ac02b41
fix: make queuing work?
gpsanant Dec 18, 2024
7fe165d
fully tested
jbrower95 Dec 18, 2024
e7cc883
Merge pull request #163 from Layr-Labs/jb/withdrawals
jbrower95 Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions .github/workflows/cli_release.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/go_test.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/lint.yml

This file was deleted.

97 changes: 97 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# .github/workflows/release.yml
name: Build, test, release

on:
pull_request:
push:
# run only against tags
tags:
- "*"

permissions:
contents: write

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go 1.22
uses: actions/setup-go@v1
env:
GOPATH: /home/runner/.go
with:
go-version: 1.22.4

- name: Install dependencies
env:
GOPATH: /home/runner/.go
run: |
mkdir /home/runner/.go
make setup
go env
ls -lar $GOPATH

- name: Run Lint
env:
GOPATH: /home/runner/.go
run: /home/runner/.go/bin/golangci-lint run ./cli
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Install dependencies
run: |
go mod download
sudo apt-get install -y unzip

- name: Download blockchain data
run: |
curl -o data/deneb_holesky_beacon_state_2227472.ssz.zip https://dviu8zszosyat.cloudfront.net/deneb_holesky_beacon_state_2227472.ssz.zip
(cd data && unzip deneb_holesky_beacon_state_2227472.ssz.zip)

- name: Run tests
run: |
go test -v ./...
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Run GoReleaser (tagged release)
uses: goreleaser/goreleaser-action@v6
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
workdir: cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser (branch)
uses: goreleaser/goreleaser-action@v6
if: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') }}
with:
distribution: goreleaser
version: "~> v2"
args: release --snapshot
workdir: cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 2 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ linters-settings:
- performance
- style
govet:
check-shadowing: true
shadow: true
enable:
- fieldalignment
nolintlint:
Expand All @@ -26,12 +26,11 @@ linters:
- dogsled
- dupl
- errcheck
- exportloopref
- copyloopvar
- exhaustive
- goconst
- gocritic
- gofmt
- gomnd
- gocyclo
- gosec
- gosimple
Expand Down
4 changes: 2 additions & 2 deletions cli/commands/assignSubmitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"fmt"

"github.com/Layr-Labs/eigenlayer-contracts/pkg/bindings/EigenPod"
"github.com/Layr-Labs/eigenpod-proofs-generation/cli/core"
"github.com/Layr-Labs/eigenpod-proofs-generation/cli/core/onchain"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/fatih/color"
Expand Down Expand Up @@ -44,7 +44,7 @@ func AssignSubmitterCommand(args TAssignSubmitterArgs) error {
return fmt.Errorf("failed to parse --sender: %w", err)
}

pod, err := onchain.NewEigenPod(common.HexToAddress(args.EigenpodAddress), eth)
pod, err := EigenPod.NewEigenPod(common.HexToAddress(args.EigenpodAddress), eth)
if err != nil {
return fmt.Errorf("error contacting eigenpod: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions cli/commands/checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package commands
import (
"context"

"github.com/Layr-Labs/eigenlayer-contracts/pkg/bindings/EigenPod"
"github.com/Layr-Labs/eigenpod-proofs-generation/cli/core"
"github.com/Layr-Labs/eigenpod-proofs-generation/cli/core/onchain"
"github.com/Layr-Labs/eigenpod-proofs-generation/cli/utils"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
Expand Down Expand Up @@ -42,7 +42,7 @@ func CheckpointCommand(args TCheckpointCommandArgs) error {
currentCheckpoint, err := core.GetCurrentCheckpoint(args.EigenpodAddress, eth)
core.PanicOnError("failed to load checkpoint", err)

eigenpod, err := onchain.NewEigenPod(common.HexToAddress(args.EigenpodAddress), eth)
eigenpod, err := EigenPod.NewEigenPod(common.HexToAddress(args.EigenpodAddress), eth)
core.PanicOnError("failed to connect to eigenpod", err)

if currentCheckpoint == 0 {
Expand Down
Loading
Loading