Skip to content

Switch to private testnet and upgrade#105

Open
napoly wants to merge 2 commits into
btcpay-monero:masterfrom
napoly:switch-to-private-testnet
Open

Switch to private testnet and upgrade#105
napoly wants to merge 2 commits into
btcpay-monero:masterfrom
napoly:switch-to-private-testnet

Conversation

@napoly

@napoly napoly commented Jun 6, 2026

Copy link
Copy Markdown
Member

@codacy-production

codacy-production Bot commented Jun 6, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

🟢 Coverage ∅ diff coverage · +0.00% coverage variation

Metric Results
Coverage variation +0.00% coverage variation (-1.00%)
Diff coverage diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (3c59948) Report Missing Report Missing Report Missing
Head commit (cab1802) 828 (+0) 499 (+0) 60.27% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#105) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@nahuhh

nahuhh commented Jun 6, 2026

Copy link
Copy Markdown

Might make more sense to use regtest

edit: i just noticed that it was using regtest before.
i dont think it makes any sense to switch to testnet. iirc, youd also have to change the hard fork table, otherwise your private testnet will be using old fork rules. regtest uses the latest.

so, nack changing to a private testnet. All of this can be done more cleanly using a private regtest network.

@napoly napoly requested a review from deverickapollo June 6, 2026 12:34
@napoly napoly force-pushed the switch-to-private-testnet branch from 070a249 to cab1802 Compare June 8, 2026 09:07
Comment on lines -246 to +247
"43Pnj6ZKGFTJhaLhiecSFfLfr64KPJZw7MyGH73T6PTDekBBvsTAaWEUSM4bmJqDuYLizhA13jQkMRPpz9VXBCBqQQb6y5L",
viewkey = "1bfa03b0c78aa6bc8292cf160ec9875657d61e889c41d0ebe5c54fd3a2c4b40e",
"9yEzCbcYdg6MqZ5AkEh8V3YCriyN1tvmtWEHdBEUHkF6D6kN1MMD2Kd2QVWoTY67aNHNYKMUP3xfteLS2QNavJxpJdx6mWj",
viewkey = "1f4668e8c1979b4c7dae13dc149fd95cd7ff2883becffe160c21f9e02c821c08",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why not use regtest and leave these values unchanged?

Comment on lines -44 to +45
"43Pnj6ZKGFTJhaLhiecSFfLfr64KPJZw7MyGH73T6PTDekBBvsTAaWEUSM4bmJqDuYLizhA13jQkMRPpz9VXBCBqQQb6y5L");
"9yEzCbcYdg6MqZ5AkEh8V3YCriyN1tvmtWEHdBEUHkF6D6kN1MMD2Kd2QVWoTY67aNHNYKMUP3xfteLS2QNavJxpJdx6mWj");
await s.Page.Locator("input#PrivateViewKey")
.FillAsync("1bfa03b0c78aa6bc8292cf160ec9875657d61e889c41d0ebe5c54fd3a2c4b40e");
.FillAsync("1f4668e8c1979b4c7dae13dc149fd95cd7ff2883becffe160c21f9e02c821c08");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same

Comment on lines -122 to +124
.FillAsync("1bfa03b0c78aa6bc8292cf160ec9875657d61e889c41d0ebe5c54fd3a2c4b40e");
.FillAsync("1f4668e8c1979b4c7dae13dc149fd95cd7ff2883becffe160c21f9e02c821c08");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same

Comment on lines -141 to +147
PrimaryAddress = "43Pnj6ZKGFTJhaLhiecSFfLfr64KPJZw7MyGH73T6PTDekBBvsTAaWEUSM4bmJqDuYLizhA13jQkMRPpz9VXBCBqQQb6y5L",
PrivateViewKey = "1bfa03b0c78aa6bc8292cf160ec9875657d61e889c41d0ebe5c54fd3a2c4b40e",
WalletFileName = "wallet",
Password = ""
});
await moneroRpcProvider.WalletRpcClients["XMR"]
.SendCommandAsync<GenerateFromKeysRequest, GenerateFromKeysResponse>("generate_from_keys",
new GenerateFromKeysRequest
{
PrimaryAddress =
"9yEzCbcYdg6MqZ5AkEh8V3YCriyN1tvmtWEHdBEUHkF6D6kN1MMD2Kd2QVWoTY67aNHNYKMUP3xfteLS2QNavJxpJdx6mWj",
PrivateViewKey = "1f4668e8c1979b4c7dae13dc149fd95cd7ff2883becffe160c21f9e02c821c08",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same

Comment on lines -152 to +159
.FillAsync("43Pnj6ZKGFTJhaLhiecSFfLfr64KPJZw7MyGH73T6PTDekBBvsTAaWEUSM4bmJqDuYLizhA13jQkMRPpz9VXBCBqQQb6y5L");
.FillAsync("9yEzCbcYdg6MqZ5AkEh8V3YCriyN1tvmtWEHdBEUHkF6D6kN1MMD2Kd2QVWoTY67aNHNYKMUP3xfteLS2QNavJxpJdx6mWj");
await s.Page.Locator("input#PrivateViewKey")
.FillAsync("1bfa03b0c78aa6bc8292cf160ec9875657d61e889c41d0ebe5c54fd3a2c4b40e");
.FillAsync("1f4668e8c1979b4c7dae13dc149fd95cd7ff2883becffe160c21f9e02c821c08");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same

container_name: node_1
command: [
"monerod",
"--fixed-difficulty=150",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I presume this is changed from 1 as to limit the block rate?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this a battle tested value from haveno-ts https://github.com/haveno-dex/haveno-ts/blob/master/docker/docker-compose.yml#L39 to mine blocks efficiently / in time

"--confirm-external-bind",
"--add-exclusive-node=node_2:28080",
"--block-notify=/bin/sh ./scripts/notifier.sh -k -X GET https://host.docker.internal:14142/monerolikedaemoncallback/block?cryptoCode=xmr&hash=%s",
"--testnet",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"--testnet",
"--regtest",

"--add-exclusive-node=node_2:28080",
"--block-notify=/bin/sh ./scripts/notifier.sh -k -X GET https://host.docker.internal:14142/monerolikedaemoncallback/block?cryptoCode=xmr&hash=%s",
"--testnet",
"--no-igd",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"--no-igd",

removed upstream in v0.18.5.0

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

command: [
"monero-wallet-rpc",
"--log-level=2",
"--allow-mismatched-daemon-version",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is only needed if using --regtest

@napoly

napoly commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

All of this can be done more cleanly using a private regtest network.

@nahuhh thanks for looking into this direction, you aren't the first one to question

The main reason for testnet over regtest is realism.. real PoW, nothing mocked away. It's 1:1 to production..

@nahuhh

nahuhh commented Jun 20, 2026

Copy link
Copy Markdown

real PoW, nothing mocked away. It's 1:1 to production..

they both use real pow, but testnet uses v1 transactions, and probably not even randomx?

@napoly

napoly commented Jun 20, 2026

Copy link
Copy Markdown
Member Author

no need for randomx here.. i just need to pay for the invoice.. should be easy to switch/modify if we would need it tho

@nahuhh

nahuhh commented Jun 20, 2026

Copy link
Copy Markdown

Yea.. you said that regtest doesnt use pow.. it does.. and, it uses the same pow as mainnet.

it also uses the same type of transactions.

your old setup had a fixed difficulty of 1, the new setup has a fixed difficulty of 100. They both use pow

@napoly

napoly commented Jun 20, 2026

Copy link
Copy Markdown
Member Author

but I also said it's 1:1 to prod.. testnet wont allow you to mine instantly for example.. (saves headache)

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.

2 participants