diff --git a/aggregator/aggregator.go b/aggregator/aggregator.go index ad7bbfb..8e4fd23 100644 --- a/aggregator/aggregator.go +++ b/aggregator/aggregator.go @@ -393,7 +393,7 @@ func (agg *Aggregator) sendAggregatedResponseToContract(ctx context.Context, tas tx, err := agg.multiProverContract.ConfirmState(agg.transactOpt, *task.state.Task.ToAbi(), nonSignerStakesAndSignature) if err != nil { - return logex.Trace(err) + return logex.Trace(bindings.MultiProverError(err)) } logex.Pretty(task.state.Task) logex.Infof("confirm state: %v", tx.Hash()) diff --git a/aggregator/blsagg.go b/aggregator/blsagg.go index d05eeae..93fe63d 100644 --- a/aggregator/blsagg.go +++ b/aggregator/blsagg.go @@ -274,7 +274,7 @@ func (a *BlsAggregatorService) singleTaskAggregatorGoroutineFunc( signersApkG2: bls.NewZeroG2Point().Add(operatorsAvsStateDict[signedTaskResponseDigest.OperatorId].Pubkeys.G2Pubkey), signersAggSigG1: signedTaskResponseDigest.BlsSignature, signersOperatorIdsSet: map[types.OperatorId]bool{signedTaskResponseDigest.OperatorId: true}, - signersTotalStakePerQuorum: operatorsAvsStateDict[signedTaskResponseDigest.OperatorId].StakePerQuorum, + signersTotalStakePerQuorum: cloneStakePerQuorumMap(operatorsAvsStateDict[signedTaskResponseDigest.OperatorId].StakePerQuorum), } } else { digestAggregatedOperators.signersAggSigG1.Add(signedTaskResponseDigest.BlsSignature) @@ -461,3 +461,11 @@ func checkIfStakeThresholdsMet( } return true } + +func cloneStakePerQuorumMap(stakes map[types.QuorumNum]types.StakeAmount) map[types.QuorumNum]types.StakeAmount { + out := make(map[types.QuorumNum]types.StakeAmount, len(stakes)) + for k, v := range stakes { + out[k] = new(big.Int).Set(v) + } + return out +} diff --git a/scripts/avs.sh b/scripts/avs.sh new file mode 100755 index 0000000..bd9988f --- /dev/null +++ b/scripts/avs.sh @@ -0,0 +1,11 @@ +#!/bin/bash -e + +. $(dirname $0)/env.sh + +function add_whitelist() { + MULTI_PROVER_SERVICE_MANAGER=$(_get_key $AVS_DEPLOY .multiProverServiceManager) \ + DEPLOY_KEY_SUFFIX=DEPLOY_KEY \ + _script script/Whitelist.s.sol --sig 'add(address)' $1 +} + +"$@" \ No newline at end of file diff --git a/scripts/env.sh b/scripts/env.sh index 0ddb53a..966a8f5 100755 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -53,7 +53,7 @@ echo "RPC_URL: $(_get_env RPC_URL)" echo "==============================================================" echo -AVS_DEPLOY=contracts/script/output/avs_deploy_output.json +AVS_DEPLOY=contracts/script/output/avs_deploy_$ENV.json TEE_DEPLOY=contracts/script/output/tee_deploy_output_$ENV.json EIGENLAYER_DEPLOY=contracts/script/output/eigenlayer_holesky_deploy.json PRIVATE_KEY=$(_get_env DEPLOY_KEY)