From 9d93f14592c6ed82b3d9cd3e0be83d10c455613c Mon Sep 17 00:00:00 2001 From: jazminima <92978315+Jazminima@users.noreply.github.com> Date: Fri, 21 Feb 2025 13:46:15 +0000 Subject: [PATCH 1/3] Minor updates to xchg docs --- content/docs/run-a-node/meg-setup.mdx | 2 +- content/docs/user-guides/meg/meg-wallet-api.mdx | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/content/docs/run-a-node/meg-setup.mdx b/content/docs/run-a-node/meg-setup.mdx index 67ea62d..adce1fe 100644 --- a/content/docs/run-a-node/meg-setup.mdx +++ b/content/docs/run-a-node/meg-setup.mdx @@ -118,7 +118,7 @@ From the CLI, start a Minima Mega node with the following start up parameters: | `-data /home/minima/.minima` | defines the configuration data folder | | `-p2pnodes megammr.minima.global:9001` | provides a list of peers to join the network | | `-notifyalltxpow` | (Optional) creates a NEWTXPOW notification for all transactions | -| `-txpowdbstore` | (Optional) define how long to store full transaction details on the node. Default is 3. | +| `-txpowdbstore` | (Optional) define how many days to store full transaction details on the node. Default is 3. | | `-mysqlalltxpow` | (Optional) Store all TxPoW in MySQL when mysql autobackup is enabled | | `-mdsenable` | (Optional) enables the minidapp system e.g. for block explorer | | `-mdspassword insertpasswordhere` | (Optional) sets the password to login to the minidapp system | diff --git a/content/docs/user-guides/meg/meg-wallet-api.mdx b/content/docs/user-guides/meg/meg-wallet-api.mdx index ce4c4a2..b7de41d 100644 --- a/content/docs/user-guides/meg/meg-wallet-api.mdx +++ b/content/docs/user-guides/meg/meg-wallet-api.mdx @@ -160,11 +160,13 @@ OR - you can set the MINIMUM nonce value to a high enough value without copying The current MAX value for all keyuses is displayed on the Admin page. -## How to check an on-chain transaction (online) +## How to check an on-chain transaction or block (online) -Once a transaction has been posted, you can check the block number it is in and number of block confirmations it has on-chain. This can only be done within the first 24 hours from the transaction being posted. +Once a transaction or block has been posted, you can check its block number and number of block confirmations it has on-chain. -Use following Wallet API endpoint, providing the `txpowid` of the transaction as a parameter - this can be found in the response from `send`, `posttxn` or `minetxn`) +This can only be done for as long as you have set the `-txpowdbstore` start up parameter. If not using this startup parameter, this check must be performed within the first 24 hours from the time of the transaction or block, then it is pruned. + +Use the `checktxpow` Wallet API endpoint, providing the `txpowid` of the transaction as a parameter - this can be found in the response from `send`, `posttxn` or `minetxn`) ``` /wallet/checktxpow @@ -185,11 +187,13 @@ The response contains | `confirmations` | the number of block confirmations for the transaction | -## How to get a transaction (txpow) details (online) +## How to get transaction or block (txpow) details (online) + +Once a transaction or block has been posted, you can retrieve the details of the transaction or block from the node using its txpowid. -Once a transaction has been posted, you can retrieve the details of the transaction from the node using the txpowid. This can only be done within the first 48 hours from the transaction being posted, then it is pruned. +This can only be done for as long as you have set the `-txpowdbstore` start up parameter. If not using this start up parameter, this check must be performed within the first 48 hours from the time of the transaction or block, then it is pruned. -To get the transaction details, use following Wallet API endpoint, providing the `txpowid` of the transaction as a parameter - this can be found in the response from `send`, `posttxn` or `minetxn`) +To get the transaction or block details, use `gettxpow` Wallet API endpoint, providing the `txpowid` of the transaction or block as a parameter - this can be found in the response from `send`, `posttxn` or `minetxn`) ``` /wallet/gettxpow From 9c1e9e7661c6d028742db0359c705daf32ea9957 Mon Sep 17 00:00:00 2001 From: jazminima <92978315+Jazminima@users.noreply.github.com> Date: Fri, 21 Feb 2025 13:57:34 +0000 Subject: [PATCH 2/3] meg setup updates --- content/docs/run-a-node/meg-setup.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/docs/run-a-node/meg-setup.mdx b/content/docs/run-a-node/meg-setup.mdx index adce1fe..cda902a 100644 --- a/content/docs/run-a-node/meg-setup.mdx +++ b/content/docs/run-a-node/meg-setup.mdx @@ -6,11 +6,11 @@ tag: run-a-node import { Tab, Tabs } from "fumadocs-ui/components/tabs" -This guide explains how to +This guide explains how to: - Set up a MEG (Minima E-Gateway) instance and connect it to a Minima node - Test the MEG setup -- Store more of the chain history on the node, if required +- Store more of the chain history on the node, if required, - Export the chain history to MySQL @@ -127,7 +127,7 @@ From the CLI, start a Minima Mega node with the following start up parameters: Example ``` -java -jar [path]/minima.jar -rpcenable -megammr -notifyalltxpow -basefolder /home/minima -data /home/minima/.minima -p2pnodes megammr.minima.global:9001 +java -jar [path]/minima.jar -megammr -rpcenable -basefolder /home/minima -data /home/minima/.minima -p2pnodes megammr.minima.global:9001 -notifyalltxpow -txpowdbstore 50 -mysqlalltxpow ``` You should see something similar to the following: From ec2f8e96836356d7853d6933f2c0be313bac308c Mon Sep 17 00:00:00 2001 From: jazminima <92978315+Jazminima@users.noreply.github.com> Date: Fri, 21 Feb 2025 14:13:01 +0000 Subject: [PATCH 3/3] onchain check comment --- content/docs/user-guides/meg/meg-wallet-api.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/docs/user-guides/meg/meg-wallet-api.mdx b/content/docs/user-guides/meg/meg-wallet-api.mdx index b7de41d..018fece 100644 --- a/content/docs/user-guides/meg/meg-wallet-api.mdx +++ b/content/docs/user-guides/meg/meg-wallet-api.mdx @@ -189,6 +189,8 @@ The response contains ## How to get transaction or block (txpow) details (online) +**IMPORTANT: This call will also return details for orphan blocks and transactions. Use `checktxpow` to ensure the blocks or transactions is confirmed on-chain.** + Once a transaction or block has been posted, you can retrieve the details of the transaction or block from the node using its txpowid. This can only be done for as long as you have set the `-txpowdbstore` start up parameter. If not using this start up parameter, this check must be performed within the first 48 hours from the time of the transaction or block, then it is pruned.