Skip to content

Commit

Permalink
* fix(constants.go): update ExecutionClientRPC, SettlementClientRPC, …
Browse files Browse the repository at this point in the history
…and DaClientRPC URLs

* fix(go.mod): add github.com/joho/godotenv as a required module
* fix(daCall.go): fix PreviousStateHash assignment to use daDecode.CurrentStateHash
* fix(verify.go): remove os.Exit(0) statement
  • Loading branch information
ComputerKeeda committed Jan 25, 2024
1 parent a46dad7 commit 1f2b447
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package common

const BatchSize = 25
const BlockDelay = 5
const ExecutionClientRPC = "http://localhost:8545/"
const SettlementClientRPC = "http://localhost:8080"
const ExecutionClientRPC = "http://192.168.1.25:8545/"
const SettlementClientRPC = "http://192.168.1.25:8080"
const KeyringDirectory = "./account/keys"
// var DaClientRPC = os.Getenv("DA_CLIENT_RPC")
const DaClientRPC = "http://localhost:5050/celestia"
const DaClientRPC = "http://192.168.1.25:5050/celestia"
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ require (
github.com/consensys/gnark v0.9.1
github.com/consensys/gnark-crypto v0.12.2-0.20231013160410-1f65e75b6dfb
github.com/ethereum/go-ethereum v1.13.5
github.com/joho/godotenv v1.5.1
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
)

Expand All @@ -29,7 +30,6 @@ require (
github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/holiman/uint256 v1.2.3 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion handlers/daCall.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func DaCall(transactions []string, ethClient *ethclient.Client, ctx context.Cont
DAKey: response.DaKeyHash,
DAClientName: "celestia",
BatchNumber: strconv.Itoa(batchNumber),
PreviousStateHash: daDecode.PreviousStateHash,
PreviousStateHash: daDecode.CurrentStateHash,
CurrentStateHash: currentStateHash,
}

Expand Down
2 changes: 0 additions & 2 deletions handlers/settlement-client/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/syndtr/goleveldb/leveldb"
"io"
"net/http"
"os"
"time"
)

Expand Down Expand Up @@ -64,7 +63,6 @@ func VerifyBatch(batchNumber int, proofByte []byte, ldda *leveldb.DB, lds *level
if batchNumber > 1 {
fmt.Println("batchDetails.PreviousStateHash", batchDetails.PreviousStateHash)
fmt.Println("batchDetails.CurrentStateHash", batchDetails.CurrentStateHash)
os.Exit(0)
}

postVerifyBatchStruct := VerifyBatchPostStruct{
Expand Down

0 comments on commit 1f2b447

Please sign in to comment.