further fixes for stagenet in openmonero

https://github.com/moneroexamples/openmonero/issues/71
pull/74/head
moneroexamples 6 years ago
parent d373327150
commit 4ffece8435

@ -34,15 +34,15 @@ to MyMonero. They include:
- new transaction details window.
- sending xmr to a subaddress (not receiving nor generating subaddresses for now).
## Testnet version
## Stagenet version (Currently offline)
- [http://139.162.32.245:81](http://139.162.32.245:81)
This is Open Monero running on testnet network. You can use it to play around with it.
Since this is testnet version, frequent changes and database resets are expected. Also,
This is Open Monero running on stagenet network. You can use it to play around with it.
Since this is stagenet version, frequent changes and database resets are expected. Also,
it is running on cheap vps, which may result in some lag.
If you want some testnet monero, please make issue with your testnet address that you can
If you want some testnet or stagenet monero, please make issue with your stagenet address that you can
obtained from Open Monero.
## Screenshot
@ -195,9 +195,9 @@ Command line options
```bash
./openmonero -h
-h [ --help ] [=arg(=1)] (=0) produce help message
-t [ --testnet ] [=arg(=1)] (=0) use testnet blockchain
-s [ --stagenet ] [=arg(=1)] (=0) use stagenet blockchain
--do-not-relay [=arg(=1)] (=0) does not relay txs to other nodes.
useful when testing construction and
submiting txs
@ -215,11 +215,12 @@ Before running `openmonero`:
Time library used in Open Monero stores there time zone offsets database that it uses.
- edit `config/confing.js` file with your settings. Especially set `frontend-url` and `database`
connection details.
- set `apiUrl` in `html\js\config.js` and `testnet` flag. Last slash `/` in `apiUrl` is important.
If running backend for testnet network, frontend `testnet` flag must be set to `true`.
- set `apiUrl` in `html\js\config.js` and `nettype` option. Last slash `/` in `apiUrl` is important.
If running backend for testnet or stagenet networks, frontend `nettype` must be set to
1 - TESTNET or 2 - STAGENET. 0 is for MAINNET.
For mainnet, it is set to `false`.
- make sure monero daemon is running and fully sync. If using testnet network, use daemon
with testnet flag!
- make sure monero daemon is running and fully sync. If using testnet or stagenet networks, use monero daemon
with `--testnet` or `--stagenet` flags!
To start for mainnet:
@ -237,17 +238,16 @@ To start for stagenet:
./openmonero -s
```
To start for testnet with non-default location of `config.json` file:
To start for stagenet with non-default location of `config.json` file:
```bash
./openmonero -t -c /path/to/config.json
./openmonero -s -c /path/to/config.json
```
## API calls
In the below examples, you can change `127.0.0.1:1984` into `139.162.32.245:1984` to
query the testnet open monero instance (assuming its up and working well).
Example calls and their outputs are provided below.
#### get_version

@ -56,7 +56,7 @@ var cnUtil = (function(initConfig) {
} else if (config.nettype === 2 /*stagenet*/) {
CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = config.addressPrefixStagenet;
CRYPTONOTE_PUBLIC_INTEGRATED_ADDRESS_BASE58_PREFIX = config.integratedAddressPrefixStagenet;
CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX = config.subAddressPrefixStagnet;
CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX = config.subAddressPrefixStagenet;
}
var UINT64_MAX = new JSBigInt(2).pow(64);

@ -23,7 +23,7 @@ var config = {
feePerKB: new JSBigInt('2000000000'),//20^10 - not used anymore, as fee is dynamic.
dustThreshold: new JSBigInt('1000000000'),//10^10 used for choosing outputs/change - we decompose all the way down if the receiver wants now regardless of threshold
txChargeRatio: 0.5,
defaultMixin: 4, // minimum mixin for hardfork v5
defaultMixin: 6, // minimum mixin for hardfork v7 is 6 (ring size 7)
txChargeAddress: '',
idleTimeout: 30,
idleWarningDuration: 20,

@ -45,7 +45,14 @@ thinwalletCtrls.controller('SendCoinsCtrl', function($scope, $http, $q,
var view_only = AccountService.isViewOnly();
var explorerUrl = config.testnet ? config.testnetExplorerUrl : config.mainnetExplorerUrl;
var explorerUrl = "";
if (config.nettype == 0)
explorerUrl = config.mainnetExplorerUrl;
else if (config.nettype == 1)
explorerUrl = config.testnetExplorerUrl;
else
explorerUrl = config.stagenetExplorerUrl;
// few multiplayers based on uint64_t wallet2::get_fee_multiplier
var fee_multiplayers = [1, 4, 20, 166];

@ -52,7 +52,14 @@ thinwalletCtrls.controller('TransactionDetailsCtrl', function ($scope,
return;
}
var explorerUrl = config.testnet ? config.testnetExplorerUrl : config.mainnetExplorerUrl;
var explorerUrl = '';
if (config.nettype == 0)
explorerUrl = config.mainnetExplorerUrl;
else if (config.nettype == 1)
explorerUrl = config.testnetExplorerUrl;
else
explorerUrl = config.stagenetExplorerUrl;
var address = AccountService.getAddress();
var view_key = AccountService.getViewKey();

@ -55,10 +55,10 @@
<label class="send-label" for="field4">Privacy Level</label>
<select class="w-input" id="field4" name="Select-a-number" data-name="Select a number"
required="required" ng-model="mixins">
<option value="4">Low (ring size 5)</option>
<option value="6">Medium (ring size 7)</option>
<option value="10">High (ring size 11)</option>
<option value="20">Paranoid (ring size 21)</option>
<option value="6">Default (ring size 7)</option>
<option value="9">Higher (ring size 10)</option>
<option value="14">Even higher (ring size 15)</option>
<option value="19">Paranoid (ring size 20)</option>
</select>
<label class="send-label" for="field5">Priority Level (adjusts miner fee)</label>
<select class="w-input" id="field5" name="Select-a-number" data-name="Select a number"

@ -796,6 +796,11 @@ YourMoneroRequests::get_random_outs(const shared_ptr< Session > session, const B
} // for (const COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS::outs_for_amount& outs: found_outputs)
} // if (CurrentBlockchainStatus::get_random_outputs(amounts, count, found_outputs))
else
{
j_response["status"] = "error";
j_response["error"] = fmt::format("Error getting random outputs from monero deamon");
}
string response_body = j_response.dump();

Loading…
Cancel
Save