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: Add live price oracles. #2420

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Conversation

JoeGruffins
Copy link
Member

depends on #2409
part of #2303

Add a boolean livemidgap that allows loadbot start with a live rate
based on mainnet coin USD values. This also alters ts to keep the midgap
close to live rates rather than random values.

Copy link
Member

@buck54321 buck54321 left a comment

Choose a reason for hiding this comment

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

Trying to run on dcr_btc with a fresh harness and --livemidgap fails during wallet setup with insufficient balance error from the BTC harness. It's trying to do

./alpha sendtoaddress bcrt1qwxyzjuudj89jn7jqv0aqjhd27758fcqwqysk8n 13819690.57521300

That's most of the Bitcoin supply, which seems, ... excessive.

@buck54321 buck54321 mentioned this pull request Sep 14, 2023
@JoeGruffins
Copy link
Member Author

Trying to run on dcr_btc

Ok, will look into it. I have been testing on btc_eth because the dcr bots seem to freeze the dcr harness regularly for me. It was incorrect not to test dcr_btc as well, regardless.

@JoeGruffins JoeGruffins force-pushed the loadbotoracles branch 2 times, most recently from 84e6b49 to ff67113 Compare September 20, 2023 11:53
@JoeGruffins
Copy link
Member Author

JoeGruffins commented Sep 20, 2023

I think this fixes it https://github.com/decred/dcrdex/compare/84e6b4958cf05a5cc99b8763e2139f33f6fa2180..ff67113063d00e6759bf2ba1e28c56fca691f4f8

usd/dcr / usd/btc == usd/dcr * btc/usd == btc/dcr or quote/base for dcr_btc market

dex/testing/loadbot/loadbot.go Outdated Show resolved Hide resolved
dex/testing/loadbot/loadbot.go Outdated Show resolved Hide resolved
Comment on lines 125 to 139
"dd93b447f7eBCA361805eBe056259853F3912E04": {
"balance": "110000000000000000000000"
},
"1D4F2ee206474B136Af4868B887C7b166693c194": {
"balance": "110000000000000000000000"
},
"946dfaB1AD7caCFeF77dE70ea68819a30acD4577": {
"balance": "110000000000000000000000"
},
"3e983c7e08d22CaB842Bd54111087E09C578b3c3": {
"balance": "110000000000000000000000"
},
"653445e4C2f48B370fE10e59940E5e9Cb853D03F": {
"balance": "110000000000000000000000"
Copy link
Member

Choose a reason for hiding this comment

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

What's the deal with these again? They derive from a seed used in testing somewhere? Why not just give it all to alpha and request as needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

At least two are from the simnet testing program and I believe the other are the harness nodes. Sure can give all to alpha and send if that's less confusing. I should have commented better here either way.

@JoeGruffins JoeGruffins force-pushed the loadbotoracles branch 2 times, most recently from b63f7b2 to 3242a5c Compare October 4, 2023 06:14
@JoeGruffins
Copy link
Member Author

I can't figure out what they all are. The simnet tests look ok as far as funding goes https://github.com/decred/dcrdex/compare/b63f7b29d2b20119b7c199c34e969e4781640da3..3242a5c95a8098fc6691805770daf794be591b97

However, it seems the the nodeclient_harness_test.go tests in client/assets/eth are not passing due to unexpected balance differences.

Add a boolean livemidgap that allows loadbot start with a live rate
based on mainnet coin USD values. This also alters ts to keep the midgap
close to live rates rather than random values.
@JoeGruffins
Copy link
Member Author

JoeGruffins commented Oct 4, 2023

Tests are passing with the last change and --timeout=1h https://github.com/decred/dcrdex/compare/3242a5c95a8098fc6691805770daf794be591b97..ecbb0ac2e13410f10c3bb4a601a808f987469624

Also setting the harness to mine every 2 seconds rather than 15.

@buck54321
Copy link
Member

Also setting the harness to mine every 2 seconds rather than 15.

Can we not? What problem are we solving?

@buck54321
Copy link
Member

Also setting the harness to mine every 2 seconds rather than 15.

Can we not? What problem are we solving?

Actually, I don't even see where you've done this.

@JoeGruffins
Copy link
Member Author

Actually, I don't even see where you've done this.

Sorry, I meant while running those tests. I did not change for this pr.

@buck54321 buck54321 merged commit 597e154 into decred:master Oct 27, 2023
5 checks passed
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.

None yet

2 participants