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

Make Linera easier to verify on other blockchains #2605

Open
deuszx opened this issue Oct 10, 2024 · 1 comment
Open

Make Linera easier to verify on other blockchains #2605

deuszx opened this issue Oct 10, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@deuszx
Copy link
Contributor

deuszx commented Oct 10, 2024

We want to make bridges with other chains. While Linera has special features that allow its validators to verify other chains (built-in Oracles), bridges work both ways and other chains will need to verify Linera as well. There are different types of bridges:

  • Guardian-based
  • ZK-based
  • Light-client based

Both Guardian-based and ZK-based bridges add a layer of indirection/interpretation on top of Linera blocks/messages and Linera state is not directly verified on chain. For light-client type bridges, smart contracts (on the recipient chains) need to verify:

  1. block chain
  2. smart contract state

Block verification

Recipient chains will have to verify Linera's chain of block. They'll need to:

  1. (de)serialise Linera blocks and check that hashes match.
  2. Verify that the new block follows from the previous one(s).
  3. Verify finalisation of the incoming block.
  4. Track Linera validator rotation

Smart contract state verification

Once the light client is capable of following the Linera chains, specific apps will want to be able to act on Linera Application specific events. The occurrence of the event needs to be cryptographically verifiable.

Tasks

Block structure

Crypto

Ethereum

Sui

@deuszx deuszx self-assigned this Oct 10, 2024
@deuszx deuszx added the enhancement New feature or request label Oct 10, 2024
@deuszx deuszx moved this to In Progress in Core Protocol Oct 10, 2024
@ma2bd
Copy link
Contributor

ma2bd commented Oct 10, 2024

Couple of ideas how to break down this task (@afck may have more inputs):

  1. Cryptographic compatibility is probably the first thing to look into:

    • We may have to switch some or all Linera crypto-hashes to Keccak256 (for Ethereum) --> switching all of them is going to break tests that hardcode chainIDs etc but it might be the simplest thing to do in the long term.
    • We may want the public key of a Linera validator to be in fact a tuple of public keys (one in each supported signing scheme).
    • By default, all blocks should still be multi-signed using the current curve (which I believe is faster to sign and verify). However, certain blocks containing external events directed at an external chain will need to be additionally multi-signed by other signing schemes. I guess this make each Linera signatures potentially a tuple? We probably want Linera validators (and initially clients) to verify all the signature components of a certificate before storage. (Fortunately, few blocks will require these additional slower schemes)
  2. Most likely, external chains only want to consume the events directed to them in a Linera block, so they should not have to process entire blocks. This requires changing the block format and introduce a notion of block headers (basically, a small handcoded Merkle tree).

  3. BCS-deserialization of block headers should be easy enough to write by hand. However, in the long run, we could also invest in code-generation for solidity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

2 participants