From 7b821b7c8756a4d9f8e88ab93f2fe46ef1ff3667 Mon Sep 17 00:00:00 2001 From: Kartik Chopra Date: Tue, 10 Dec 2024 08:45:08 -0500 Subject: [PATCH] chore: fix e2e test --- contracts/contracts/core/ProviderRegistry.sol | 2 -- p2p/pkg/rpc/provider/service_test.go | 2 +- testing/pkg/tests/staking/staking.go | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/contracts/contracts/core/ProviderRegistry.sol b/contracts/contracts/core/ProviderRegistry.sol index 1e1143a47..bfc2de042 100644 --- a/contracts/contracts/core/ProviderRegistry.sol +++ b/contracts/contracts/core/ProviderRegistry.sol @@ -305,8 +305,6 @@ contract ProviderRegistry is return penaltyFeeTracker.accumulatedAmount; } - - /** * @dev Register and stake function for providers. * The validity of this key must be verified manually off-chain. diff --git a/p2p/pkg/rpc/provider/service_test.go b/p2p/pkg/rpc/provider/service_test.go index e71d70d46..b966bda9c 100644 --- a/p2p/pkg/rpc/provider/service_test.go +++ b/p2p/pkg/rpc/provider/service_test.go @@ -500,7 +500,7 @@ func TestBLSKeys(t *testing.T) { pubKey := blsPrivKey.PublicKey() // Keccak the value 0x53c61cfb8128ad59244e8c1d26109252ace23d14 - value := common.Hex2Bytes("53c61cfb8128ad59244e8c1d26109252ace23d14") + value := common.Hex2Bytes("328809Bc894f92807417D2dAD6b7C998c1aFdac6") hash := crypto.Keccak256Hash(value) t.Logf("Keccak hash: %s", hash.Hex()) diff --git a/testing/pkg/tests/staking/staking.go b/testing/pkg/tests/staking/staking.go index f6acab3e1..71c575b5a 100644 --- a/testing/pkg/tests/staking/staking.go +++ b/testing/pkg/tests/staking/staking.go @@ -10,6 +10,7 @@ import ( "math/big" "net/http" "slices" + "strings" "github.com/cloudflare/circl/sign/bls" "github.com/ethereum/go-ethereum/common" @@ -104,7 +105,7 @@ func Run(ctx context.Context, cluster orchestrator.Orchestrator, cfg any) error blsPrivKey, _ := bls.KeyGen[bls.G1](iv, []byte{}, []byte{}) pubKey := blsPrivKey.PublicKey() pubKeyBytes, _ := pubKey.MarshalBinary() - value := common.Hex2Bytes(p.EthAddress()) + value := common.Hex2Bytes(strings.TrimPrefix(p.EthAddress(), "0x")) hash := crypto.Keccak256Hash(value) signature := bls.Sign(blsPrivKey, hash.Bytes())