---
eip: 7766
label: ERC-7766
title: Signature Aggregation for ERC-4337
status: Withdrawn
type: Standards Track
category: ERC
created: 2024-09-01
requires: 4337, 7562
official: https://eips.ethereum.org/EIPS/eip-7766
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7766.md
canonical: https://eips.huatuo.xyz/ko/eip-7766/
lang: ko
tldr: 철회된 ERC-4337 확장. 스테이킹된 aggregator 컨트랙트가 번들 안의 여러 UserOperation에 대해 하나로 합쳐진 서명을 검증하게 하여 가스와 calldata를 아끼려는 제안이었다.
tags: [account-abstraction, signatures, bundlers, aggregation, withdrawn]
---

# ERC-7766: Signature Aggregation for ERC-4337

> An ERC-4337 improvement to aggregation of all UserOperation signatures in a bundle

**TL;DR:** 철회된 ERC-4337 확장. 스테이킹된 aggregator 컨트랙트가 번들 안의 여러 UserOperation에 대해 하나로 합쳐진 서명을 검증하게 하여 가스와 calldata를 아끼려는 제안이었다.

## 어떤 문제를 해결하나요?

[ERC-4337](/eip-4337/)에서는 각 `UserOperation`이 자기 서명을 가지고 있고, `EntryPoint`가 하나씩 따로 확인합니다. BLS 같은 방식에서는 많은 서명을 하나의 짧은 서명으로 합쳐 한 번만 확인할 수 있습니다. 이더리움에 게시하는 calldata가 비용의 큰 부분을 차지하는 롤업에서는 이것으로 많이 절약할 수 있습니다.

ERC-7766은 계정, bundler, `EntryPoint`가 이런 집계 서명을 쓰기 위해 어떻게 협력하는지를 설명했습니다.

## 어떻게 동작하나요?

- 새로운 주체인 **aggregator**는 계정이 자신을 대신해 서명을 확인해 주리라 신뢰하는 컨트랙트입니다. aggregator는 스테이킹되어야 하고, bundler는 자신이 지원하는 것들을 화이트리스트에 올립니다.
- 계정은 `validateUserOp`에서 aggregator의 주소를 반환함으로써(반환값의 `authorizer` 부분) 참여를 선택합니다.
- bundler가 오퍼레이션을 받아들일 때 aggregator의 `validateUserOpSignature(userOp)`를 호출합니다. 이 함수는 개별 서명을 확인하고 온체인에서 쓸 대체 값(대개 빈 값)을 반환합니다. bundler는 그 값으로 `validateUserOp`를 다시 실행해 결과가 달라지지 않는지 확인합니다. 스로틀링과 차단은 [ERC-7562](/eip-7562/) 규칙을 따릅니다.
- 번들을 만들 때 bundler는 오퍼레이션을 aggregator별로 묶고 `aggregateSignatures(userOps)`를 호출해 그룹당 서명 하나를 만듭니다.
- 온체인에서 `handleAggregatedOps`는 각 aggregator의 `validateSignatures(userOps, signature)`를 한 번씩 호출한 다음, 평소처럼 계정별 검증과 실행을 진행합니다. 하나의 번들에 여러 aggregator와 집계되지 않은 오퍼레이션을 섞을 수 있습니다.

## 샘플 코드

aggregator 인터페이스와 `EntryPoint`에 추가되는 진입점입니다. 스펙을 바탕으로 했습니다.

```solidity
// PackedUserOperation is the ERC-4337 v0.7 struct.
interface IAggregator {
    function validateUserOpSignature(PackedUserOperation calldata userOp)
        external view returns (bytes memory sigForUserOp);

    function aggregateSignatures(PackedUserOperation[] calldata userOps)
        external view returns (bytes memory aggregatedSignature);

    function validateSignatures(PackedUserOperation[] calldata userOps, bytes calldata signature)
        external view; // must revert if invalid
}

struct UserOpsPerAggregator {
    PackedUserOperation[] userOps;
    IAggregator aggregator;
    bytes signature;
}

// Added to the EntryPoint:
// function handleAggregatedOps(UserOpsPerAggregator[] calldata opsPerAggregator,
//                              address payable beneficiary);
```

계정의 aggregator를 지원하지 않는 bundler는 JSON-RPC 오류 코드 `-32506`으로 오퍼레이션을 거부합니다.

## 알아둘 점

- 상태는 **Withdrawn**입니다. 밝힌 이유는 오늘날의 계정 추상화 생태계에서 집계 가능한 서명 방식이 실제로 채택되지 않았다는 것입니다. 저자들은 네이티브 계정 추상화를 위해 별도의 접근을 계획하고 있습니다.
- 스펙은 이미 배포된 `EntryPoint`의 로드맵에 집계 훅이 들어 있었다고 밝히므로, 이는 호환성을 깨는 변경이 아니라 추가적인 설명이었습니다.
- aggregator는 이런 시스템에서 가장 신뢰받는 컨트랙트에 속합니다. 버그가 있거나 악의적인 aggregator는 이를 사용하는 모든 계정의 오퍼레이션을 승인하거나, 많은 오퍼레이션을 한꺼번에 무효로 만들 수 있습니다.
- 네이티브 계정 추상화 작업은 철회된 [EIP-7701](/eip-7701/)과 이를 대체한 [EIP-8141](/eip-8141/)을 참고하세요.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-7766
