Project: quorum-acceptance-tests

Failed: 5/6 Passed: 1/6 Skipped: 0/6
6Total specs
  • 5Failed
  • 1Passed
  • default
  • 16%
  • 00:00:20
  • Oct 1, 2018 at 1:43pm

State manipulation in private smart contract

00:00:00

A simple smart contract is to store a int value and to provide get() and set() functions. Non-participated party from original transaction is trying to modify the private state of the participated party.

Private state is maintained

00:00:00
Tags: privacy state
Execution Time : 00:00:00
  • Deploy a simple smart contract with initial value "100" in "Node1" 's default account and it's private for "Node7" , named this contract as "contract17" .

    java.lang.IllegalArgumentException: Node Node7 not found in config

    com.quorum.gauge.services.PrivacyService.id(PrivacyService.java:12)
    com.quorum.gauge.services.ContractService.lambda$createSimpleContract$0(ContractService.java:40)
    rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:69)
    rx.internal.producers.SingleProducer.request(SingleProducer.java:65)
    rx.Subscriber.setProducer(Subscriber.java:211)
    rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer(OnSubscribeMap.java:102)
    rx.internal.operators.OperatorSingle$ParentSubscriber.onCompleted(OperatorSingle.java:110)
    rx.internal.operators.OperatorTake$1.onNext(OperatorTake.java:83)
    rx.internal.operators.OperatorMerge$MergeSubscriber.emitScalar(OperatorMerge.java:395)
    rx.internal.operators.OperatorMerge$MergeSubscriber.tryEmit(OperatorMerge.java:355)
    rx.internal.operators.OperatorMerge$InnerSubscriber.onNext(OperatorMerge.java:846)
    rx.internal.operators.OnSubscribeFromIterable$IterableProducer.slowPath(OnSubscribeFromIterable.java:117)
    rx.internal.operators.OnSubscribeFromIterable$IterableProducer.request(OnSubscribeFromIterable.java:89)
    rx.Subscriber.setProducer(Subscriber.java:211)
    rx.internal.operators.OnSubscribeFromIterable.call(OnSubscribeFromIterable.java:63)
    rx.internal.operators.OnSubscribeFromIterable.call(OnSubscribeFromIterable.java:34)
    rx.Observable.unsafeSubscribe(Observable.java:10327)
    rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:248)
    rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:148)
    rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
    org.web3j.protocol.core.RemoteCall.lambda$observable$0(RemoteCall.java:51)
    rx.Observable.unsafeSubscribe(Observable.java:10327)
    rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
    rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
    rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
    rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
    rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
    rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
    rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
    rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
    rx.Observable.unsafeSubscribe(Observable.java:10327)
    rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
    rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
    rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
    rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
    rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
    rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
    rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
    rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
    rx.Observable.subscribe(Observable.java:10423)
    rx.Observable.subscribe(Observable.java:10390)
    rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:443)
    rx.observables.BlockingObservable.first(BlockingObservable.java:166)
    com.quorum.gauge.PrivateSmartContract.setupContract(PrivateSmartContract.java:34)
Execution Time : 00:00:00
  • Execute "contract17" 's `set()` function with new value "0" in "Node3" and it's private for "Node1" .
Execution Time : 00:00:00
  • "contract17" 's `get()` function execution in "Node1" returns "100" .