When I interact with my Dapp using Mist, my web3 client receives 100% of events that are broadcast.
When I interact with my Dapp using Metamask (which I love, great work guys!), ~1 in every ~10 is not picked up by my web3 client. I know 100% of the events have fired, because I can view the event in Mist/Wallet.
//solidity event
event LogResult(bytes32 indexed ID, address indexed PlayerAddress, uint indexed Number, uint Result, uint Value, int Status, bytes Proof);
//js
var resultEvent = myC.LogResult({PlayerAddress: web3.eth.defaultAccount}, {
fromBlock: 'latest'
});
resultEvent.watch(function (err, result) {
if (err) {
console.log(err)
return;
}
console.log(result);
});
Good catch! May not get to work on until Monday.
I wonder if these are small forks, missing blocks where events were included when the RPC switches to a new fork.
On Jan 20, 2017, at 11:47 PM, jambtt notifications@github.com wrote:
When I interact with my Dapp using Mist, my web3 client receives 100% of events that are broadcast.
When I interact with my Dapp using Metamask (which I love, great work guys!), I receive about 90% of events. 1 in every ~10 is not picked up by my web3 client. I know 100% of the events have fired, because I can view the log in Mist/Wallet.
//solidity event
event LogResult(address indexed PlayerAddress);//js
var resultEvent = myC.LogResult({PlayerAddress: web3.eth.defaultAccount}, {
fromBlock: 'latest'
});
resultEvent.watch(function (err, result) {
if (err) {
console.log(err)
return;
}
console.log(result);
});—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
I think this is bc our blockTracker tracks the latest block instead of incrementing since the last block it saw. This means we miss blocks when they are shorter than the polling period.
Is this something that can be resolved? If so, would you have a (rough) ETA?
this will be resolved over the next week ( provider-engine refactor )
Absolutely fantastic news. This allows me to make Metamask the recommended way to interact with our dapp.
This was fixed in [email protected], need to bump in metamask and publish
Most helpful comment
Absolutely fantastic news. This allows me to make Metamask the recommended way to interact with our dapp.