Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neb rpc service receive same transaction again lead to failed to push a tx into tx pool duplicated transaction #56

Closed
dreamflyfengzi opened this issue Feb 3, 2018 · 0 comments
Assignees

Comments

@dreamflyfengzi
Copy link
Contributor

Description

when send one transaction to one rpc neb service, the neb rpc service will receive the same transaction message again .

Error Log

msg="Failed to push a tx into tx pool." err="duplicated transaction" file=asm_amd64.s func=runtime.goexit goroutine=16 line=2338 messageType=newtx transaction="{"chainID":1001, "hash":"cc29e71ce53682be97663f2fbcc57490b9b2ac355828b46604576c06c30a63fe", "from":"e81f56a0bccf6500c8458abfa79b4287715d74edc59c2ad9", "to":"bbb213b48cf7554885177ad889c92be409e4ab08595273ab", "nonce":171, "value":"1", "timestamp":1517024148, "gasprice": "1000000", "gaslimit":"20000", "type":"binary"}"

Cause analysis

in p2p stream ,when neb node received other node msg, it will add the message (node.pid+message.hash) to bloom filter. it avoid to send parent node again.
But when the first node send one message to second node, the second node send the same message to the third node , the third node may send the same message to the first node。

the msg send routing path

A--> B --> C --> A

Solution

the firs solution : When send message to other node , add the messages to bloom filter , it avoid to filter message not to push the pool, but not avoid to receive again

the second solution : avoid send A again A--> B --> C -XX-> A , every node shoud record all all the received the same message nodes.

We will fix the bug later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants