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

Enhancement: fork and high utxos detection #75

Closed
wants to merge 1 commit into from

Conversation

zimbora
Copy link
Contributor

@zimbora zimbora commented Sep 23, 2024

RPC FORK DETECTION

How to use it:

  • kyanite-cli -testnet -blockchain detectfork 6

How it works

Decrements the index passed as arg to the height of active chain
Gets current hash
Gets hash of the same block using API: https://explorer.decenomy.net/api/v2/
Compares with hash returned from API
Outputs the result in the following format:

{
"nHeight": 1495956,
"remoteBlockhash": "4b19d312ace7e412b5d65d57d1cc7fa9d96597b447181e89b53b21466cdcc697",
"localBlockhash": "4b19d312ace7e412b5d65d57d1cc7fa9d96597b447181e89b53b21466cdcc697",
"requestSucceed": true,
"fForkDetected": "false"
}

RPC HIGH UTXOS DETECTION

How to use it:

  • kyanite-cli -testnet -blockchain highutxos

How it works

Checks the number of utxos on wallet
Outputs the result in the following format:

{
"fHighUtxos": true,
"nUTxos": 76,
"nSpendable": 76,
"nSolvable": 76
}

UI FORK WARN

At each processed block checks if a fork was detected.
Shows a red icon on TopBar indicating the issue.
Allows a wallet rewind from the block in each the fork was detected.
Restarts the wallet if the user wants the rewind the blockchain

UI HIGHUTXOS WARN

At each processed block checks if the user has high utxos.
Shows a yellow icon on TopBar indicating the issue.
On click, asks the user if he wants to autocombine the utxos.
Enables stake and asks the user to unlock the wallet if needed.

image

- RPCClient: fork detection, highutxos detection.
- UI: Alerts for fork detection and highutxos detection. Allows Autocombine utxos
@zimbora zimbora added the enhancement New feature or request label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants