Coder Social home page Coder Social logo

Comments (21)

D-Nice avatar D-Nice commented on June 27, 2024

Hi @mandritac

Can you share which flags you're running the ethereum-bridge with? Please add the --dev flag if testing it with ganache/testrpc.

from ethereum-bridge.

mandritac avatar mandritac commented on June 27, 2024

Hi,

node bridge -H ip:rpc_port --broadcast --instance oracle_instance_20180507T175817.json

Using the above command and no I am neither using ganache/testrpc. I am directly connecting the ethereum-bridge to our private blockchain network. For testing I have used truffle.

Thanks.

from ethereum-bridge.

D-Nice avatar D-Nice commented on June 27, 2024

Could you try the 2018_3_updates branch, and verify if same issue occurs there? Most of our production env uses that branch, and we haven't seen the issue you mention in a while with that branch. Would be useful to confirm if it's indeed fixed there, or if we need to investigate it more.

from ethereum-bridge.

mandritac avatar mandritac commented on June 27, 2024

Hi,
Ok I'll test and update you on this.

Thanks,

from ethereum-bridge.

mandritac avatar mandritac commented on June 27, 2024

Hi,

No when I tried installing "2018_3_updates" it didn't work even once i.e; the Queries and callback files are not getting updated with any contents. I tried deleting the files, restarting the bridge but it didn't help.

Thanks.

from ethereum-bridge.

D-Nice avatar D-Nice commented on June 27, 2024

can you try deleting node_modules folder, and install the dependencies using yarn instead, it should give you a more deterministic dep tree.

from ethereum-bridge.

mandritac avatar mandritac commented on June 27, 2024

Hi,

No it is not working even after using yarn to install the dependencies. Strangely it did work when I had freshly installed ethereum bridge using npm only, but now it is not working at all. Can any other log be enabled to check why it is not writing anything in Queries and callback files under tingodb?

I have attached some additional files/logs
AttachedFiles.zip
from my system for your reference.
Thanks.

from ethereum-bridge.

mandritac avatar mandritac commented on June 27, 2024

Also I am uploading the contract file used for testing the setup and I am using truffle to test with the following commands -

var poe = TestOraclizeCall.at(TestOraclizeCall.address)
poe.update(400000,{gas:4712388,from: web3.eth.accounts[0]}) // for first oraclize call
poe.update(400000,{gas:4712388,from: web3.eth.accounts[0],value:web3.toWei(0.10, "ether")})//for any subsequent calls

Thanks.
TestOraclizeCall.zip

from ethereum-bridge.

D-Nice avatar D-Nice commented on June 27, 2024

Thanks, we'll take a look

from ethereum-bridge.

D-Nice avatar D-Nice commented on June 27, 2024

I've just tested your code, and it works fine on my end, using the ethereum-bridge on npm. Added a res storage variable to save the result:

truffle(development)> TestOraclizeCall.deployed().then(x => x.res.call())
'7063.51'

I followed the calls you used. The first call will fail to create a query, because using a gas limit greater than the default 200k, will not be free, and no value was sent. I haven't been able to pinpoint anything too unusual in your logs, except make sure that your node is sync'd and not syncing. It could be node issues. Best way to eliminate that as an issue is to try with ganache/testrpc.

Here was the setup I used:
Truffle v4.1.3 (I recommend using this version, later versions appear to have incompatibilities, probably due to solc issues)
Ganache CLI v7.0.0-beta.0 (ganache-core: 3.0.0-beta.0)
ethereum-bridge - version: 0.6.0-beta

The most important one to match is probably truffle, the other one's are quite stable comparatively.

from ethereum-bridge.

mandritac avatar mandritac commented on June 27, 2024

Hi,
I can't use testrpc for this purpose. You mentioned about some node sync issue, how can that be checked?
I was also wondering how come it was working properly and suddenly stopped working? Definitely then this can be node sync issue. Can you please share more details on how to debug the node sync issue?

Thanks.

from ethereum-bridge.

D-Nice avatar D-Nice commented on June 27, 2024

First, ensure your node is fully sync'd to your network, should be possible with the following web3 call: https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethissyncing or direct RPC call.

I understand if you can't use testrpc for this purpose, but can you at least do a test-run with it, that way we can eliminate it down to the node being the issue, as I can confirm all the parts should work, and your code as is, is fine.

from ethereum-bridge.

mandritac avatar mandritac commented on June 27, 2024

Hi,
It worked partially with testrpc, partially in the sense callback of the result failed. I used - EthereumJS TestRPC v6.0.3 (ganache-core: 2.0.2),not the testrpc you recommended since I had that version already installed. One more point though the private network I have setup doesn't have any peers connected to it. It is running standalone.

Thanks.

from ethereum-bridge.

mandritac avatar mandritac commented on June 27, 2024

Hi,
After testing with rpc it again started with my private network also, so I guess this is not a node issue at all. The files in tingodb are getting updated again.

Thanks.

from ethereum-bridge.

mandritac avatar mandritac commented on June 27, 2024

Hi,

Currently on ethereum-bridge the query is posted and it is also sending the callback but the function _callback(..) is never called, so the contract is not receiving the callback result from Oraclize.

Thanks.

from ethereum-bridge.

D-Nice avatar D-Nice commented on June 27, 2024

@mandritac Thanks for updating, but I'm unable to reproduce your issues. I have tried your code, and the callback did indeed work fine. How do you know the __callback is never called? I recommend adding a storage variable that gets written when it's called, and that way you can check if it indeed was or wasn't, as I had above.

from ethereum-bridge.

mandritac avatar mandritac commented on June 27, 2024

Hi,

I can confirm that callback is not fired in the smart contract because from that method I have an event generated and that event is not emitted. However I must state here that it was working earlier prior to all these issues. But now even though ethereum-bridge is sending back the callback, the event is not getting generated from the _callback function. Will try using state variables as suggested by you.

Thanks.

from ethereum-bridge.

mandritac avatar mandritac commented on June 27, 2024

Hi,

This is my observation after several rounds of testing and making some modifications in contract code.

  • The Oraclize callback function call was failing because I was not mentioning enough gas limit in the query call. Hence though ethereum bridge was returning the callback and the transaction was mining in the ethereum node, still the transaction was getting rejected due to inadequate gas limit mentioned.

  • Though I have given a very high limit value I am not sure how to set optimal value for the callback function since every time the query response will return a different value. So is there any way to estimate gas limit of functions with dynamic data?.

  • Also at contract level I have made some changes like added custom gas price for the query and have set both TLS and IPFS to reduce gas cost on callback.

  • Also when the callback transactions got rejected then only this tingodb somehow stops getting updated. Currently I am not facing the issue that the files are not getting updated.

Thanks.

from ethereum-bridge.

D-Nice avatar D-Nice commented on June 27, 2024

Thanks for the update on this.
Yes, I see in your code you were in fact just requesting a raw TLSNotary, which can be very large depending on the endpoint you're hitting, hence why we provide the IPFS storage option, to store it on there and instead just get a consistent size IPFS multihash.

from ethereum-bridge.

edhyfito avatar edhyfito commented on June 27, 2024

Hi admin

from ethereum-bridge.

xuesu avatar xuesu commented on June 27, 2024

hi, my bridge was running well but suddenly it showed the following msgs and exited

[2019-07-06T05:06:38.885Z] INFO Listening @ 0x20348ad874c25ad33f7a5895a5603e01e5dd8396 (Oraclize Connector)

(Ctrl+C to exit)

[2019-07-06T05:06:39.651Z] INFO fetching pending queries from database with oar: 0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475 and callback address: 0x030b5402340fd5282ddbec37c75bf910071fe0f7
[2019-07-06T05:06:39.682Z] INFO found a total of 0 pending queries
Error: CONNECTION ERROR: Couldn't connect to node http://localhost:8545.
    at Object.InvalidConnection (C:\Users\Iris\go\bin\ethereum-bridge\node_modules\web3\lib\web3\errors.js:31:16)
    at HttpProvider.send (C:\Users\Iris\go\bin\ethereum-bridge\node_modules\web3\lib\web3\httpprovider.js:94:18)
    at RequestManager.send (C:\Users\Iris\go\bin\ethereum-bridge\node_modules\web3\lib\web3\requestmanager.js:58:32)
    at Object.send [as uninstallFilter] (C:\Users\Iris\go\bin\ethereum-bridge\node_modules\web3\lib\web3\method.js:145:58)
    at Filter.stopWatching (C:\Users\Iris\go\bin\ethereum-bridge\node_modules\web3\lib\web3\filter.js:209:36)
    at C:\Users\Iris\go\bin\ethereum-bridge\lib\bridge-log-manager.js:59:67
    at Object.callback (C:\Users\Iris\go\bin\ethereum-bridge\node_modules\web3\lib\web3\filter.js:225:21)
    at C:\Users\Iris\go\bin\ethereum-bridge\node_modules\web3\lib\web3\method.js:142:25
    at C:\Users\Iris\go\bin\ethereum-bridge\node_modules\web3\lib\web3\requestmanager.js:89:9
    at XMLHttpRequest.request.onreadystatechange (C:\Users\Iris\go\bin\ethereum-bridge\node_modules\web3\lib\web3\httpprovider.js:129:7)
    at XMLHttpRequestEventTarget.dispatchEvent (C:\Users\Iris\go\bin\ethereum-bridge\node_modules\xhr2-cookies\dist\xml-http-request-event-target.js:34:22)
    at XMLHttpRequest._setReadyState (C:\Users\Iris\go\bin\ethereum-bridge\node_modules\xhr2-cookies\dist\xml-http-request.js:208:14)
    at XMLHttpRequest._onHttpResponseEnd (C:\Users\Iris\go\bin\ethereum-bridge\node_modules\xhr2-cookies\dist\xml-http-request.js:318:14)
    at IncomingMessage.<anonymous> (C:\Users\Iris\go\bin\ethereum-bridge\node_modules\xhr2-cookies\dist\xml-http-request.js:289:61)
    at IncomingMessage.emit (events.js:194:15)
    at endReadableNT (_stream_readable.js:1125:12)

Please wait...
fs.js:114
    throw err;
    ^

Error: ENOENT: no such file or directory, open 'C:\Users\Iris\go\bin\ethereum-bridge\config\instance\latest'
    at Object.openSync (fs.js:438:3)
    at Object.readFileSync (fs.js:343:35)
    at process.<anonymous> (C:\Users\Iris\go\bin\ethereum-bridge\bridge.js:1274:44)
    at process.emit (events.js:189:13)
    at process.exit (internal/process/per_thread.js:168:15)
    at process.removeAllLogs (C:\Users\Iris\go\bin\ethereum-bridge\lib\bridge-log-manager.js:154:18)
    at process.emit (events.js:189:13)
    at process._fatalException (internal/bootstrap/node.js:496:27)

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.