-
Notifications
You must be signed in to change notification settings - Fork 13
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
Backup #665
Comments
Yep lets keep it stateless, and return the JSON object in a string or something |
Some considerations to revamp the discussion:
Improvements to the original proposal:
"trades": [
{
"id": "...",
"type": "...",
"marketName": "...",
"marketBaseAsset": "...",
"marketQuoteAsset": "...",
"marketPrice": {
"basePrice": "...",
"quotePrice": "..."
},
"marketPercentageFee": {
"baseAsset": <value>,
"quoteAsset": <value>
},
"marketFixedFee": {
"baseAsset": <value>,
"quoteAsset": <value>
},
"feeAsset": "...",
"feeAmount": <value>,
"status": {
"code": <value>,
"failed": <value>
},
"psetBase64": "...",
"txid": "...",
"txHex": "...",
"expiryTime": <value>,
"settlementTime": <value>,
"swapRequest": {
"id": "...",
"message": "..."
"timestamp": <value>
}, *Swap
"swapAccept": {
"id": "...",
"message": "..."
"timestamp": <value>
},
"swapComplete": {
"id": "...",
"message": "..."
"timestamp": <value>
},
"swapFail": {
"id": "...",
"message": "..."
"timestamp": <value>
}
},
...
],
"deposits": [
{
"txid": "...",
"accountName": "...",
"totAmountPerAsset": {
"<asset>": <value>,
...
},
"timestamp": <value>
},
...
],
"withdrawals": [
{
"txid": "...",
"accountName": "...",
"totAmountPerAsset": {
"<asset>": <value>,
...
},
"timestamp": <value>
},
...
] Translation from old to new format:
|
All good, but my main issue with datadir is that we cannot build GUI tools to perform "export" & "import" If we assume "i have my 0.x daemon on the same machine where I am upgrading" that should be handled with a migration routine in V1 that if recognize a datadir with old data, will perform migration automatically under the hood. The JSON idea was more I have my daemon (either 0.x or 1.x) running and I want to spin-up an exact clone somewhere else in a different infrastructure. Maybe we should consider the bytes option instead of JSON? Ideally can be a server-stream to chunk multiple pieces together in order to be able to handle the scale of a huge file (with grpc-gateway will still be base64 strings I guess, but with chunking make it scalable) |
So as wrap-up, let's split up the task in priorities:
|
At the moment, when recovering a wallet from a seed, the only thing restored is basically it's status, meant as accounts, addresses, txsa dn utxos. Thanks to some env vars and to the very specific structure of the daemon's embedded wallet we're able to restore its markets in term of just associating base and quote asset to a specific wallet account. We lose all those info like their fees, strategies etc.
In order to facilitate the restoration of all daemon's markets, we plan to add a new rpc
ExportBackupFile
that basically creates a JSON object with all relative information about the daemon's wallet and markets.The following JSON is an example of the content of such backup file and we should iterate over this, so feedbacks are more than welcome:
@tiero @sekulicd what do you think of this as a starting point?
I also have an open question:
What should be the behavior of this rpc? Should it create the JSON file somewhere like for example in the datadir? Or, instead, should it send the serialzied json object within the response message and let the client eventually create the file?
The text was updated successfully, but these errors were encountered: