in Education by
I am actually learning smart contract programming on ethereum and I work with truffle. Right now I am making this tutorial here: https://truffleframework.com/tutorials/building-dapps-for-quorum-private-enterprise-blockchains Where you learn how to create a dapp with quorum. But now I have a problem. I did everything exactly as described, but when I do: truffle migrate I get this error here: $ truffle migrate ⚠️ Important ⚠️ If you're using an HDWalletProvider, it must be Web3 1.0 enabled or your migration will hang. Starting migrations... ====================== > Network name: 'development' > Network id: 10 > Block gas limit: 3758096384 1_initial_migration.js ====================== Deploying 'Migrations' ---------------------- > transaction hash: 0x0a55cd010bb30247c3ae303e54be8dd13177b520af5967728cf77e07ca9efe76 - Blocks: 0 Seconds: 0 > Blocks: 0 Seconds: 0 > contract address: 0x1932c48b2bF8102Ba33B4A6B545C32236e342f34 > account: 0xed9d02e382b34818e88B88a309c7fe71E65f419d > balance: 1000000000 > gas used: 245462 > gas price: 0 gwei > value sent: 0 ETH > total cost: 0 ETH - Saving migration to chain. Error: Number can only safely store up to 53 bits at assert (C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\number-to-bn\~\bn.js\lib\bn.js:6:1) at BN.toNumber (C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\number-to-bn\~\bn.js\lib\bn.js:506:1) at Object.hexToNumber (C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3-utils\src\utils.js:234:1) at Method.outputBlockFormatter [as outputFormatter] (C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3-eth\~\web3-core-helpers\src\formatters.js:239:1) at Method.formatOutput (C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3-eth\~\web3-core-method\src\index.js:163:1) at sendTxCallback (C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3-eth\~\web3-core-method\src\index.js:473:1) at C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3-core-requestmanager\src\index.js:147:1 at C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-migrate\index.js:145:1 at C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-provider\wrapper.js:112:1 at XMLHttpRequest.request.onreadystatechange (C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3-providers-http\src\index.js:96:1) at XMLHttpRequestEventTarget.dispatchEvent (C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2-cookies\dist\xml-http-request-event-target.js:34:1) at XMLHttpRequest._setReadyState (C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2-cookies\dist\xml-http-request.js:208:1) at XMLHttpRequest._onHttpResponseEnd (C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2-cookies\dist\xml-http-request.js:318:1) at IncomingMessage. (C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2-cookies\dist\xml-http-request.js:289:47) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) Truffle v5.0.1 (core: 5.0.1) Node v8.11.4 Now I don't know why... Does anyone have the same problem and can help me out here? This is my Smart Contract: pragma solidity ^0.4.17; contract SimpleStorage { uint public storedData; constructor(uint initVal) public { storedData = initVal; } function set(uint x) public { storedData = x; } function get() view public returns (uint retVal) { return storedData; } } And my truffle-config.js file: module.exports = { networks: { development: { host: "127.0.0.1", port: 22000, // was 8545 network_id: "*", // Match any network id gasPrice: 0, gas: 4500000 }, nodefour: { host: "127.0.0.1", port: 22003, network_id: "*", // Match any network id gasPrice: 0, gas: 4500000 }, nodeseven: { host: "127.0.0.1", port: 22006, network_id: "*", // Match any network id gasPrice: 0, gas: 4500000 } }, // Set default mocha options here, use special reporters etc. mocha: { // timeout: 100000 }, // Configure your compilers compilers: { solc: { version: "0.4.25", // Fetch exact version from solc-bin (default: truffle's version) } } } And the migration file: var SimpleStorage = artifacts.require("SimpleStorage"); module.exports = function(deployer) { // Pass 42 to the contract as the first constructor parameter deployer.deploy(SimpleStorage, 2, { privateFor: ["ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc="] }) }; JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
So the problem was that the Block Timestamp was in Nanoseconds. @edgraaff wrote a Proxy who converts the Timestamp from Nanoseconds to Seconds. You can find the code here -> https://github.com/edgraaff/quorum-rpc-proxy What I had to do is to clone the proxy and change the config.js file to: module.exports = { rpcUrl: 'http://localhost:22000', port: 7545 }; And in the truffle-config.js file i had to change the port. Here's the code: module.exports = { networks: { development: { host: "127.0.0.1", port: 7545, // was 8545 network_id: "*", // Match any network id gasPrice: 0, gas: 4500000 }, nodefour: { host: "127.0.0.1", port: 22003, network_id: "*", // Match any network id gasPrice: 0, gas: 4500000 }, nodeseven: { host: "127.0.0.1", port: 22006, network_id: "*", // Match any network id gasPrice: 0, gas: 4500000 } }, // Set default mocha options here, use special reporters etc. mocha: { // timeout: 100000 }, // Configure your compilers compilers: { solc: { version: "0.4.25", // Fetch exact version from solc-bin (default: truffle's version) } } } Thanks to @edgraaff

Related questions

0 votes
    Why is it necessary to safely store the pathogens of a disease against which vaccines are to be ... ,Science proposed by,electromagnetic theory engineering physics,Science nptel...
asked Nov 7, 2021 in Education by JackTerrance
0 votes
    Suppose you have three Jobs of which Jobs 1 and 2 are executed parallelly. Job 3 executes only after Jobs 1 and ... can be used to set this up? tUnite tPostJob tRunJob tParallelize...
asked Mar 24, 2021 in Technology by JackTerrance
0 votes
    Ethereum is a digital currency. A. True B. False...
asked Nov 30, 2022 in Education by JackTerrance
0 votes
    How can I check the file going to be written exists in the directory, and if not , How can I create directory ... " flag for the same? Select the correct answer from above options...
asked Jan 21, 2022 in Education by JackTerrance
0 votes
    How can I safely create a nested directory?...
asked Jan 9, 2021 in Technology by JackTerrance
0 votes
    Given L = number of bits in the packet, a = average rate and R = transmission rate. The Traffic intensity in the network is given by ____________ A. La/R B. LR/a C. R/La D. Ra/L...
asked Jan 8, 2023 in Technology by JackTerrance
0 votes
    If there are N routers from source to destination, the total end to end delay in sending packet P(L-> number of bits in the packet R-> ... N B. (N*L)/R C. (2N*L)/R D. L/R...
asked Jan 6, 2023 in Technology by JackTerrance
0 votes
    Which of these method is used to calculate number of bits required to hold the BitSet object? (a) size( ... Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    If page size of 1MB memory is 1 KB then the number of higher order bits of address bus used to denote page number is ( ... (c) 12 (d) 9 Select the correct answer from above options...
asked Dec 17, 2021 in Education by JackTerrance
0 votes
    Which of these method is used to calculate number of bits required to hold the BitSet object? (a) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    I am trying to start a local Kubernetes cluster using minikube start and getting the following error. Starting local ... this slow? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    Chapattis made from wheat only swell up but bread becomes spongy, soft and easy to digest. Why is ... ,Science proposed by,electromagnetic theory engineering physics,Science nptel...
asked Nov 7, 2021 in Education by JackTerrance
0 votes
    I want to upgrade my Amazon EC2 micro (t1.micro) instance to large. Please help. Select the correct answer from above options...
asked Jan 25, 2022 in Education by JackTerrance
0 votes
    In Azure, I have a small app deployed: https://jsnamespace.azurewebsites.net/. In localhost, it works ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 12, 2022 in Education by JackTerrance
...