dcrdex icon indicating copy to clipboard operation
dcrdex copied to clipboard

test/dcr: Add `--rejectnonstd` flag to dcrd simnet harness.

Open JoeGruffins opened this issue 4 years ago • 1 comments

Good stuff, but oh boy did this give the user a hell of a foot-gun, especially with Decred where a non-final txn like the refund can enter mempool before locktime to wait for mining

Ah, I forgot that this is because only on Decred's mainnet are non-standard transactions blocked from entering mempool or being relayed! Only on testnet and simnet should this be a problem. And it should help use test out the edge cases.

https://github.com/decred/dcrd/blob/2e8efe15a335f654ccacbef23ae8616181ae20a3/internal/mempool/mempool.go#L1307-L1312

We might consider running our dcrd harness with --rejectnonstd to match mainnet. Needs some thought.

https://github.com/decred/dcrd/blob/2e8efe15a335f654ccacbef23ae8616181ae20a3/internal/mempool/policy.go#L315-L319

Originally posted by @chappjc in https://github.com/decred/dcrdex/pull/1110#issuecomment-875102779

JoeGruffins avatar Jul 07 '21 02:07 JoeGruffins

On a related note, I suspect had we used --rejectnonstd with all networks, we would have been forced to reckon with the locktime expiry issue you fixed so efficiently in https://github.com/decred/dcrdex/pull/1099 and https://github.com/decred/dcrdex/pull/1058 much earlier.

chappjc avatar Jul 07 '21 02:07 chappjc