Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

RPC error: -25: Min anchor quorum was not reached! #6

Closed
dell1503 opened this issue Mar 2, 2021 · 17 comments
Closed

RPC error: -25: Min anchor quorum was not reached! #6

dell1503 opened this issue Mar 2, 2021 · 17 comments

Comments

@dell1503
Copy link

dell1503 commented Mar 2, 2021

Hi Guys,

Since this morning I run the script as well.
I always received the following output, where I start the Script as follow:
./main.py --config ./config.toml --repeat 30

I see the following Result in the Consol from the Script:

2021-03-02 16:39:17.583325 repeating the routine
================================================

checking competing anchors in BTC mempool

requesting anchor template from DeFi RPC
RPC error: -25: Min anchor quorum was not reached!

When I check defi-cli spv_listanchorauths I got a empty respond.
Is my assumption correct that the Script is working fine, but there is nothing to Anchor yet?
I reffering to https://github.com/DeFiCh/ain/wiki/Create-Bitcoin-Anchor where it staters:
"f it empty, then need to wait for 15 blocks to let your node to receive the anchor auths message"

As far as I understood the Script, this Error is not covered in the error handling of the Script?
Or is something wrong with my Setup?

RPC's are running both. Funds also available.

@AltCoiFish
Copy link

"RPC error: -25: Min anchor quorum was not reached!"

Don't ask me why, but this is normal behavior.
If someone else could explain why sometimes the anchor quorum does this in a bit more detail?

@ShengguangXiao
Copy link

Please let your node run for half an hour to get the anchor auth information, and you can use the below API to check if you node received the anchor auth nodes.

defi-cli spv_listanchorauths

@Bushstar
Copy link
Member

Bushstar commented Mar 3, 2021

@AltCoiFish More information can be found in the link below.

https://github.com/DeFiCh/ain/wiki/What-is-an-anchor%3F

@Bushstar
Copy link
Member

Bushstar commented Mar 3, 2021

Anchor teams creating the auths and confs can be found with getanchorteams.

defi-cli getanchorteams
{
  "auth": [
    "8GFr5U1ad2mF4oejPsVg7q2paBjjXj6nmp",
    "8KmNpLpANR7y5g7H7uYw8JUw1gznKpZAMb",
    "8QsPfjbr5ifwhsr6RgnM6WqoGf6dLxV1bx",
    "8XQv2otqB5GTGD578UHWuMn32bEpVEkmyy",
    "8dK9ffUzWiDoRkD4XsxCB2UcZEPx4VHjZg"
  ],
  "confirm": [
    "8GYcYHP9vZLWqgLN26SQLcJrT4ojYCLF6B",
    "8N8VC26GXdgExEkqG7bo5GkDZ5jcvoTva6",
    "8UvPZPTE7ae8kR2uqHLEBgLXqA3kKCsZCN",
    "8Z2WFnXUMcY1XMuXrLarLKoTHd5Xu762Za",
    "8b2dTiCvZ8eUN3Nifwn7obtMjUiJEqgTwA"
  ]

Auths used in anchor creation require signatures from 66% plus one members of the team to meet quorum.

defi-cli spv_listanchorauths
[
  {
    "blockHeight": 682245,
    "blockHash": "dbfadf572ca98e1c747de7d0e29e149052b63c27c45e440d868f267f1c07f644",
    "creationHeight": 682530,
    "signers": 2,
    "signees": [
      "8QsPfjbr5ifwhsr6RgnM6WqoGf6dLxV1bx",
      "8KmNpLpANR7y5g7H7uYw8JUw1gznKpZAMb"
    ]
  }
]

The latest auth seen in spv_listanchorauths shows that this is not met for the team above. Further info is in the link I posted above.

@dell1503
Copy link
Author

dell1503 commented Mar 3, 2021

Please let your node run for half an hour to get the anchor auth information, and you can use the below API to check if you node received the anchor auth nodes.

defi-cli spv_listanchorauths

Thank you for your replay. My defid Node is running more then 12h and still an emmpty respond:

~$ defi-cli spv_listanchorauths
[
]

I understood it like this, this should stay empty until the new Anchor team is created and they create the Anchor Data?
This is wrong?
I should always have a respond, at any time during the anchoring process?

Thanks for helping out here.

@AltCoiFish
Copy link

Thank you for your replay. My defid Node is running more then 12h and still an emmpty respond:

As a suggestion , after you did upgrade to version 1.5. did you start your dfid with rescan as this was needed at the time.
Check the upgrade procedure on https://github.com/DeFiCh/ain/releases/tag/v1.5.0

Not sure if its related here.

@ShengguangXiao
Copy link

Can you share your command line parameters for defid? And upload the log in ~/.defi/debug.log

@Bushstar
Copy link
Member

Bushstar commented Mar 3, 2021

What is the result of spv_syncstatus?

@dell1503
Copy link
Author

dell1503 commented Mar 4, 2021

I start from scratch, new Host and new BTC and DEFI Host,
Keep you updated.

@dell1503
Copy link
Author

dell1503 commented Mar 4, 2021

I start from scratch, new Host and new BTC and DEFI Host,
Keep you updated.

So guys, I'm one step closer, I think.
I think I "solved" the problem of the empty list when do defi-cli spv_listanchorauths.
I Basically reset-up everything, the new host, and also BTC and DEFI Node. My BTC Node was quite old, and there was maybe a wrong config or so. I don't Know.
However, when I use in the config.toml:
Mode = "Fixed"
It seems to work, at least it creates a Transaction:

$ ./main.py --config ./config.toml
checking competing anchors in BTC mempool
ok

requesting anchor template from DeFi RPC
* DeFi block      : 86cc0d9cd8884821af2fddc3206cde609a8df9cbcfe0c250e49b32da5c6063b1
* potential reward: 55.00000000 DFI
ok

checking minimum profit conditions
ok

creation of anchor transaction
ok

sending anchor transaction
* BTC anchor transaction: 1c50f0c9ab8f19c0b065f1af6b8b5329c949862fdd0f73ad99fd045a6184d7ab
* DeFi block            : 86cc0d9cd8884821af2fddc3206cde609a8df9cbcfe0c250e49b32da5c6063b1
* potential reward      : 55.00000000 DFI
ok

Which is wired, that the Transaction didn't go through, yet, and the potential rewards is 55, where I see in the DEFI Block Explorer at that time 35 DFI.

When then Enabling in the config.toml:
Mode = "Estimation"

I recive directly an error:

$ ./main.py --config ./config.toml
Error: 'feerate'

Find attached my config.toml. (I removed the RPC Part) and the ~/.defi/debug.log
github.zip

@dell1503
Copy link
Author

dell1503 commented Mar 4, 2021

After restart the DeFi Node had had the same issue again that defi-cli spv_listanchorauths stays empty.
I notice that I had the pruned mode active in my config. I removed that and doing now a -reindex

@ShengguangXiao
Copy link

You node log has a lot of error like this, means the anchor syncing have problem, can you restart your node with -spv_resync option?

2021-03-04T10:51:22Z UpdateTip: new best=4e377be06ed4ceb4d72085b936c4addfdee64d63f4bc60f4c17e186815a9693d height=684840 version=0x20000000 log2_work=79.571492 tx=1716908 date='2021-03-04T10:51:21Z' progress=1.000000 cache=0.0MiB(33txo)
2021-03-04T10:51:27Z ERROR: ValidateAuth: anchor previousAnchor does not match top anchor
2021-03-04T10:51:27Z ERROR: ValidateAuth: anchor previousAnchor does not match top anchor
2021-03-04T10:51:27Z ERROR: ValidateAuth: anchor previousAnchor does not match top anchor
2021-03-04T10:51:28Z ERROR: ValidateAuth: anchor previousAnchor does not match top anchor
2021-03-04T10:51:28Z ERROR: ValidateAuth: anchor previousAnchor does not match top anchor

@dell1503
Copy link
Author

dell1503 commented Mar 4, 2021

I did. I stopped def-cli stop and re-launch the node with:
$ defid -spv -spv_resync -daemon

Checked the Status with

 $ defi-cli spv_syncstatus
{
  "connected": true,
  "current": 673163,
  "estimated": 673163
}

The debug.log look first (after sync) good, but then I spotted again some errors:
2021-03-04T20:17:32Z ERROR: ValidateAuth: anchor previousAnchor does not match top anchor

But when spv_listanchorauths looks better:

$ defi-cli spv_listanchorauths
[
  {
    "blockHeight": 685440,
    "blockHash": "bed023dbb8a2430c321fe75f6bea64422e6c4fb7c9e72551109b7cc59f412bb7",
    "creationHeight": 685755,
    "signers": 1,
    "signees": [
      "8UPz9hVnYKrHSz1FVBn3qz6hRrNjFrRYC8"
    ]
  },
  {
    "blockHeight": 685425,
    "blockHash": "2f7142d1425c8d4df31776c107b3967b2ddfa186f8c01ac680945ab1a7c67149",
    "creationHeight": 685740,
    "signers": 1,
    "signees": [
      "8UPz9hVnYKrHSz1FVBn3qz6hRrNjFrRYC8"
    ]
  }
]

Then I run the Script again after around 30min, after the -spv_resync was finished. Still the same Error:
RPC error: -25: Min anchor quorum was not reached!

I attached my defi.conf, debug.log and spv.log
github1.zip
Is there a special need for running spv?

@Bushstar
Copy link
Member

Bushstar commented Mar 5, 2021

There is a new version of DeFichain released soon that has a few updates for anchors. You could be running into issues related to those updates. After updating you will need to run -spv_resync again.

@dell1503
Copy link
Author

dell1503 commented Mar 5, 2021

After doing nothing on the Node, the Script went through. Nothing Changed

$ ./main.py --config ./config.toml
checking competing anchors in BTC mempool
ok

requesting anchor template from DeFi RPC
* DeFi block      : fba09dd29aa9df310b5b057d037989cfe702f0375987058584dcf765cfbd1b19
* potential reward: 265.00000000 DFI
ok

checking minimum profit conditions
ok

creation of anchor transaction
ok

sending anchor transaction
* BTC anchor transaction: 91b18a5ea03727d58022d15e179bdc628203db13ca023948484fad00460e21b6
* DeFi block            : fba09dd29aa9df310b5b057d037989cfe702f0375987058584dcf765cfbd1b19
* potential reward      : 265.00000000 DFI
ok

However when checking the the Transaction, all look fine. How can I find the anchor team confirmation?

@Bushstar
Copy link
Member

Bushstar commented Mar 5, 2021

You can use spv_listanchorrewardconfirms to see the anchor confirms and spv_listanchorsunrewarded to see unrewarded anchors. Your anchor needs to be seen as active in spv_listanchors by the majority of the anchor confirm team to be confirmed for reward payment.

@dell1503
Copy link
Author

dell1503 commented Mar 5, 2021

Thank, I was able to verify the transaction.

Solution for Future reference:

First try to start the node with
-spv_resync
You can check status of the resync with defi-cli spv_syncstatus

After Sync is complete, wait until Anchor History is build, defi-cli spv_listanchorauths for me this took very long, like 8 hours.

If that doesn't help, rebuild the entire Blockchain.

Thank you all for the support!

@dell1503 dell1503 closed this as completed Mar 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants