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

loadbot/zec: Avoid using the same outputs. #1693

Merged
merged 1 commit into from
Jul 8, 2022

Conversation

JoeGruffins
Copy link
Member

@JoeGruffins JoeGruffins commented Jul 1, 2022

zec will complain about double spends if sendtoaddress is used too soon
after mining a block. Use a mutex to make sure we always wait a second
after mining to send.

closes #1683

"lotSize": 100000000,
"lotSize": 1000000,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brought down just to conserve funds.

@JoeGruffins JoeGruffins force-pushed the fixzecloadbot branch 2 times, most recently from 1893695 to 1137d32 Compare July 4, 2022 04:31
@JoeGruffins
Copy link
Member Author

Just rebased.

@JoeGruffins
Copy link
Member Author

Thanks to input from @buck54321 I was able to make this more correct. We just need wait a second after mining a block.

Related: zcash/zcash#6045

Changes: https://github.com/decred/dcrdex/compare/1137d3212506244d8e67601dc663ecf37ef20005..7633edfa1eea95a3cc09a50ccd6d84942d5b2f4f

@JoeGruffins
Copy link
Member Author

I had not noticed before, but eth is adding quotes to addrs it seems, which prevents sending back excess https://github.com/decred/dcrdex/compare/7633edfa1eea95a3cc09a50ccd6d84942d5b2f4f..b524479bc7e5a22d1e016828a3998b09630cc51b

Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Maybe a comment on the new mutex that doesn't clearly guard a field, but hopefully that goes away soon anyway.

dex/testing/loadbot/loadbot.go Outdated Show resolved Hide resolved
dex/testing/loadbot/loadbot.go Outdated Show resolved Hide resolved
@JoeGruffins
Copy link
Member Author

Just rebased.

@JoeGruffins
Copy link
Member Author

Hmm, first time to see this 2022-07-07 13:31:34.113 [CRT] MANTLE:CMPD:STACKER:0: Trade error (limit order, sell = true, qty = 5000000, rate = 762000): new order request with DEX server 127.0.0.1:17273 market zec_btc failed: rpc error: error code 36: fee rate for {txid = be0c9bacf6d1d5f1857f0bb088ca5d9ecb080932a26caf0c6ada866ad4d89d03, vout = 1} is too low. 1 < 9

@JoeGruffins
Copy link
Member Author

Also see 2022-07-07 13:24:04.085 [CRT] MANTLE:CMPD:STACKER:0: Trade error (limit order, sell = true, qty = 3000000, rate = 675000): FundOrder error for zec, funding quantity 3000000 (3 lots): insufficient funds. 0.03 requested, 0.0248358 available which may be related to sending with a delay now...

zec will complain about double spends if sendtoaddress is used too soon
after mining a block. Use a mutex to make sure we always wait a second
after mining to send.
@chappjc
Copy link
Member

chappjc commented Jul 8, 2022

OK, hopefully this is fixed upstream soon.

@chappjc chappjc merged commit 3a0ffcb into decred:master Jul 8, 2022
@chappjc chappjc added this to the 0.5 milestone Aug 26, 2022
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

Successfully merging this pull request may close these issues.

loadbot/zec: Transactions rejected.
2 participants