keep-starknet-strange / blobstream-starknet Goto Github PK
View Code? Open in Web Editor NEWCelestia -> Starknet bridge
Home Page: https://blobstream-stark.net
License: MIT License
Celestia -> Starknet bridge
Home Page: https://blobstream-stark.net
License: MIT License
Celestia is moving towards a ZK solution for Blobstream due to the cost-prohibitive nature of signature verification on L1.
We would like to know if this remains cost prohibitive on L2. A simple benchmark of gas usage and estimated cost to run the Blobstream Contracts data root submission.
This benchmark of signature verification should be run and displayed against the cost to verify the succinct snark proof.
Implement DAVerifierTest for the Cairo verifier module:
Implement RollupInclusionProofTest for the Cairo verifier module:
Update the main contract to BlobstreamX:
https://github.com/succinctlabs/blobstreamx/blob/main/contracts/src/BlobstreamX.sol
Implement the Blobstream events in the contract and test their emission:
DataRootTupleRootEvent
ValidatorSetUpdatedEvent
These can include stubs or full implementation of calling contract code.
NOTE -> ISuccinctGateway
can be commented or stubbed for the time being (work done in #73 )
HeaderRangeRequested
requestHeaderRange
build out tree for issue creation
https://github.com/celestiaorg/blobstream-contracts/tree/master/src/lib/tree
Implement and test the Binary Merkle Tree from the Celestia Blobstream contracts.
Verify if there is anything reusable from the alexandria merkle tree implementation
Ensure the following tests are implemented and pass:
https://github.com/celestiaorg/blobstream-contracts/blob/master/src/lib/tree/binary/test/BinaryMerkleTree.t.sol
scaffold project and init unit testing
https://github.com/celestiaorg/blobstream-contracts/tree/master/src
Integrate a script that benchmarks the average cost for Starknet to submit blob data to Ethereum L1 for comparison.
Should display a nice readout of the data.
Blob As Calldata Gas
)Refs
Implement SuccinctGateway
rename tag mapping
Add the components necessary to make the Blobstream contract upgradable
via a proxy contract:
https://github.com/OpenZeppelin/cairo-contracts/blob/main/src/upgrades/upgradeable.cairo
Continuation #42
Next.js application in the project root called blobby
that implements the application logic for the Figma designs bootstrapped here:
refactor proj structure
Implement SuccinctFeeVault from Succinct X contracts
Can make Ownable + Upgradable instead of TimelockedUpgradeable
Overview -> RW Celestia
test the github workflow
Buildout book docs w/ diagrams
bump scarb version to 2.5.0
and handle any breaking changes
Once Herodotus Verifier implements a fact registry implement the logic for verifying the Proving Fact sent in updateState and correlating logic.
In the blobby
demo, read the base64 svg encoding given in step 6, then decode and display the SVG like in step 1.
Example base64 SVG encoding : data:image/svg+xml;base64,CiAgICAgIDxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+CiAgICAgICAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgcj0iNDAiIGZpbGw9IiNhZDExZjciIC8+CiAgICAgICAgPHRleHQgeD0iNTAiIHk9IjUwIiBmb250LXNpemU9IjEyIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iIGZpbGw9IndoaXRlIj5GbG9yaWFuPC90ZXh0PgogICAgICA8L3N2Zz4KICAgIA==
( Decode the CiAgICA...
part using base64 )
Continuation of #42
Blobby: https://github.com/keep-starknet-strange/blobstream-starknet/tree/main/blobby
add link to contrib
Initialize the contract bindings similar to the original contracts Go bindings.
Tasks:
Develop the Namespace Merkle Tree Hasher such that it passes the Celestia tests.
Verify if we need a full implementation of abi.encodePacked or not (some util funcs here:
https://github.com/keep-starknet-strange/blobstream-starknet/blob/main/src/utils.cairo
(coordinate with #23)
Blobstream(sol) https://github.com/celestiaorg/blobstream-contracts/blob/master/src/lib/tree/namespace/test/TreeHasher.t.sol
Similar UI demo of interacting with the blobstream contracts on Starknet as was developed here
In the blobby
demo, dynamically create an SVG from the inputted text and display in Step 1. Something like this :
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<circle cx="50" cy="50" r="40" fill="#F37567" />
<text x="50" y="50" font-size="12" font-family="sans-serif" text-anchor="middle" dy=".3em" fill="white">{svg}</text>
</svg>
( With better sizing and placement, similar to what exists now )
Also, encode the generated SVG in base64
and replace the existing CiAgIC...
bit here with the encoded value.
Continuation of #42
Blobby: https://github.com/keep-starknet-strange/blobstream-starknet/tree/main/blobby
Create integration tests (scripts) for the Blobstream contract(s) by doing the following :
Katana
nodeBlobstreamX
contract ( & dependencies such as the gateway ) to the Katana
nodeBlobstreamX
contract & check state updates are correctPossibly use mock implementations where needed.
https://github.com/keep-starknet-strange/blobstream-starknet/blob/main/src/lib.cairo
Crossover payment for Beerus work
Implement and create tests for the IDAOracle.verifyAttestation
for BlobstreamX contract.
blobstream-starknet/src/blobstreamx.cairo
Line 136 in 28d3221
Implement the frozen functionality from Succinct's BlobstreamX contract.
https://github.com/succinctlabs/blobstreamx/blob/a2ca7f434b013eaa3b7bd39dd0a2a405f99eb056/contracts/src/BlobstreamX.sol#L124
https://github.com/succinctlabs/blobstreamx/blob/a2ca7f434b013eaa3b7bd39dd0a2a405f99eb056/contracts/src/BlobstreamX.sol#L72 ( change to get / set pair )
Create high fidelity mockups similar to based64.xyz using Figma.
Responsive layout based on Tailwind recommandations (5 breakpoints).
Implement and test the Namespace Merkle Tree from the Celestia Blobstream contracts.
References
Verify if there is anything reusable from the alexandria merkle tree implementation
Ensure the following tests are implemented and pass:
https://github.com/celestiaorg/blobstream-contracts/blob/master/src/lib/tree/namespace/test/NamespaceMerkleTree.t.sol
Build out a minimal core contract
for an L3 to utilize for state update.
Will be used for testing the query of the DA Oracle from the blobstream contracts, will be necessary for L3 integration.
messaging cairo contract - https://github.com/dojoengine/dojo/blob/main/crates/katana/core/contracts/messaging/cairo/src/appchain_messaging.cairo
solidity core contract - https://github.com/starkware-libs/cairo-lang/blob/master/src/starkware/starknet/solidity/Starknet.sol
Develop the Binary Merkle Tree Hasher such that it passes the Celestia tests:
https://github.com/keep-starknet-strange/blobstream-starknet/blob/main/src/tree/binary/tests/test_hasher.cairo
Verify if we need a full implementation of abi.encodePacked or not (some util funcs here:
https://github.com/keep-starknet-strange/blobstream-starknet/blob/main/src/utils.cairo
Blobstream(sol) https://github.com/celestiaorg/blobstream-contracts/blob/master/src/lib/tree/binary/test/TreeHasher.t.sol
Implement the Blobstream errors in the contract and tests:
These can include stubs or full implementation of calling contract code.
PENDING #66
Do we need to have a function to emulate:
abi.encode
abi.encodePacked
abi.encodeWithSelector
alexandria
and imported?For type Namespace, impl:
Ensure type param <Namespace>.id
type change to bytes31 is safe, add test to prove.
https://github.com/celestiaorg/blobstream-contracts/blob/master/src/lib/tree/Types.sol
Implement FunctionRegistry from Succinct X contracts
Remove Succinct contracts and call the external contracts:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.