Comments (3)
I think this is a good idea. @asn-d6 @pawanjay176 what do y'all think about this?
from c-kzg-4844.
perhaps a bit more context re the last part, building the c-kzg crate can be a problem on certain platforms, hence in alloy we'd like to use alloy-primitives, which are also just array wrappers:
so we can use the type without needing c-kzg, they have the same array repr and could be casted to the c-kzg, but ideally we can move this step behind the KzgSettings
API so that we can verify types that are AsRef<[]>
for example.
from c-kzg-4844.
currently, all
KzgProof
functions takeKzgSettings
as argument:c-kzg-4844/bindings/rust/src/bindings/mod.rs
Lines 321 to 325 in 1ef67c1
for convenience, all of those could also be implemented for
KzgSettings
directly that delegate with&self
No strong opinion about this change.
Gotta say that it seems a bit arbitrary to me to consider compute_kzg_proof()
a method of KZGSettings
. Because in a similar way, I could think of it as a method of Blob
.
That said, if this makes people happy, I don't have a strong opinion about it. I think Justin also likes it because it will inadvertently also group all the public functions together.
Since these are new functions, this would make it possible to change the API and accept fixed arrays directly instead of the c-kzg Bytes wrapper types, which would be even more convenient.
Hm, this seems like an unrelated and more complicated change. I would make a separate issue for it.
The Bytes32
struct right now is part of bindgen's generated code, and we have also written a bunch of helper methods on top of it. How would it look like to make the API accept fixed arrays? I cannot easily visualize the change and understand if it simplifies or makes things more complicated.
from c-kzg-4844.
Related Issues (20)
- Can I just compile as a lib in C? HOT 3
- Some ops seem exceedingly slow on Apple M2 HOT 11
- Crashes with SIGILL on Linux/amd64 i7 CPU HOT 3
- Add library prefix to all ckzg symbols HOT 7
- Broken CI in rust-windows because of rust-1.7.0 HOT 1
- Stack overflow in Rust benchmarks on Windows HOT 1
- Nodejs does not support browsers HOT 5
- Problems with cross-platform docker images HOT 6
- Release Rust bindings on crates.io HOT 3
- Support new function ckzg_load_trusted_setup_from_bytes HOT 3
- Should we make FIELD_ELEMENTS_PER_BLOB runtime-configurable? HOT 8
- Rust binding can't cross compile on Apple Silicon HOT 3
- Rust bindings lack flexibility with current structure of build script HOT 3
- Rust build.rs: Pass -D__BLST_NO_ASM__ on non-x86-64/non-aarch64 ISAs HOT 7
- Python bindings' load_trusted_setup() segfaults if file does not exist HOT 1
- Blob value in argument to context.VerifyBlobKZGProof HOT 1
- no pypi source packages HOT 2
- Proving/Verifying Subsections of Blob(s) HOT 1
- Publish `v1.0.1` Rust bindings to `crates.io` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from c-kzg-4844.