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

refactor pkgs #14

Merged
merged 4 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion beacon_constants.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

const slotsPerHistoricalRoot = uint64(8192)

Expand Down
7 changes: 4 additions & 3 deletions main.go → cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"flag"

eigenpodproofs "github.com/Layr-Labs/eigenpod-proofs-generation"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)
Expand Down Expand Up @@ -42,13 +43,13 @@ func main() {
// Handling commands based on the 'command' flag
switch *command {
case "ValidatorFieldsProof":
GenerateValidatorFieldsProof(*oracleBlockHeaderFile, *stateFile, *validatorIndex, *chainID, *outputFile)
eigenpodproofs.GenerateValidatorFieldsProof(*oracleBlockHeaderFile, *stateFile, *validatorIndex, *chainID, *outputFile)

case "WithdrawalFieldsProof":
GenerateWithdrawalFieldsProof(*oracleBlockHeaderFile, *stateFile, *historicalSummaryStateFile, *blockHeaderFile, *blockBodyFile, *validatorIndex, *withdrawalIndex, *historicalSummariesIndex, *blockHeaderIndex, *chainID, *outputFile)
eigenpodproofs.GenerateWithdrawalFieldsProof(*oracleBlockHeaderFile, *stateFile, *historicalSummaryStateFile, *blockHeaderFile, *blockBodyFile, *validatorIndex, *withdrawalIndex, *historicalSummariesIndex, *blockHeaderIndex, *chainID, *outputFile)

case "BalanceUpdateProof":
GenerateBalanceUpdateProof(*oracleBlockHeaderFile, *stateFile, *validatorIndex, *chainID, *outputFile)
eigenpodproofs.GenerateBalanceUpdateProof(*oracleBlockHeaderFile, *stateFile, *validatorIndex, *chainID, *outputFile)

default:
log.Debug().Str("Unknown command:", *command)
Expand Down
2 changes: 1 addition & 1 deletion eigen_pod_proofs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion generate_balance_update_proof.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/hex"
Expand Down
2 changes: 1 addition & 1 deletion generate_validator_proof.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/hex"
Expand Down
2 changes: 1 addition & 1 deletion generate_withdrawal_fields_proof.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/hex"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/Layr-Labs/ProofGeneration
module github.com/Layr-Labs/eigenpod-proofs-generation

go 1.20

Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
Expand All @@ -55,7 +54,6 @@ github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A=
github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
Expand All @@ -74,8 +72,6 @@ golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down
2 changes: 1 addition & 1 deletion merkle_util_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/binary"
Expand Down
2 changes: 1 addition & 1 deletion merkle_utils.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

//Adapted from https://github.com/ferranbt/fastssz/blob/main/tree.go
import (
Expand Down
2 changes: 1 addition & 1 deletion proof_utils.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/hex"
Expand Down
2 changes: 1 addition & 1 deletion proofs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion prove_validator.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"math/big"
Expand Down
2 changes: 1 addition & 1 deletion prove_withdrawal.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion utils.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package eigenpodproofs

import (
"encoding/json"
Expand Down
Loading