celestiaorg / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Other
19 stars 33 forks source link

feat: Test stateless execution for cosmos-sdk baseapp using SMT-based fraudproofs #248

Closed Manav-Aggarwal closed 2 years ago

Manav-Aggarwal commented 2 years ago

Description

As part of the fraudproof cycle described in #245, we'd like to be able to test stateless execution for a cosmos-sdk baseapp by using fraudproofs based on the new multistore with SMTs.

Parts covered from the cycle of a fraudproof:

Optimint Full Node (Producer of fraudproof)

  1. The cosmos-sdk will simply execute the fraudulent block while logging all the states touched by the transaction. This minimial snapshot will be packaged as a fraudproof and passed back to optimint.

Optimint Full/Light Node (Verifier of fraudproof)

  1. Now, it spins up a fresh cosmos-sdk and tells it to initialize with the fraudproof which is essentially a minimal snapshot sufficient to execute the fraudulent block.

Closes: #252


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.

I have...

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.

I have...

Manav-Aggarwal commented 2 years ago

Added more state compares in the test, specifically checking whether the states of B1 and B2 match at different points.

jbowen93 commented 2 years ago

Does anyone know why the jobs are stuck in the queue?


Job defined at: celestiaorg/cosmos-sdk/.github/workflows/test.yml@refs/pull/248/merge
Waiting for a runner to pick up this job...```
Manav-Aggarwal commented 2 years ago

Noted addition of substore level tracing in SMT multistore here: #258

jbowen93 commented 2 years ago

Could you revert changes that the v0.46.0-with-smt makes to the github actions test runners.

It looks like it specifies

runs-on: buildjet-4vcpu-ubuntu-2004

for a lot of jobs which is why they aren't running! We can change this to

runs-on: ubuntu-latest
Manav-Aggarwal commented 2 years ago

everything is moved to cosmos-sdk-rollmint repo