I've started with blockchain development, but I've not started formally with development, and I'm already experiencing problems.
I'm trying to go through the entire GoQuorum tutorial and I'm completely stuck in the private transactions part. I have to run these commands within the WSL2 bash:
cd smart_contracts/privacy
npm install
node scripts/private_tx.js
And I get:
myuser@MYDESKTOP:~/quorum-test/quorum-test-network/smart_contracts/privacy$ node scripts/private_tx.js
Creating contract...
Waiting for transaction to be mined ...
Getting contractAddress from txHash: {
blockHash: '0xc2dac2f765be4a67b7781faef6eb6d16bb468a1801f12963e66bf2c428aa25c8',
blockNumber: 39,
contractAddress: '0x00fFD3548725459255f1e78A61A07f1539Db0271',
cumulativeGasUsed: 0,
from: '0xf0e2db6c8dc6c681bb5d6ad121a107f300e9b2b5',
gasUsed: 0,
isPrivacyMarkerTransaction: false,
logs: [
{
address: '0x00fFD3548725459255f1e78A61A07f1539Db0271',
topics: [Array],
data: '0x000000000000000000000000f0e2db6c8dc6c681bb5d6ad121a107f300e9b2b5000000000000000000000000000000000000000000000000000000000000002f',
blockNumber: 39,
transactionHash: '0xacf67eabfbc546cf1a9f2b5b5dd8cb022186a94c673f40568dcc784ed84e767e',
transactionIndex: 0,
blockHash: '0xc2dac2f765be4a67b7781faef6eb6d16bb468a1801f12963e66bf2c428aa25c8',
logIndex: 0,
removed: false,
id: 'log_26713de8'
}
],
logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000002001000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
status: true,
to: null,
transactionHash: '0xacf67eabfbc546cf1a9f2b5b5dd8cb022186a94c673f40568dcc784ed84e767e',
transactionIndex: 0,
type: '0x0'
}
Address of transaction: 0x00fFD3548725459255f1e78A61A07f1539Db0271
Use the smart contracts 'get' function to read the contract's constructor initialized value ..
Member1 obtained value at deployed contract is: 47
Use the smart contracts 'set' function to update that value to 123 .. - from member1 to member3
Error: Returned error: method handler crashed
at Object.ErrorResponse (/home/myuser/quorum-test/quorum-test-network/smart_contracts/privacy/node_modules/web3-core-helpers/lib/errors.js:28:19)
at /home/myuser/quorum-test/quorum-test-network/smart_contracts/privacy/node_modules/web3-core-requestmanager/lib/index.js:302:36
at request.onreadystatechange (/home/myuser/quorum-test/quorum-test-network/smart_contracts/privacy/node_modules/web3-providers-http/lib/index.js:98:13)
at XMLHttpRequestEventTarget.dispatchEvent (/home/myuser/quorum-test/quorum-test-network/smart_contracts/privacy/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
at XMLHttpRequest._setReadyState (/home/myuser/quorum-test/quorum-test-network/smart_contracts/privacy/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
at XMLHttpRequest._onHttpResponseEnd (/home/myuser/quorum-test/quorum-test-network/smart_contracts/privacy/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14)
at IncomingMessage.<anonymous> (/home/myuser/quorum-test/quorum-test-network/smart_contracts/privacy/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
data: null
}
I'm just supposed to get:
node scripts/private_tx.js
The transaction hash is: 0x4d796b2ccac109fc54006105df44c519341696fa88e004ce5c614239cb9f92a2
Address of transaction: 0x695Baaf717370fcBb42aB45CD83C531C27D79eF1
Use the smart contracts 'get' function to read the contract's constructor initialized value ..
Member1 obtained value at deployed contract is: 47
Use the smart contracts 'set' function to update that value to 123 .. - from member1 to member3
Verify the private transaction is private by reading the value from all three members ..
Member1 obtained value at deployed contract is: 123
Member3 obtained value at deployed contract is: 123
Member2 obtained value at deployed contract is: undefined
I don't know how much (or which) info you need me to show you here. As I said I'm just starting with blockchain. Some questions that you'd have:
- Q: Why Quorum? R: Quorum's features fit perfectly with the project's requirement.
- Q: Why don't you just skip the private part? R: I tried, but I need the private feature in first place and in second place, the rest of the private transactions tutorial does not work if the transaction does not occur (it prompts things like the address is not found, for instance).
- Q: The GoQuorum tutorial says that you should configure docker to use 4-6GB of ram. Did you do it? R: Yes and here's the corresponding .wslconfig and I have 12 GB of RAM (maybe that's the reason it fails?).
# Settings apply across all Linux distros running on WSL 2
[wsl2]
# Limits VM memory to use no more than 6 GB, this can be set as whole numbers using GB or MB
memory=6GB
- Q: In the Loki logs is prompted "PrivateTransactionManager is not enabled". Are you sure that you enabled private transactions? R: Yes, I pressed Y to all when running the
npx quorum-dev-quickstartcommand.
And here the loki logs just in case:
2023-06-19 18:00:20.005
INFO [06-19|22:00:20.002] QBFT: handle PRE-PREPARE message address=0x93917cADBace5dFCE132B991732c6Cda9bcC5B8a
2023-06-19 18:00:16.238
WARN [06-19|22:00:16.014] Served eth_sendTransaction conn=172.16.239.1:58378 reqid=12 t="577.1µs" err="method handler crashed"
2023-06-19 18:00:16.238
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc/handler.go:222 +0x66
2023-06-19 18:00:16.238
created by github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc/handler.go:226 +0xc8
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc.func1(0xc0007d4480, 0xc0007915d8)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc/handler.go:139 +0x46
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc.(*handler).handleMsg.func1(0xc000da66c0)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc/handler.go:298 +0x1be
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc.(*handler).handleCallMsg(0xc0007d4480, 0xc000da66c0, 0xc0006388c0, 0x1b26b01)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc/handler.go:360 +0x317
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc.(*handler).handleCall(0xc0007d4480, 0xc000da66c0, 0xc0006388c0, 0x203000)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc/handler.go:416 +0xd9
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc.(*handler).runMethod(0xc0007d4480, 0x1b3ae80, 0xc000da66f0, 0xc0006388c0, 0xc000cc8c00, 0xc0007915f0, 0x1, 0x1, 0x1)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc/service.go:206 +0x2c5
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc.(*callback).call(0xc000cc8c00, 0x1b3ae80, 0xc000da6750, 0xc000e797b8, 0x13, 0xc0007915f0, 0x1, 0x1, 0x0, 0x0, ...)
2023-06-19 18:00:16.238
reflect/value.go:337 +0xb9
2023-06-19 18:00:16.238
reflect.Value.Call(0xc000c8c080, 0xc0007e3d18, 0x13, 0xc0012579f0, 0x3, 0x3, 0x30, 0x176c6c0, 0x16dd660)
2023-06-19 18:00:16.238
reflect/value.go:476 +0x8e7
2023-06-19 18:00:16.238
reflect.Value.call(0xc000c8c080, 0xc0007e3d18, 0x13, 0x18669f5, 0x4, 0xc0012579f0, 0x3, 0x3, 0xc001257a20, 0xc0007915f0, ...)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/internal/ethapi/api.go:2256 +0x30a
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/internal/ethapi.(*PublicTransactionPoolAPI).SendTransaction(0xc0004c9a40, 0x1b3ae80, 0xc000da6750, 0x0, 0x0, 0xc001446500, 0x1, 0x4, 0x0, 0x0, ...)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/internal/ethapi/api.go:3015 +0x36f
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/internal/ethapi.checkAndHandlePrivateTransaction(0x1b3ae80, 0xc000da6750, 0x1b5d398, 0xc00049b270, 0xc0015ba360, 0xc00062b380, 0x81c6c68d6cdbe2f0, 0xf307a121d16a5dbb, 0x3b5b2e900, 0xc40, ...)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/internal/ethapi/api.go:3045 +0x485
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/internal/ethapi.handlePrivateTransaction(0x1b3ae80, 0xc000da6750, 0x1b5d398, 0xc00049b270, 0xc0015ba360, 0xc00062b380, 0x81c6c68d6cdbe2f0, 0xf307a121d16a5dbb, 0x3b5b2e900, 0x0, ...)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/internal/ethapi/api.go:3099 +0xc5
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/internal/ethapi.handleNormalPrivateTransaction(0x1b3ae80, 0xc000da6750, 0x1b5d398, 0xc00049b270, 0xc0015ba360, 0xc001310090, 0x24, 0x24, 0xc00062b380, 0x81c6c68d6cdbe2f0, ...)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/internal/ethapi/api.go:3168 +0x19b
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/internal/ethapi.simulateExecutionForPE(0x1b3ae80, 0xc000da6750, 0x1b5d398, 0xc00049b270, 0x81c6c68d6cdbe2f0, 0xf307a121d16a5dbb, 0xb5b2e900, 0xc0015ba360, 0xc00062b380, 0xeded3b, ...)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/internal/ethapi/api.go:2219 +0x99a
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/internal/ethapi.runSimulation(0x1b3ae80, 0xc0015ba420, 0x1b5d398, 0xc00049b270, 0x81c6c68d6cdbe2f0, 0xf307a121d16a5dbb, 0x63746566b5b2e900, 0xc0015ba360, 0x0, 0x0, ...)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/core/vm/evm.go:359 +0x86e
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/core/vm.(*EVM).Call(0xc001348000, 0x1b15f40, 0xc000e79920, 0xd2a460f4ccf9fe38, 0xfb9d7abf7e32f896, 0x95713d9, 0xc001310090, 0x24, 0x24, 0x24a22, ...)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/core/vm/evm.go:112 +0x252
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/core/vm.run(0xc001348000, 0xc00062b500, 0xc001310090, 0x24, 0x24, 0xb63f712bfc140f00, 0x0, 0x0, 0x0, 0x0, ...)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/core/vm/interpreter.go:275 +0x8c7
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/core/vm.(*EVMInterpreter).Run(0xc001332900, 0xc00062b500, 0xc001310090, 0x24, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/core/vm/operations_acl.go:66 +0x9ec
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/core/vm.gasSStoreEIP2929(0xc001348000, 0xc00062b500, 0xc001034db0, 0xc001513580, 0x0, 0x0, 0x0, 0x0)
2023-06-19 18:00:16.238
runtime/panic.go:965 +0x1b9
2023-06-19 18:00:16.238
panic(0x15bcfc0, 0x1aeb940)
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc/service.go:200 +0xbd
2023-06-19 18:00:16.238
github.com/ethereum/go-ethereum/rpc.(*callback).call.func1(0xc000e797b8, 0x13, 0xc001207d30)
2023-06-19 18:00:16.238
goroutine 3811 [running]:
2023-06-19 18:00:16.238
ERROR[06-19|22:00:16.014] RPC method eth_sendTransaction crashed: impossible case: address was not present in access list during sstore op
2023-06-19 18:00:15.658
WARN [06-19|22:00:15.656] Served eth_getQuorumPayload conn=172.16.239.55:53924 reqid=65560 t="33µs" err="PrivateTransactionManager is not enabled"
There's a bug posted in the quorum GitHub.
It seems that downgrading to 0.1.2 is a workaround.