-
Notifications
You must be signed in to change notification settings - Fork 17
Conversation
I did this before, but it will lead to a problem. When the client sends a transaction, it will probably be packaged very quickly, then when the client call
|
Could you elaborate a bit on this issue and why your proposed code could fix this issue? Especially:
|
You are right, we can solve the problem by subscribing to the filter before sending the transaction. But in I will go to see the source code of |
But why would this be an issue with vechain but not with ethereum in general? Are the vechain blocks so much faster? |
I am using vechain's The correct way is to subscribe first, then send the transaction. But I can't assume that the user will do this. So every time I return to the current block (this is also wrong, I think it should be only the first time to return to the current block.). |
Including the first block will only delay the problem. If two blocks are mined nearly instantly (or network delays ...), the transaction won't be included either. |
Yes. So this is the
Should be subscribed first... I will think again about any better solution. If you have it, please let me know. |
We could store all transactions from This would ensure that:
|
When creating a filter, there are no parameters, so I don't know which transaction to match. |
Just all transactions? If multiple transactions are sent simultaneously, we cannot guarantee it. |
Or we could map them by the id they send with? This sounds like a good idea. |
The problem is that |
Every application should send a unique id with every request. We could then map each |
What you mean is to modify the interface like |
The web3-gear internal interface, yes. This would not change the user application nor the communication with thor. |
Changing |
But If do not change the user interface, how do I get the I look at the eth rpc interface, did not see id:
|
Look down to the examples listed under every command, there should always be a field "id" added. New block filter for example:
|
This |
Coul you test it in truffle if it is the same for a group of requests (i.e. same id for |
This id can't be obtained in the rpc method, it is used internally by json rpc. Within the rpc method, only |
I see the problem. I would say we implement the hack with the constructor including the previous block? Maybe with a flag to disable it? |
Or create an issue at truffle itself. |
But this not be an issue with ethereum, because when ethereum receives a transaction, there will be pow, so the transaction will not be packaged immediately. |
I think the current solution is to apply your changes first, but move block num forward one when constructing the BlockFilter. |
Fix
eth_getFilterChanges
to only include new hashes.