Regtest does not reject dust transactions #98
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
Epic
good first issue
hacktoberfest
hard fork
help wanted
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
resilience
soft fork
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
work in progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbrycrd#98
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This transaction is rejected as being dust on lbrycrd_main:
while this regtest transaction is accepted:
This makes testing the transactions produced by lbryum difficult since the dust rules for the test environment do not match the live network.
I think we can change this. There are likely some unit tests that need to be changed because they use regtest rules.
Actually the dust amount should be the same regardless of whether its main net or reg test, the default dust amount 0.00001. You can set these variables manually so maybe its set somewhere either on the main net client or regtest client?
( set by -minrelaytxfee , can check it via ./lbrycrd-cli getinfo in the field relayfee )
If that looks good, it must be rejected for some other reason. Can you describe how you generated these transactions?
The accepted transaction done through regtest can be replicated by this integration test (message me on slack if you want help setting things up to run it):
https://github.com/lbryio/lbrytest/blob/master/tests/test_abandon.py#L20
As far as the real mainnet transaction, this was generated by @tzarebczan . See convo here: https://lbryians.slack.com/archives/C81K0BM9A/p1519158521000395
Please use this flag when running lbrycrdd in regtest mode : -acceptnonstdtxn=0
(run ./lbrycrdd -acceptnonstdtxn=0 )
Behavior is documented here: https://github.com/lbryio/lbrycrd/blob/master/src/init.cpp#L461
IsStandardTx is not used when running in regtest mode, thus dust transactions are not rejected. Using the above flag will enable the use of IsStandardTx and will reject dust transactions.