Page MenuHomePhabricator

[avalanche] Build a stripped delegation to remove unnecessary levels
AbandonedPublic

Authored by Fabien on Tue, Mar 30, 14:18.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Summary

When importing an existing delegation, allow to only keep the delegation
levels up the given public key.

The session key is expected to match the last level of the delegation, so only this last level is checked which is good for performance reason.
This diff will make it possible to pass a delegation to a node (feature to be added) where the delegation contains the session pubkey but is not the last level.
This makes it possible to build upfront a single delegation for several nodes without having to do a 1:1 match.

Test Plan
ninja all check-all

Diff Detail

Event Timeline

Fabien requested review of this revision.Tue, Mar 30, 14:18
deadalnix requested changes to this revision.Tue, Mar 30, 15:06
deadalnix added a subscriber: deadalnix.

What problem is this solving?

This revision now requires changes to proceed.Tue, Mar 30, 15:06

Rebase, edit the summary to explain the use case.

deadalnix requested changes to this revision.Thu, Apr 1, 12:28

The use case does not make sense. You don't want to have a long delegation chain for all the node one after the other anyways, you want to have a master key and delegate to each node. There is no point delegating to begin with if the master also have all the private key to which it is delegating. If you want to do that, you might as well distribute the master key instead of devising a complicated scheme that isn't any more secure.

Moreover, this seems like motivated reasoning to me. The problem mentioned is very abstract and it doesn't look like anyone has this problem today or that this is a blocker to launch.

This revision now requires changes to proceed.Thu, Apr 1, 12:28