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

Add missing CryptoFacade methods #874

Merged
merged 2 commits into from
Apr 21, 2023
Merged

Add missing CryptoFacade methods #874

merged 2 commits into from
Apr 21, 2023

Conversation

aslesarenko
Copy link
Member

@aslesarenko aslesarenko commented Apr 17, 2023

In this PR the following methods added:

  • add CryptoContext.curve
  • add CryptoFacade.encodePoint
  • add CryptoFacade.getCurve

These methods are used in Ergo node.

@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Merging #874 (5221902) into v5.0.7-RC (da65640) will decrease coverage by 0.04%.
The diff coverage is 30.00%.

@@              Coverage Diff              @@
##           v5.0.7-RC     #874      +/-   ##
=============================================
- Coverage      80.58%   80.54%   -0.04%     
=============================================
  Files            219      220       +1     
  Lines          13992    14002      +10     
  Branches         464      462       -2     
=============================================
+ Hits           11275    11278       +3     
- Misses          2717     2724       +7     
Impacted Files Coverage Δ
...rc/main/scala/sigmastate/crypto/CryptoFacade.scala 80.00% <0.00%> (-12.31%) ⬇️
...er/src/main/scala/sigmastate/crypto/Platform.scala 82.35% <0.00%> (-10.99%) ⬇️
...ain/scala/sigmastate/crypto/CryptoContextJvm.scala 62.50% <50.00%> (-8.93%) ⬇️

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@aslesarenko aslesarenko requested a review from kushti April 20, 2023 10:51
@@ -46,6 +51,12 @@ object Platform {
/** Returns byte representation of the given field element. */
def encodeFieldElem(p: ECFieldElem): Array[Byte] = p.value.getEncoded

/** Returns byte representation of the given point.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Returns" is already in the code. "byte representation of the given point." is enough

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, no problem, but does it really worth to spend efforts on this? I don't think we should be so strict in our reviews. Do you want me to follow the same strict standard, I assume yes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What standard are you following during review? Any link ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is figuratively speaking "standard". You establish the review rules here, and I try to follow them while reviewing Ergo PRs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And vice versa. Why not to standardize them then? It would be good for sure to avoid comments about "black names" etc

interpreter/src/main/scala/sigmastate/crypto/package.scala Outdated Show resolved Hide resolved
@aslesarenko aslesarenko merged commit 941a71b into v5.0.7-RC Apr 21, 2023
@aslesarenko aslesarenko deleted the missing-methods branch April 21, 2023 13:51
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