-
Notifications
You must be signed in to change notification settings - Fork 92
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
testing/loadbot: Add moving markets. #2409
Conversation
I am having a lot of trouble keeping the dcr market up while using bots. The harness freezes randomly and there's nothing to do. "something something already discreet mining". This is not a new problem and not sure the cause. So, testing on a btc/eth market mostly at the moment. |
Haven't reviewed yet, but I've been testing with oscillate, and it's working nicely! One thing I noticed is that it seems like it will only match orders on one side of the market for ~30 mins, then only the other side for ~30 mins. I think it would be more natural if even if it's trending in one direction, it would still ocassionally match orders in the other. Perhaps there could be a random number generated, and when the market is trending up, 75% of the time the bots would place a higher order and only 25% place a lower one, or something to that effect? Another helpful option would be to have it stay near a certain price an oscillate in a tighter range around that. This price could be either specified by the user, or it actual current market prices could be queried. This would be helpful because the bots actually use market prices in addition to looking at the order book to make decisions. |
18ef042
to
f597a06
Compare
Added three new settings for the sidestacker: "randomosc", "oscinterval", and "oscstep". I hope these can add enough control to get the kind of sideways market one may want. Watching |
Seems like theres a bit too many standing orders accumulating. Maybe should cancel more. |
ac561c6
to
19fc8fc
Compare
0c45ba0
to
6ae6d3e
Compare
@@ -13,17 +13,16 @@ import ( | |||
// runCompound runs the 'compound' program, consisting of 2 (5/3) unmetered | |||
// sideStackers, a 1-order sniper, and a pingPonger. | |||
func runCompound() { | |||
go blockEvery2() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--
because we have miners in tmux? Makes sense, but the doge and dgb harnesses are missing miner windows. I'll make a separate issue so it doesn't hold up this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the one block per 15 min should be sufficient. Leaving it to the harnesses so multiple bots can be run without over mining, especially since this seems to be where the dcr harness gets stuck, with mining calls happening concurrently.
I'll add, should only be a few lines each. Sorry for missing that, I assumed they all had miners now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dgb was turned off, I wonder if intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dgb was turned off, I wonder if intentional?
Don't recall. @dev-warrior777 is turning it back on in another PR it looks like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but dgb will never work very well for regtest mining until dgb 8.x series which is on RC2 right now and coming to RC3 soon I am assured.
For 8.x they have a new parameter for the daemon which addresses the regtest mining weakness specifically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh duh that's why I disabled it. I even talked to their devs about it. easypow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
easypow
correct
I tested it today doing many loops mining 100 blocks a time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, conflicts with @dev-warrior777 If that goes in first I will rebase over it.
87e98c8
to
3045223
Compare
Mostly attempting to clear up comments and variable names https://github.com/decred/dcrdex/compare/87e98c81397fc4aee1ef09ce5dcb4d5e35d54597..3045223166d7d081d99d47ee7538447ed183f401 |
d6a2f46
to
d746828
Compare
|
dex/testing/dgb/harness.sh
Outdated
|
||
# Background watch mining by default: | ||
# 'export NOMINER="1"' or uncomment this line to disable | ||
#NOMINER="1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per #2434, I think this has to be set for DGB since their release version cannot mine indefinitely in simnet and it ends up grinding CPU endlessly.
When running loadbot, we'll just have to start a miner manually. Maybe we can echo
something here as a reminder to the dev.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncommented and left a TODO
dex/testing/doge/harness.sh
Outdated
@@ -273,6 +277,8 @@ tmux send-keys -t $SESSION:0 C-c | |||
tmux send-keys -t $SESSION:1 C-c | |||
tmux send-keys -t $SESSION:2 C-c | |||
tmux send-keys -t $SESSION:3 C-c | |||
tmux send-keys -t $SESSION:4 C-c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tries to kill the quit
script itself. A few lines down it will remove the ctl session using tmux kill-session
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this ctrl-c.
d746828
to
950c02c
Compare
Apologies rebased onto master with those changes so cannot get a clean diff on github I think. Was two changes in the harnesses diff
|
Was my bad initially I guess ;-( |
Lets not |
950c02c
to
0b474b4
Compare
ts -> whale and making whale percent settable https://github.com/decred/dcrdex/compare/f81b00933a83673f709d4d24de30c9128d2f4836..4cfa8d20b831e4a3f440e1efd8b549e892b38dc9 |
4cfa8d2
to
83634d2
Compare
The sidestaker seems to be requesting way too much eth. Something doesn't look right. Investigating... |
83634d2
to
52e52eb
Compare
The first bot was suspended for something eventually...
Should do something to prevent this? |
..you are a Whale .. pay up out of the slush fund ;-) |
I guess setting bond target tier to 1 should keep us trading automatically? |
52e52eb
to
3cbca47
Compare
Now posting bond instead of registering, which should set the tier to 1 so it will automatically keep us un-banned. Right? https://github.com/decred/dcrdex/compare/52e52eba7fcb1a8e3cd49c87de89dc66842b21c8..3cbca47a8dd11f3d1279bbe7059912a6d3d47140 |
3cbca47
to
e49ef5c
Compare
Maybe better if the bots don't get banned for cancels, going to try to avoid canceling orders created one epoch ago. |
Hmm, starting the server does say:
|
We really shouldn't be using |
Thanks! I had the same changes waiting to go but was looking at the issue of the clients not remaining bonded. |
96352ac
to
7502d0f
Compare
Don't cancel orders within the last epoch https://github.com/decred/dcrdex/compare/96352ac9ea83daa86d0944f8d2d55d82da77be26..7502d0fa94756aa97498f13b77a3a15d6bdff677 |
@JoeGruffins could you please test on top of the newest version of #2449 and confirm that the bug is resolved. |
7502d0f
to
f9b2ef0
Compare
@buck54321 the "ghost orders" appear to be gone! |
Can rebase now that #2449 is in. Could also try removing |
f9b2ef0
to
b0ab65b
Compare
Add several tools to the loadbot to allow for sideways, trending, and volatile markets. Remove most mining as continuous mining is provided by the harnesses themselves, and this allows us to run multiple bots at once without excessive mining. To allow for sideways and trending markets, new options for the sidestacker can be used. These are a flat increase to the rate or an automatic oscillating effect. Volatile markets can be achieved by running the whale bot separately that randomly buys, or sells, large sums moving the market violently.
b0ab65b
to
21398e7
Compare
Rebased. Also turning off free cancels https://github.com/decred/dcrdex/compare/b0ab65b8f359efd3fdda70c97e127c0242ad195a..21398e76284b82259f5d60f862819547073bede6 |
part of #2303
Add several tools to the loadbot to allow for sideways, trending, and volatile markets. Remove most mining as continuous mining is provided by the harnesses themselves, and this allows us to run multiple bots at once without excessive mining.
To allow for sideways and trending markets, new options for the sidestacker can be used. These are a flat increase to the rate or an automatic oscillating effect. Volatile markets can be achieved by running the ts bot separately that randomly buys, or sells, large sums moving the market violently.
The sideways market after running a bit.