Skip to content

Add VRF proof verification / generation to the Schnorrkel wrapper - #2

Merged
David-Petrov merged 16 commits into
masterfrom
feat/schnorrkel-vrf
Mar 12, 2024
Merged

Add VRF proof verification / generation to the Schnorrkel wrapper#2
David-Petrov merged 16 commits into
masterfrom
feat/schnorrkel-vrf

Conversation

@David-Petrov

Copy link
Copy Markdown

No description provided.

David Petrov added 4 commits March 7, 2024 13:42
turns out, this task was left behind from the original source as a single-target build subtask to automatically detect the target currently being built for, but our fork targets multi-platform users, so we need all the target architecture builds
@David-Petrov

David-Petrov commented Mar 7, 2024

Copy link
Copy Markdown
Author

[KNOWN ISSUE] Build automation is broken. The original jar task for managing the native rust lib (removed by 015023e) was meant to pick up the lib as output from cargo (built for the current architecture) and place it in its corresponding place. This, however, is a single-target automation.
Our fork of PolkaJ requires multi-target builds, so this approach is not suitable, thus jar has been removed.
For now, manual intervention is necessary: paste the rust lib manually from ./polkaj-schnorrkel/build/rust/release (that's the cargo build result; path relative from repository root) into its corresponding target architecture folder under ./polkaj-schnorrkel/src/main/resources/native, before then building again to obtain the properly updated .jar.

Unfortunately, compilation for all target architectures must happen manually in a similar way as described above, before officially "deploying a new version" for multi-arch usage.

Is it worth investing effort into polishing the automation...?

[RESOLVED]: Discussed with @georg-getz, polishing the automation is not worth it for now, as priorities are different. This goes into TODO.md. For now, a detailed description of this necessary manual intervention is to be added to this fork's README.md.

Comment thread polkaj-schnorrkel/src/rust/src/merlin_jni/mod.rs Outdated
@David-Petrov
David-Petrov force-pushed the feat/schnorrkel-vrf branch from 9c1b958 to 7c267be Compare March 7, 2024 13:24
Comment thread polkaj-schnorrkel/src/main/java/io/emeraldpay/polkaj/merlin/TranscriptData.java Outdated
Comment thread polkaj-schnorrkel/src/rust/src/merlin_jni/mod.rs Outdated
David Petrov added 10 commits March 8, 2024 15:21
dubbed too inconvenient as a public API method since java doesn't provide a u64 type, so the correct representation is left to the caller
add a sensible differentiation between "false" as "incorrect proof" and when an exception must be thrown in Java
add proper explanations for weird decisions in the respective places
useful to link rust source to a cargo.toml for VSCode users
no need to explicitly disable it as a default feature... for now
- remove semicolons;
- simplify boolean expressions
@David-Petrov
David-Petrov merged commit 3327211 into master Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants