I have been testing my dapp over rinkeby network, after about 2 months it began to be very slow when asking information to the blockchain. so we decide to change to ropsten network, where we saw it was working as it should, our opinion was there was a problem with rinkeby network. Today we decide to go to mainnet, after everything was working on ropsten. But looks like when our site tries to read the blockchain looking for events is taking loooon time, som pages can take about 3 minutes to get 5 tx from blockchain. you can see the website cryptogol.io Any idea where can we look at?

Thank you

  • If you are truly just reading data it should be super fast as the data should come directly from your own node without interaction with the blockchain. – Lauri Peltonen Sep 4 '18 at 5:38
  • Can you share some code where you are querying for events? Are you looking to query all blocks, or only new blocks? – Shawn Tabrizi Sep 4 '18 at 5:38
  • listenForEvents: function() { App.contracts.KickerADN.deployed().then(function(instance) { instance.AdnCreated({}, { fromBlock: 0, toBlock: 'latest' }).watch(function(error, event) { console.log(event) App.loadBody(event.args._adn.toNumber()); }); }); – Gustavo Alvarez Sep 4 '18 at 6:31
  • Events before your contract deployment may not be important to your application, you can set 'from' to the block in which you deployed the contract, this will speed things. – Jaime Sep 4 '18 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.