Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new DomainType for application usage. #2882

Closed

Conversation

ralexstokes
Copy link
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
Member Author

@djrtwo, @lightclient, @metachris

@djrtwo
Copy link
Contributor

djrtwo commented Apr 29, 2022

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
Copy link
Member Author

ralexstokes commented May 3, 2022

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.

None yet

2 participants