Giter Site home page Giter Site logo

Comments (10)

gskapka avatar gskapka commented on August 23, 2024

What address are you deploying your Oraclize-using contracts with?

from ethereum-bridge.

david179 avatar david179 commented on August 23, 2024

The Oracle contracts use the address 0x8668dc605fe8d721dbb96378fd8155c621bea37d while the Oraclize-using one uses 0xed2632f90f57dbbeb8e1d27277f4ef85a42851d2

from ethereum-bridge.

gskapka avatar gskapka commented on August 23, 2024

Is the first account in your keys.json file unlocked?

Are the nodes in your private network local to the same machine? And if so, are their ports (both eth & rpc) unique?

from ethereum-bridge.

david179 avatar david179 commented on August 23, 2024

I have been using the active mode and so ethereum-bridge uses the accounts that exist already and so I don't have a keys.json file in ethereum-bridge\config\instance. Yes the accounts are unlocked and nodes are local and ports are unique. Now for simplicity I have implemented everything in a single node with different accounts but I get the same behavior.

I have also tried to use the broadcast mode but that doesn't work for me. I get these errors:

ethereum-bridge -H localhost:47000 --broadcast --new
Please wait...
[2019-02-21T16:27:42.747Z] WARN keys.json not found, creating the new file D:\GitHub\ethereum-bridge\config\instance\keys.json
[2019-02-21T16:27:42.749Z] INFO you are running ethereum-bridge - version: 0.6.1
[2019-02-21T16:27:42.749Z] INFO saving logs to: ./bridge.log
Error: Error: Error: Keystore: Must include hdPathString in createVault inputs. Suggested alternatives are m/0'/0'/0' for previous lightwallet default, or m/44'/60'/0'/0 for BIP44 (used by Jaxx & MetaMask)
    at D:\GitHub\ethereum-bridge\bridge.js:201:22
    at D:\GitHub\ethereum-bridge\lib\bridge-util.js:39:21
    at Function.KeyStore.createVault (D:\GitHub\ethereum-bridge\node_modules\eth-lightwallet\lib\keystore.js:98:12)
    at Object.generateNewAddress (D:\GitHub\ethereum-bridge\lib\bridge-util.js:36:22)
    at Object.<anonymous> (D:\GitHub\ethereum-bridge\bridge.js:200:16)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:282:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)

Please wait...
D:\GitHub\ethereum-bridge\lib\blockchain-interface.js:32
  this.mainNode = config.node.main || '127.0.0.1:8545'
                         ^

TypeError: Cannot read property 'node' of undefined
    at BlockchainInterface [as constructor] (D:\GitHub\ethereum-bridge\lib\blockchain-interface.js:32:26)
    at singletonWrapper (D:\GitHub\ethereum-bridge\node_modules\pragma-singleton\PragmaSingleton.js:61:16)
    at process.removeAllLogs (D:\GitHub\ethereum-bridge\lib\bridge-log-manager.js:146:7)
    at process.emit (events.js:182:13)
    at process._fatalException (internal/bootstrap/node.js:493:27)

from ethereum-bridge.

D-Nice avatar D-Nice commented on August 23, 2024

Since you mentioned Remix, when deploying on Remix, is optimization turned on? Which would explain the gas difference, in which case, you may wish to deploy with more gas, as the simplest solution, or ensure the deployed contract is optimized.

In general, have you tried just increasing the gas of your deployment transaction to the maximum block gas limit?

from ethereum-bridge.

david179 avatar david179 commented on August 23, 2024

Yes I used optimization in Remix, but I think that the gas use should be the same also in my private network because I downloaded the bytecode and ABI from Remix.
To deploy the contract I used these calls and the gas is almost equal to the limit

var deploy = {from:eth.accounts[1],data:bytecode,gas:30000000};
var partial_instance = contract.new(deploy);

// after the block is mined
var contractInstance = contract.at(partial_instance.address);

I have tried to increase the gas also in the call contractInstance.getUTCTimestamp(0,{from:eth.accounts[0],value:2222222,gas:30000000}); .

Is it normal that gasPrice is greater than gas in eth.getTransaction("0x...");?

{
  blockHash: "0xc3f53900013e125467f6ae91ac1e9012e54957d10c3f275f90ffc8dc6f627355",
  blockNumber: 134,
  from: "0xcca64cfa53b898bb1042a42129631c0e8430c8cc",
  gas: 30000000,
  gasPrice: 20000000000,
  hash: "0x9e818bb90ce7b1b282fe93561fc29b505cc00a0d8ce17733f90cf62e32ce09d6",
  input: "0x673a7e28",
  nonce: 42,
  r: "0x3bc5c4c3175575dad1c78ee2c5bf85bbf842951ca0ddf344ba5a75c11fd9ff1c",
  s: "0x7ad1a034b31c2140168871cc9d033412c46bd81b5b3a3592d65c9afc5348bf47",
  to: "0xd67879bb759a9cd656164827ec2f955ff261b4da",
  transactionIndex: 0,
  v: "0x42",
  value: 2222222
}```

from ethereum-bridge.

D-Nice avatar D-Nice commented on August 23, 2024

Is it normal that gasPrice is greater than gas in eth.getTransaction("0x...");?

Yes, gasPrice should normally be within gigawei units, the default is normally 20 gwei and that is how the gas is priced. The block gas limit is 4-8M normally depending on setup (on your privatechain you have full control over the bounds of both technically).

Note, that if you used the JavascriptVM on Remix, it's not 1:1 with a real network.

from ethereum-bridge.

david179 avatar david179 commented on August 23, 2024

I have created a new blockchain with an higher gas limit. I increased it from 0x2100000 to 0x4100000000 but the problem persists. No matter how much gas I put in the calls to the Oracle using smart contract it is always used completely.

from ethereum-bridge.

D-Nice avatar D-Nice commented on August 23, 2024

Duplicate privatenet issue, refer to #73 (comment)

from ethereum-bridge.

IamChuancey avatar IamChuancey commented on August 23, 2024

The problem is solved in #73

from ethereum-bridge.

Related Issues (20)

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.