diff --git a/.github/workflows/beekeeper.yml b/.github/workflows/beekeeper.yml index c4dcef2884d..147d93648ff 100644 --- a/.github/workflows/beekeeper.yml +++ b/.github/workflows/beekeeper.yml @@ -11,7 +11,7 @@ env: K3S_VERSION: "v1.22.17+k3s1" REPLICA: 3 RUN_TYPE: "PR RUN" - SETUP_CONTRACT_IMAGE_TAG: "1.0.3" + SETUP_CONTRACT_IMAGE_TAG: "1.0.4" BEELOCAL_BRANCH: "main" BEEKEEPER_BRANCH: "master" BEEKEEPER_METRICS_ENABLED: false diff --git a/pkg/api/api_test.go b/pkg/api/api_test.go index 21e535f10ac..a31bb87ff5d 100644 --- a/pkg/api/api_test.go +++ b/pkg/api/api_test.go @@ -783,7 +783,7 @@ func (m *mockContract) Claim(context.Context, redistribution.ChunkInclusionProof return common.Hash{}, nil } -func (m *mockContract) Commit(context.Context, []byte, uint32) (common.Hash, error) { +func (m *mockContract) Commit(context.Context, []byte, uint64) (common.Hash, error) { m.mtx.Lock() defer m.mtx.Unlock() m.callsList = append(m.callsList, commitCall) diff --git a/pkg/storageincentives/agent.go b/pkg/storageincentives/agent.go index 51a62393a8c..2bd0bf0ffb4 100644 --- a/pkg/storageincentives/agent.go +++ b/pkg/storageincentives/agent.go @@ -510,7 +510,7 @@ func (a *Agent) commit(ctx context.Context, sample SampleData, round uint64) err return err } - txHash, err := a.contract.Commit(ctx, obfuscatedHash, uint32(round)) + txHash, err := a.contract.Commit(ctx, obfuscatedHash, round) if err != nil { a.metrics.ErrCommit.Inc() return err diff --git a/pkg/storageincentives/agent_test.go b/pkg/storageincentives/agent_test.go index 70ec3193975..fe5bc6a937f 100644 --- a/pkg/storageincentives/agent_test.go +++ b/pkg/storageincentives/agent_test.go @@ -283,7 +283,7 @@ func (m *mockContract) Claim(context.Context, redistribution.ChunkInclusionProof return common.Hash{}, nil } -func (m *mockContract) Commit(context.Context, []byte, uint32) (common.Hash, error) { +func (m *mockContract) Commit(context.Context, []byte, uint64) (common.Hash, error) { m.mtx.Lock() defer m.mtx.Unlock() m.callsList = append(m.callsList, commitCall) diff --git a/pkg/storageincentives/redistribution/redistribution.go b/pkg/storageincentives/redistribution/redistribution.go index 8b83537cf90..01ddb9195b0 100644 --- a/pkg/storageincentives/redistribution/redistribution.go +++ b/pkg/storageincentives/redistribution/redistribution.go @@ -24,7 +24,7 @@ type Contract interface { IsPlaying(context.Context, uint8) (bool, error) IsWinner(context.Context) (bool, error) Claim(context.Context, ChunkInclusionProofs) (common.Hash, error) - Commit(context.Context, []byte, uint32) (common.Hash, error) + Commit(context.Context, []byte, uint64) (common.Hash, error) Reveal(context.Context, uint8, []byte, []byte) (common.Hash, error) } @@ -115,7 +115,7 @@ func (c *contract) Claim(ctx context.Context, proofs ChunkInclusionProofs) (comm } // Commit submits the obfusHash hash by sending a transaction to the blockchain. -func (c *contract) Commit(ctx context.Context, obfusHash []byte, round uint32) (common.Hash, error) { +func (c *contract) Commit(ctx context.Context, obfusHash []byte, round uint64) (common.Hash, error) { callData, err := c.incentivesContractABI.Pack("commit", common.BytesToHash(obfusHash), common.BytesToHash(c.overlay.Bytes()), round) if err != nil { return common.Hash{}, err diff --git a/pkg/storageincentives/redistribution/redistribution_test.go b/pkg/storageincentives/redistribution/redistribution_test.go index 943d3013ba4..4a8e84b421b 100644 --- a/pkg/storageincentives/redistribution/redistribution_test.go +++ b/pkg/storageincentives/redistribution/redistribution_test.go @@ -267,7 +267,7 @@ func TestRedistribution(t *testing.T) { var obfus [32]byte testobfus := common.Hex2Bytes("hash") copy(obfus[:], testobfus) - expectedCallData, err := redistributionContractABI.Pack("commit", obfus, common.BytesToHash(owner.Bytes()), uint32(0)) + expectedCallData, err := redistributionContractABI.Pack("commit", obfus, common.BytesToHash(owner.Bytes()), uint64(0)) if err != nil { t.Fatal(err) } @@ -297,7 +297,7 @@ func TestRedistribution(t *testing.T) { redistributionContractABI, ) - _, err = contract.Commit(ctx, testobfus, uint32(0)) + _, err = contract.Commit(ctx, testobfus, 0) if err != nil { t.Fatal(err) } @@ -402,7 +402,7 @@ func TestRedistribution(t *testing.T) { t.Run("invalid call data", func(t *testing.T) { t.Parallel() - expectedCallData, err := redistributionContractABI.Pack("commit", common.BytesToHash(common.Hex2Bytes("some hash")), common.BytesToHash(common.Hex2Bytes("some address")), uint32(0)) + expectedCallData, err := redistributionContractABI.Pack("commit", common.BytesToHash(common.Hex2Bytes("some hash")), common.BytesToHash(common.Hex2Bytes("some address")), uint64(0)) if err != nil { t.Fatal(err) } @@ -424,7 +424,7 @@ func TestRedistribution(t *testing.T) { redistributionContractABI, ) - _, err = contract.Commit(ctx, common.Hex2Bytes("hash"), uint32(0)) + _, err = contract.Commit(ctx, common.Hex2Bytes("hash"), 0) if err == nil { t.Fatal("expected error") } diff --git a/pkg/transaction/transaction.go b/pkg/transaction/transaction.go index d16494ba7b6..e969a785c3d 100644 --- a/pkg/transaction/transaction.go +++ b/pkg/transaction/transaction.go @@ -601,7 +601,7 @@ func (t *transactionService) UnwrapABIError(ctx context.Context, req *TxRequest, if cErr == nil { return err } - err = fmt.Errorf("%w: %s", err, cErr) + err = fmt.Errorf("%w: %s", err, cErr) //nolint:errorlint var derr rpc.DataError if !errors.As(cErr, &derr) {