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

utility for running core harness tests #1632

Merged
merged 5 commits into from
Jun 11, 2022
Merged

Conversation

buck54321
Copy link
Member

They're not all passing yet, but this makes it easier to run different combos for the core simnet harness tests. Still figuring out the failing tests, but the error is always balance change not in expected range. Could be the same on master.

Copy link
Member

@JoeGruffins JoeGruffins left a comment

Choose a reason for hiding this comment

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

Very interesting approach.

I see an error when runnin ltcdcr: rawrequest (sendrawtransaction) error: -3: Amount is not a number or string

I see the balance errors for dcrdoge. doge must use the gamma and delta nodes because it has no accounts so balance tests will always fail when mining blocks. 9fd4054

I also see balance errors for dcreth. Do you think it's because maybe you have included the fee? Eth's estimation or swaps.FeeRate is 200 gwei here. Looking up the actual for the tx I find effectiveGasPrice: 2000000007, which I think is 2 gwei per gas actual.

@@ -0,0 +1,45 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

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

This file needs the chmod +x. Also can it be named run.sh?

flag.StringVar(&quote1Node, "quote1node", "beta", "the harness node to connect to for the first client's quote asset. only RPC wallets")
flag.StringVar(&base2Node, "base2node", "gamma", "the harness node to connect to for the second client's base asset. only RPC wallets")
flag.StringVar(&quote2Node, "quote2node", "gamma", "the harness node to connect to for the second client's quote asset. only RPC wallets")
flag.StringVar(&regAsset, "regasset", "gamma", "the harness node to connect to for the second client's quote asset. only RPC wallets")
Copy link
Member

Choose a reason for hiding this comment

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

Comment should be about being the register asset?

client.log("placed order %sing %s at %s (%s)", sellString(client.isSeller), qtyStr, rateStr, ord.ID[:8])
client.lastOrder = ord.ID

client.log.Infof("placed order %sing %s at %s (%s)", sellString(client.isSeller), qtyStr, rateStr, ord.ID[:8])
Copy link
Member

Choose a reason for hiding this comment

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

Must be an old bug but log doesn't look right 2022-05-31 18:24:25.360 [INF] T[1]: placed order selling 20.00000000 dcr at 0.000150000 eth%!(EXTRA string=dcr) (7e764dabd4977779)

Comment on lines 34 to 40
list)
./simnet-trade-tests --list
;;

help)
./simnet-trade-tests --help
;;
Copy link
Member

Choose a reason for hiding this comment

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

nit: This help should be help for the run file, like maybe the options above, and list isn't so helpful.

client/core/simnet_trade.go Outdated Show resolved Hide resolved
@chappjc
Copy link
Member

chappjc commented May 31, 2022

I see an error when runnin ltcdcr: rawrequest (sendrawtransaction) error: -3: Amount is not a number or string

Are you using 0.21 in this test? The 0.21 PR isn't merged yet

@buck54321
Copy link
Member Author

I'm going to go through and try to resolve some errors. I'm aware of a few. But I'm pretty sure they aren't all mine.

@chappjc
Copy link
Member

chappjc commented May 31, 2022

Just for reference, on master the main trade tests pass for me: TestTradeSuccess, TestNoTakerSwap, TestNoMakerRedeem, TestNoTakerRedeem, and TestMakerGhostingAfterTakerRedeem ✔️ (with dcr/btc anyway)
Not tested this PR yet.

@JoeGruffins
Copy link
Member

Are you using 0.21 in this test? The 0.21 PR isn't merged yet

Oh yeah... Using 0.21.2, so that`s probably it. Apologies.

@chappjc
Copy link
Member

chappjc commented Jun 1, 2022

We should probably get that merged too though... Just infuriating that ltc testnet is messed up still (explorers on wrong chain, etc.). I had to make large changes to that PR to to complete deserialization of all the MW tx types though, so it kinda got bigger like the zcash PR.

@chappjc chappjc added this to the 0.5 milestone Jun 9, 2022
@chappjc chappjc self-requested a review June 10, 2022 13:57
@buck54321
Copy link
Member Author

I think this is ready. If there's any tweaks to be made for Ethereum, I'll do it in #1622.

@chappjc chappjc merged commit 74114ac into decred:master Jun 11, 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.

3 participants