Code Monkey home page Code Monkey logo

quorum-acceptance-tests's Introduction

Standard Acceptance Tests Extra Acceptance Tests

Quick Start

  • Install Docker Engine or Docker Desktop
  • Run basic acceptance tests against a new GoQuorum network using Raft consensus:
    docker run --rm --network host -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/acctests:/tmp/acctests \
            quorumengineering/acctests:latest test -Pauto -Dtags="basic || networks/typical::raft" \
            -Dauto.outputDir=/tmp/acctests -Dnetwork.forceDestroy=true
    

Development

Development environment requires the following:

  • JDK 14+
  • Gauge
  • Run ./mvnw compile to initiate the project with generated Java sources from Solidity source

With built-in provisioning feature:

For more details on tools and versions being used, please refer to Dockerfile

Writing Tests

  • Use Gauge test automation framework
  • Test Specs are stored in src/specs folder
    • Folder 01_basic contains specifications which describe GoQuorum's basic functionalities. All specifications must be tagged as basic
    • Folder 02_advanced contains specifications which are for making sure GoQuorum's basic functionalities are working under different conditions in the chain. All specifications must be tagged as advanced
  • Glue codes are written in Java under src/test/java folder
  • Tests are generally written against 4-node GoQuorum network

Running Tests

With auto-provisioning network

πŸ’‘ Tag networks/typical::raft means:

  • Executing tests which are tagged with the value
  • Instructing Maven to provision networks/typical with profile raft when using Maven Profile auto (i.e.: -Pauto)
  • networks/typical is a folder that contains Terraform configuration to provision the network
  • Run basic tests for raft consensus:
    ./mvnw clean test -Pauto -Dtags="basic || basic-raft || networks/typical::raft"
    
  • Run basic tests for istanbul consensus:
    ./mvnw clean test -Pauto -Dtags="basic || basic-istanbul || networks/typical::istanbul"
    
  • Force destroy the network after running tests:
    ./mvnw clean test -Pauto -Dtags="basic || basic-raft || networks/typical::raft" -Dnetwork.forceDestroy=true
    
  • Start the network without running tests:
    ./mvnw process-test-resources -Pauto -Dnetwork.target="networks/typical::raft"
    
  • Destroy the network:
    ./mvnw exec:[email protected] -Pauto -Dnetwork.folder="networks/typical" -Dnetwork.profile=raft
    

Below is the summary of various parameters:

Parameters Description
-Dnetwork.target="<folder>::<profile" Shorthand to specify the Terraform folder and profile being used to create GoQuorum Network
-Dnetwork.folder="<folder>" Terraform folder being used to create GoQuorum Network
-Dnetwork.profile="<profile>" Terraform workspace and terraform.<profile>.tfvars being used
-Dnetwork.forceDestroy Destroy the GoQuorum Network after test completed. Default is false
-Dnetwork.skipApply Don't create GoQuorum Network. Default is false
-Dnetwork.skipWait Don't perform health check and wait for GoQuorum Network. Default is false
-Dinfra.target="<folder>::<profile" Shorthand to specify the Terraform folder and profile being used to create an infrastructure to host Docker Engine
-Dinfra.folder="<folder>" Terraform folder being used to create the infrastructure
-Dinfra.profile="<profile>" Terraform workspace and terraform.<profile>.tfvars being used
-Dinfra.forceDestroy Destroy the infrastructure after test completed. Default is false
-Dinfra.skipApply Don't create the infrastructure. Default is false
-Dinfra.skipWait Don't perform health check and wait for GoQuorum Network. Default is false
-DskipToolsCheck Don't check local tools required to run tests. Default is false
-DskipGenerateSol Don't generate Java stubs for Solidity files. Default is false. When running Permission spec, this should not be set to true as the spec depends on version of Solidity files

With local binaries

In order to run acceptance tests during GoQuorum/Tessera development:

  • Build GoQuorum/Tessera binaries locally targeting Linux arch. E.g.: GoQuorum binaries are in /xyz/go-ethereum/build/bin folder and Tessera jar file is in /abc/tessera/tessera-dist/tessera-app/target
  • Mount binaries dynamically to overrride existing ones in the containers

    πŸ’‘ Indices 0,1,2,3.. indicate Node id which you want to use the local binaries

    • GoQuorum:
    export QUORUM_DEV_LOCAL='{host_path="/xyz/go-ethereum/build/bin", container_path="/usr/local/bin"}'
    export TF_VAR_additional_quorum_container_vol="{0=[$QUORUM_DEV_LOCAL],1=[$QUORUM_DEV_LOCAL],2=[$QUORUM_DEV_LOCAL],3=[$QUORUM_DEV_LOCAL]}"
    
    • Tessera:
    export TESSERA_DEV_LOCAL='{host_path="/abc/tessera/tessera-dist/tessera-app/target", container_path="/tessera"}'
    export TESSERA_APP_DEV_LOCAL='"/tessera/tessera-app-20.10.1-SNAPSHOT-app.jar"'
    export TF_VAR_additional_tessera_container_vol="{0=[$TESSERA_DEV_LOCAL],1=[$TESSERA_DEV_LOCAL],2=[$TESSERA_DEV_LOCAL],3=[$TESSERA_DEV_LOCAL]}"
    export TF_VAR_tessera_app_container_path="{0=$TESSERA_APP_DEV_LOCAL,1=$TESSERA_APP_DEV_LOCAL,2=$TESSERA_APP_DEV_LOCAL,3=$TESSERA_APP_DEV_LOCAL}"
    

With custom GoQuorum/Tessera Docker images

By default, official Docker images quorumengineering/quorum:develop and quorumengineering/tessera:develop in Docker Hub will be used. If you need to use your custom images, please follow the below guides:

  • Name the branch with prefix dev-. E.g.: dev-mybranch
  • Push custom GoQuorum/Tessera Docker images to Github Container Registry of this repo with image name and version convention
    • GoQuorum: quorum-dev-mybranch:develop
    • Tessera: tessera-dev-mybranch:develop
  • Pushing changes to dev-mybranch will kick off github Action workflow running tests using custom images

With existing quorum-examples network

SPRING_PROFILES_ACTIVE=local.7nodes ./mvnw clean test -Dtags="basic || basic-raft || networks/typical::raft"

Remote Docker

ℹ️ Because Docker Java SDK doesn't support SSH transport hence we need to open TCP endpoint.

networks/_infra/aws-ec2 provides Terraform configuration in order to spin off an EC2 instance with remote Docker API support.

E.g.: To start networks/typical with remote Docker infrastructure:

  • Make sure you have the right AWS credentials in your environment
  • Run:
    ./mvnw process-test-resources -Pauto -Dnetwork.target="networks/typical::raft" -Dinfra.target="networks/_infra/aws-ec2::us-east-1"
    

Logging

  • Set environment variable: LOGGING_LEVEL_COM_QUORUM_GAUGE=DEBUG

Gauge Badge

quorum-acceptance-tests's People

Contributors

achraf17 avatar amalrajmani avatar antonydenyer avatar baptiste-b-pegasys avatar chris-j-h avatar dolanor avatar jbhurat avatar macfarla avatar namtruong avatar nicolae-leonte-go avatar nmvalera avatar pinges avatar prd-fox avatar ricardolyn avatar rodion-lim-partior avatar satpalsandhu61 avatar trung avatar usmansaleem avatar vgloic avatar vsmk98 avatar zzy96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quorum-acceptance-tests's Issues

Add test for no recipients in a raw private transaction

A test should be added for raw private transactions for when no recipients are defined (i.e. we only send to ourselves).

This has a few prerequisites, including a bug in web3j-quorum as mentioned here: web3j/web3j-quorum#42

Making the change locally works, but involves updating quite a few web3j libraries which was a lot of trouble, and didn't get immediately working (thus using this as a tracking issue).

Flaky Test Private Smart Contract Get

Summary

Flaky test on Acceptance tests (basic || basic-raft || (advanced && raft) || networks/plugins::raft-account-plugin-hashicorp-vault) on GoQuorum master CI/CD.
Failed run: https://github.com/ConsenSys/quorum/actions/runs/1291240857.

Acceptance Criteria

  • Assess and solve flaky test

Extra note

Error log:

# Private raw smart contract when signed externally
590
  ## Contract is mined	 βœ” βœ” βœ” βœ”
591
  ## Storage Root storing private smart contracts must be the same	 βœ” βœ” βœ”
592
  ## Transaction payload is secured	 βœ” βœ” βœ” βœ”
593
  ## Privacy is enforced between parties	 βœ” βœ” βœ” βœ”
594
  ## When there's an update, privacy is still enforced	 βœ” βœ” βœ” ✘
595
        Failed Step: "contract31"'s `get()` function execution in "Node4" returns "5"
596
        Specification: src/specs/01_basic/externally_signed_private_raw_smart_contract_single.spec:66
597
        Error Message: org.opentest4j.AssertionFailedError: 
598
        Expecting:
599
         <23>
600
        to be equal to:
601
         <5>
602
        but was not.
603
        Stacktrace: 
604
        java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
605
        java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
606
        java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
607
        java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
608
        com.quorum.gauge.PrivateSmartContract.verifyPrivacyWithParticipatedNodes(PrivateSmartContract.java:188)
609
        com.quorum.gauge.PrivateSmartContract$$FastClassBySpringCGLIB$$ca78316f.invoke(<generated>)
610
        org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
611
        org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)
612
        org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
613
        org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
614
        org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
615
        com.quorum.gauge.services.DebugStepImplementation.logging(DebugStepImplementation.java:52)
616
        jdk.internal.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
617
        java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
618
        java.base/java.lang.reflect.Method.invoke(Method.java:564)
619
        org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
620
        org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
621
        org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
622
        org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
623
        org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
624
        org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)
625
        org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
626
        org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
627
        org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
628
        com.quorum.gauge.PrivateSmartContract$$EnhancerBySpringCGLIB$$22392cfc.verifyPrivacyWithParticipatedNodes(<generated>)
629
        jdk.internal.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
630
        java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
631
        java.base/java.lang.reflect.Method.invoke(Method.java:564)
632
        com.thoughtworks.gauge.execution.MethodExecutor.execute(MethodExecutor.java:28)
633
        com.thoughtworks.gauge.execution.StepExecutionStage.executeStepMethod(StepExecutionStage.java:66)
634
        com.thoughtworks.gauge.execution.StepExecutionStage.executeStep(StepExecutionStage.java:59)
635
        com.thoughtworks.gauge.execution.StepExecutionStage.execute(StepExecutionStage.java:41)
636
        com.thoughtworks.gauge.execution.AbstractExecutionStage.executeNext(AbstractExecutionStage.java:14)
637
        com.thoughtworks.gauge.execution.HookExecutionStage.execute(HookExecutionStage.java:33)
638
        com.thoughtworks.gauge.execution.ExecutionPipeline.start(ExecutionPipeline.java:19)
639
        com.thoughtworks.gauge.processor.ExecuteStepProcessor.process(ExecuteStepProcessor.java:44)
640
        com.thoughtworks.gauge.RunnerServiceHandler.lambda$executeStep$7(RunnerServiceHandler.java:166)
641
        java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
642
        java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
643
        java.base/java.lang.Thread.run(Thread.java:832)

eth_getTransactionReceipt is being called with null params

Seeing a lot of errors in Besu CI pipeline where eth_getTransactionReceipt is being called with null params eg https://app.circleci.com/pipelines/gh/hyperledger/besu/18211/workflows/c2c42708-76ee-4dbb-9a11-e36df02bda1d/jobs/110555

2022-11-13 19:19:59.957 DEBUG 589 --- [ionThreadPool-2] com.quorum.gauge.HttpLogger              : <-- END HTTP (110-byte body)
2022-11-13 19:20:00.027 DEBUG 589 --- [ionThreadPool-1] com.quorum.gauge.HttpLogger              : --> POST http://localhost:22002/
2022-11-13 19:20:00.027 DEBUG 589 --- [ionThreadPool-1] com.quorum.gauge.HttpLogger              : Content-Type: application/json; charset=utf-8
2022-11-13 19:20:00.027 DEBUG 589 --- [ionThreadPool-1] com.quorum.gauge.HttpLogger              : Content-Length: 79
2022-11-13 19:20:00.027 DEBUG 589 --- [ionThreadPool-1] com.quorum.gauge.HttpLogger              :
2022-11-13 19:20:00.027 DEBUG 589 --- [ionThreadPool-1] com.quorum.gauge.HttpLogger              : {"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":[null],"id":266}
2022-11-13 19:20:00.027 DEBUG 589 --- [ionThreadPool-1] com.quorum.gauge.HttpLogger              : --> END POST (79-byte body)
2022-11-13 19:20:00.109 DEBUG 589 --- [eadScheduler-32] com.quorum.gauge.HttpLogger              : <-- 200 OK http://localhost:22000/ (7578ms)
2022-11-13 19:20:00.109 DEBUG 589 --- [eadScheduler-32] com.quorum.gauge.HttpLogger              : vary: origin
2022-11-13 19:20:00.109 DEBUG 589 --- [eadScheduler-32] com.quorum.gauge.HttpLogger              : vary: origin
2022-11-13 19:20:00.109 DEBUG 589 --- [eadScheduler-32] com.quorum.gauge.HttpLogger              : Content-Type: application/json
2022-11-13 19:20:00.109 DEBUG 589 --- [eadScheduler-32] com.quorum.gauge.HttpLogger              :
2022-11-13 19:20:00.109 DEBUG 589 --- [eadScheduler-32] com.quorum.gauge.HttpLogger              : {
"jsonrpc" : "2.0",
"id" : 251,
"error" : {
"code" : -32000,
"message" : "Transaction nonce it too distant from current sender nonce"
}
}
2022-11-13 19:20:00.109 DEBUG 589 --- [eadScheduler-32] com.quorum.gauge.HttpLogger              : <-- END HTTP (154-byte body)
2022-11-13 19:20:00.110 DEBUG 589 --- [eadScheduler-32] com.quorum.gauge.HttpLogger              : --> POST http://localhost:22002/
2022-11-13 19:20:00.110 DEBUG 589 --- [eadScheduler-32] com.quorum.gauge.HttpLogger              : Content-Type: application/json; charset=utf-8
2022-11-13 19:20:00.110 DEBUG 589 --- [eadScheduler-32] com.quorum.gauge.HttpLogger              : Content-Length: 79
2022-11-13 19:20:00.110 DEBUG 589 --- [eadScheduler-32] com.quorum.gauge.HttpLogger              :
2022-11-13 19:20:00.110 DEBUG 589 --- [eadScheduler-32] com.quorum.gauge.HttpLogger              : {"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":[null],"id":291}
2022-11-13 19:20:00.114 DEBUG 589 --- [eadScheduler-32] com.quorum.gauge.HttpLogger              : --> END POST (79-byte body)
2022-11-13 19:20:00.120 DEBUG 589 --- [ionThreadPool-1] com.quorum.gauge.HttpLogger              : <-- 400 Bad Request http://localhost:22002/ (92ms)
2022-11-13 19:20:00.120 DEBUG 589 --- [ionThreadPool-1] com.quorum.gauge.HttpLogger              : vary: origin
2022-11-13 19:20:00.120 DEBUG 589 --- [ionThreadPool-1] com.quorum.gauge.HttpLogger              : vary: origin
2022-11-13 19:20:00.120 DEBUG 589 --- [ionThreadPool-1] com.quorum.gauge.HttpLogger              : Content-Type: application/json
2022-11-13 19:20:00.120 DEBUG 589 --- [ionThreadPool-1] com.quorum.gauge.HttpLogger              :
2022-11-13 19:20:00.120 DEBUG 589 --- [ionThreadPool-1] com.quorum.gauge.HttpLogger              : {
"jsonrpc" : "2.0",
"id" : 266,
"error" : {
"code" : -32602,
"message" : "Invalid params"
}

Improve dev env

Acceptance Criteria

  • Move the terraform directory from /tmp to be inside the project (and be removed when doing a mvn clean).
  • Add random hash when generating volumes names for the docker container

Flaky test - Transaction already known

Summary

Flaky test on Acceptance tests (basic || basic-raft || (advanced && raft) || networks/typical::raft) on Quorum Acceptance Tests master CI/CD.
Failed run: https://github.com/ConsenSys/quorum-acceptance-tests/runs/3856463709?check_suite_focus=true

Acceptance criteria

  • Assess and solve flaky test

Extra note:

Error log:

# Public smart contract with event
683
  ## Log events in total are captured when executing the contract	 βœ” βœ”io.reactivex.exceptions.UndeliverableException: The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | java.lang.RuntimeException: Error processing transaction request: already known
684
	at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:367)
685
	at io.reactivex.internal.operators.flowable.FlowableFromCallable.subscribeActual(FlowableFromCallable.java:43)
686
	at io.reactivex.Flowable.subscribe(Flowable.java:14935)
687
	at io.reactivex.Flowable.subscribe(Flowable.java:14882)
688
	at io.reactivex.internal.operators.observable.ObservableFromPublisher.subscribeActual(ObservableFromPublisher.java:31)
689
	at io.reactivex.Observable.subscribe(Observable.java:12284)
690
	at io.reactivex.internal.operators.observable.ObservableScalarXMap$ScalarXMapObservable.subscribeActual(ObservableScalarXMap.java:166)
691
	at io.reactivex.Observable.subscribe(Observable.java:12284)
692
	at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
693
	at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
694
	at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
695
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
696
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
697
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
698
	at java.base/java.lang.Thread.run(Thread.java:832)
699
	at com.quorum.gauge.core.AbstractSpecImplementation$1$1.run(AbstractSpecImplementation.java:201)
700
 ✘Caused by: java.lang.RuntimeException: Error processing transaction request: already known
701
	at org.web3j.tx.TransactionManager.processResponse(TransactionManager.java:176)
702
	at org.web3j.tx.TransactionManager.executeTransaction(TransactionManager.java:81)
703
	at org.web3j.tx.ManagedTransaction.send(ManagedTransaction.java:128)
704
	at org.web3j.tx.Contract.executeTransaction(Contract.java:367)
705
	at org.web3j.tx.Contract.executeTransaction(Contract.java:350)
706
	at org.web3j.tx.Contract.executeTransaction(Contract.java:344)
707
	at org.web3j.tx.Contract.lambda$executeRemoteCallTransaction$4(Contract.java:415)
708
	at org.web3j.protocol.core.RemoteCall.send(RemoteCall.java:42)
709
	at io.reactivex.internal.operators.flowable.FlowableFromCallable.subscribeActual(FlowableFromCallable.java:39)
710
	... 14 more
711

712
        Failed Step: Execute "contract12"'s `deposit()` function "10" times with arbitrary id and value from "Node1"
713
        Specification: src/specs/01_basic/public_smart_contract_event.spec:28
714
        Error Message: java.lang.RuntimeException: Error processing transaction request: already known
715
        Stacktrace: 
716
        org.web3j.tx.TransactionManager.processResponse(TransactionManager.java:176)
717
        org.web3j.tx.TransactionManager.executeTransaction(TransactionManager.java:81)
718
        org.web3j.tx.ManagedTransaction.send(ManagedTransaction.java:128)
719
        org.web3j.tx.Contract.executeTransaction(Contract.java:367)
720
        org.web3j.tx.Contract.executeTransaction(Contract.java:350)
721
        org.web3j.tx.Contract.executeTransaction(Contract.java:344)
722
        org.web3j.tx.Contract.lambda$executeRemoteCallTransaction$4(Contract.java:415)
723
        org.web3j.protocol.core.RemoteCall.send(RemoteCall.java:42)
724
        io.reactivex.internal.operators.flowable.FlowableFromCallable.subscribeActual(FlowableFromCallable.java:39)
725
        io.reactivex.Flowable.subscribe(Flowable.java:14935)
726
        io.reactivex.Flowable.subscribe(Flowable.java:14882)
727
        io.reactivex.internal.operators.observable.ObservableFromPublisher.subscribeActual(ObservableFromPublisher.java:31)
728
        io.reactivex.Observable.subscribe(Observable.java:12284)
729
        io.reactivex.internal.operators.observable.ObservableScalarXMap$ScalarXMapObservable.subscribeActual(ObservableScalarXMap.java:166)
730
        io.reactivex.Observable.subscribe(Observable.java:12284)
731
        io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
732
        io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
733
        io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
734
        java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
735
        java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
736
        java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
737
        java.base/java.lang.Thread.run(Thread.java:832)
738
        com.quorum.gauge.core.AbstractSpecImplementation$1$1.run(AbstractSpecImplementation.java:201)
739
        

Can we send private transaction with out data field?

In file
https://github.com/jpmorganchase/quorum-acceptance-tests/blob/master/functional-tests/acceptance-test/private_txn_test.js

Saw this line:
var txHash = await eth.sendTransaction({from:fromAcct,to:toAcct,value:amount, privateFor:[constellationId]})

When I try to test the same like below:

jsonrpc: '2.0', id: 4, method: 'bxm_sendTransaction', params: [ { from: '0x4995df9035398fa42685a3ecb595f472002263b4', to: '0x0e53b32bc0bb62742678d6c3997a672d55c3b748', value: '0x0', privateFor: [Array], gasPrice: '0x0' } ] }

I get following error

10:05:32 [WARN] Failed to decode '/send' (POST) request: Error in $.payload: base64: input: invalid length

What is expected if we send value 0 in private transaction without data field?
What is expected if we send the value like 10 in private transaction without data field?

Based on this issue,
For any value (either 0 or some value) transfee private transaction, the error message "ether value is not supported for private transactions" should be thrown.

update solc version

Right now, solc is on version 0.5.5.
An update on solc breaks some unit tests on gas estimation. So it would require an update on the tests as well.

evoked in #93

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.