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

RSKIP-186 - Active Federation creation block height #186

Merged
merged 5 commits into from
Oct 26, 2021

Conversation

josedahlquist
Copy link
Contributor

No description provided.

@josedahlquist josedahlquist marked this pull request as ready for review November 20, 2020 00:53
@josedahlquist josedahlquist changed the title RSKIP-??? - Active Federation creation block height RSKIP-186 - Active Federation creation block height Nov 20, 2020
IPs/RSKIP186.md Outdated Show resolved Hide resolved
IPs/RSKIP186.md Outdated Show resolved Hide resolved
IPs/RSKIP186.md Outdated
Comment on lines 29 to 32
- activeFederationCreationBlockHeight. (long)
- Defaults to the existing Federation activation height
- nextFederationCreationBlockHeight. (long)
- Defaults to the existing Federation activation height
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The names sound a bit confusing to me, I had to read a couple of times what the difference between each is.

Maybe:

federationCreationBlockHeight
federationActivationBlockHeight

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • activeFederationCreationBlockHeight: stores the active Federation creation height. This value is the one the user would get
  • nextFederationCreationBlockHeight: this is a temporary value created when a new Federation is committed. This committed Federation won't be activated until the network's configuration delay is achieved.

I'll try better explaining this in the RSKIP.

Thanks!

@donequis
Copy link
Contributor

donequis commented Feb 4, 2021

This doesn't seem to solve the issue that is addressing at the description.

When the Federation change voting process finishes, the Bridge emmits a `commit_federation` event. This event can be used to provide a blockchain proof of the Federation address when requested. Nowadays doing this would imply navigating the blockchain to determine when it was emmited, or constantly monitoring said events.

An user requesting the current federation can't validate with this event that the address provided it is actually the current federation. The reasonable thing would be to have a storage key with the federation address and present a storage proof of it or something similar.

@josedahlquist
Copy link
Contributor Author

This doesn't seem to solve the issue that is addressing at the description.

When the Federation change voting process finishes, the Bridge emmits a `commit_federation` event. This event can be used to provide a blockchain proof of the Federation address when requested. Nowadays doing this would imply navigating the blockchain to determine when it was emmited, or constantly monitoring said events.

An user requesting the current federation can't validate with this event that the address provided it is actually the current federation. The reasonable thing would be to have a storage key with the federation address and present a storage proof of it or something similar.

You are correct @donequis, this is not enough to provide that functionality. But it's the required consensus change to be able to later create said functionality in the node itself (via an json-rpc method most likely)

@donequis
Copy link
Contributor

donequis commented Feb 4, 2021

I think that this is not enough to create such functionality (at least not cleanly). With these changes a node will be able to find a block with the event and present a proof for such an event. The problem is that the user receiving the proof can't verify that the provided address is the actual federation address (i.e. there was no such an event after the given one). The user will be able to check that the address was at least active once in the past, which is not an enough guarantee.

The only solution is to provide a proof of the height/tx execution and only then provide the event to the user. But it would be easier to save the federation address and send it directly to the user with a proof of storage

@juli
Copy link

juli commented Mar 5, 2021

IMO this RSKIP tries to address two independent problems and there are alternative solutions for both:

  1. Add a way to flag transactions to the Bitcoin multisig as "donation" (e.g., OP_RETURN) independent of the origin of the transaction.
  2. Log the current multisig Bitcoin address as frequently as possible (e.g., for each updateCollections)

Solution 1 is more generic than this proposal and can be used in the future as part of the ERP recovery and could be supported by PowPeg hardware device if necessary, it can also be used in migrations (simplifying them?)

Solution 2 allows a client without a full node to verify a merkle proof of a transaction receipt including an event with the multisig address and determine if it is the current one or not. The client needs to know the current blockchain height (as always) and the frequency of updates and reject proofs that are too old.

@SergioDemianLerner SergioDemianLerner merged commit e86c9fa into master Oct 26, 2021
@marcos-iov marcos-iov deleted the fed-change-block branch October 26, 2021 14:46
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

5 participants