-
Notifications
You must be signed in to change notification settings - Fork 71
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
solidity implementation for ics23 #55
Conversation
A few points to answer yet-to-ask reviewers' questions:
If this PR is too bulky and cumbersome to review, please let me know and I will try to split it into smaller, less scary pieces. |
Code is splitted in 4 different libraries, following the layout of functions and files of the go implementation - Ops -> go/ops.go - Proof -> go/proof.go - Compress -> go/compress.go - Ics23 -> go/ics23.go Missing parts of the current implementation: - sha512 hash option: solidity does not have built-in function for this hash. A solidity implementation would utterly inefficient and very costly (gas-wise) - compress functions: the implementation will very likely be used to verification, not for proof generation - ProofSpec for tendermint and iavl definition: again, this implementation is meant to be used to verify, not to provide proofs. The implementation also provides a framework to run the same unit-test cases that the go implementation has. go-ethereum package provides a ``SimulatedBackend`` that can be used to deploy a contract and call functions. UnitTest-specific contracts are included in the libraries sol files. The current go-ethereum version is the last with a working ``abigen`` command. This commit also refactors the go project to make room for two go modules in the same repository
bddc3a0
to
aa1a748
Compare
I have yet to review, but 2 points.
|
Hi @ethanfrey, |
I have asked about licensing many times with the ICF and they are very admimant about Apache-2 only, no GPL family. Since this package is imported by the Cosmos SDK, and thus affected every Cosmos blockchain, we need to be extra careful to maintain Apache 2 compliance. |
Thank you for this work, and I look forward to seeing one based on MIT code |
Thanks @ethanfrey , |
Code is splitted in 4 different libraries, following the layout of
functions and files of the go implementation
Missing parts of the current implementation:
hash. A solidity implementation would utterly inefficient and very
costly (gas-wise)
verification, not for proof generation
implementation is meant to be used to verify, not to provide proofs.
The implementation also provides a framework to run the same unit-test
cases that the go implementation has.
go-ethereum package provides a
SimulatedBackend
that can be used todeploy a contract and call functions. UnitTest-specific contracts are
included in the libraries sol files.
The current go-ethereum version is the last with a working
abigen
command.
This commit also refactors the go project to make room for two go
modules in the same repository