Skip to content

Add new DomainType for application usage. - #2882

Closed
ralexstokes wants to merge 1 commit into
ethereum:devfrom
ralexstokes:add-application-domain-type
Closed

Add new DomainType for application usage.#2882
ralexstokes wants to merge 1 commit into
ethereum:devfrom
ralexstokes:add-application-domain-type

Conversation

@ralexstokes

Copy link
Copy Markdown
Member

This PR adds a new DomainType for use by applications adjacent to the core protocol so they can leverage the signing machinery developed here when working with consensus types.

This PR only adds a single domain and expects applications using the domain type to mix in further unique tags for domain separation; otherwise they risk signature collisions.

def compute_domain_for_application(application_domain: SomeBytesType):
    protocol_domain = compute_domain(DOMAIN_APPLICATION) # adjust other args as required...
    return Domain(hash(application_domain + protocol_domain))

An example use case is the work-in-progress Builder API where a validator may want to outsource block construction to a network of builders external to their local execution client. See ethereum/execution-apis#209 for details.

@ralexstokes
ralexstokes requested a review from djrtwo April 28, 2022 13:24
@ralexstokes

Copy link
Copy Markdown
Member Author

@djrtwo, @lightclient, @metachris

@djrtwo

djrtwo commented Apr 29, 2022

Copy link
Copy Markdown
Contributor

I'm okay with either this or setting a high bit to give applications a large space to avoid any accidental signing.
Problem with that is that then you need to have applications be abl to register these somewhere to avoid picking the same values...

@ralexstokes

ralexstokes commented May 3, 2022

Copy link
Copy Markdown
Member Author

closing in lieu of #2884.

@ralexstokes ralexstokes closed this May 3, 2022
@ralexstokes
ralexstokes deleted the add-application-domain-type branch May 3, 2022 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants