Coder Social home page Coder Social logo

Comments (7)

seniorjoinu avatar seniorjoinu commented on July 19, 2024 1

Hey there!

Thank you! We have made a fix. Here is the working version - https://github.com/Luxoft/cordentity/tree/fix/example-test (it is almost the same except ReadmeExampleTest.kt:97).

Unfortunately, we're unable to merge it into master right now, because Cordentity is currently migrating to the HL Labs (https://github.com/hyperledger-labs/cordentity).

from cordentity.

alkopnin avatar alkopnin commented on July 19, 2024 1

Hi @ADL-work
Actually it's great that you bring it up. I just have checked the code and let me explain.
Currently Indy covers only ">=" mathematical operations. However, they are working on "<" right now.

Let's take a look the example,

  • born is 2000
  • eighteenYearsAgo is (2018 - 18) = 2000

In line 89 Indy eventually compares for us 2000 >= 2000 which is true.
However, if we change to 2005 we get 2005 >= 2000 which is also true.

Thus, to fix it we will migrate on the latest version as soon as "<" ready and will provide different mathematical operation on predicate building phase.

Sorry for that. And many thanks for your passion, very appreciate.

BTW @seniorjoinu could you, please, check my statement and finally confirm it.

from cordentity.

ADL-work avatar ADL-work commented on July 19, 2024

Hey @seniorjoinu, thanks for the quick updates. I managed to have it and get the result to true. But when I tried with other value of "BORN" to test invalid values, it still shows true (for example changing from 2000 to 2005).
Do you have any hint for this?

Much appreciate for the help!

from cordentity.

ADL-work avatar ADL-work commented on July 19, 2024

Hi @alkopnin,

Many thanks for the explanation, I got it now. When I tried with "1999", it raised an exception and the return value is: false, which is clear now as (1999 >= 2000) is false.

Thanks and have a nice afternoon/evening 👍

from cordentity.

lolo8304 avatar lolo8304 commented on July 19, 2024

i have the same issue and its clear that it fails in the predicate - but ... the predicate is not the issue.
try to add an "attribute reference" into it.

org.hyperledger.indy.sdk.InvalidStructureException: A value being processed is not valid

i have validated and compared it to com.luxoft.blockchainlab.hyperledger.indy.AnoncredsDemoTest
and here all is working..... it seems that additional entries in the request to indy-sdk

see test attachements
AnoncredsDemoTest.json.txt
shopping-schema.json.txt

i traced the error and I receive:

cause = {InvalidStructureException@19687} "org.hyperledger.indy.sdk.InvalidStructureException: A value being processed is not valid."
stackTrace = {StackTraceElement[10]@19696}
0 = {StackTraceElement@19699} "org.hyperledger.indy.sdk.IndyException.fromSdkError(IndyException.java:72)"
1 = {StackTraceElement@19700} "org.hyperledger.indy.sdk.IndyJava$API.checkResult(IndyJava.java:90)"
2 = {StackTraceElement@19701} "org.hyperledger.indy.sdk.anoncreds.Anoncreds.access$700(Anoncreds.java:26)"
3 = {StackTraceElement@19702} "org.hyperledger.indy.sdk.anoncreds.Anoncreds$4.callback(Anoncreds.java:93)"
4 = {StackTraceElement@19703} "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)"
5 = {StackTraceElement@19704} "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)"
6 = {StackTraceElement@19705} "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)"
7 = {StackTraceElement@19706} "java.lang.reflect.Method.invoke(Method.java:498)"
8 = {StackTraceElement@19707} "com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:520)"
9 = {StackTraceElement@19708} "com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:551)"

from cordentity.

lolo8304 avatar lolo8304 commented on July 19, 2024

fixed bug above while removing unneeded "revocation" information. if "revocation" is available there is an SDK issue

patch-cordentity-master.diff.zip

i fixed it on top of master in https://github.com/hyperledger-labs/cordentity

from cordentity.

lolo8304 avatar lolo8304 commented on July 19, 2024

for all: sorry about my message - my mistake. I built "indy master --> 1.8.* but cordenity is only working with 1.7.0 so far (in master and developer branch)

all fine now

from cordentity.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.