Skip to content
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

Expose service nodes from smart contract #1

Conversation

Doy-lee
Copy link

@Doy-lee Doy-lee commented Apr 17, 2024

This depends on oxen-io/ethyl#11 being merged.

Added a way to invoke serviceNodes() and serviceNodeIDs() from the smart contract in C++ meaning we can test the service node data stored on the EVM. Included is various fixes and helper APIs to achieve that.

  • Fixed UB with reinterpret_cast when converting C++ BLS pkeys into serializable form using memcpy
  • Add the reverse function to convert serialized BLS pkeys in hex back to a binary BLS public key
  • Update ethyl with various support functionality

This is just the base functionality and a few supporting tests. More in depth tests can follow but I'd like to checkpoint the work into the mainline branch so everyone's on the same page.

`reinterpret_cast` from the C structure to the C++ structure is
illegal because the original object that the key was instantiated
in was not a G1 point. Instead implement the logic in a C++
compliant way using memcpy which allows the construction of types
unrelated to each other.
@Doy-lee
Copy link
Author

Doy-lee commented Apr 18, 2024

Has been merged in via #2

@Doy-lee Doy-lee closed this Apr 18, 2024
@Doy-lee Doy-lee deleted the expose-service-nodes-from-smart-contract branch May 13, 2024 01:19
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.

1 participant