hirosystems / chainhook

Extract transactions from Stacks and Bitcoin and build event driven re-org resistant indexers and databases.
GNU General Public License v3.0
144 stars 57 forks source link

bitcoin network not recognized message when changing .toml file to mainnet #368

Closed timstackblock closed 1 year ago

timstackblock commented 1 year ago

Not sure if this is a bug or maybe something missing from the docs but I created an issue for it and labeled it bug, if this is not a bug maybe we need a doc enhancement.

Describe the bug When I run predicates that are labeled testnet "testnet":and my .toml file is set to testnet the predicates run without issue.

But when UI update both these fields to mainnet

{
    "uuid": "1",
    "name": "Hello Ordinals",
    "chain": "bitcoin",
    "version": 1,
    "networks": {
        "mainnet": {
            "start_block": 801220,
            "end_block": 801230,
            "if_this": {
                "scope": "txid",
                "equals": "55c86631e9b08b817e6ebac00b9818d1fd49e0a7d6c00429b6e364d3ef845920"
            },
            "then_that": {
                "http_post": {
                    "url": "https://webhook.site/1d34131a-26c4-4f9d-8b91-c68972bd79ad",
                    "authorization_header": ""
                }
            }
        }
    }
}

I get this message.

Screenshot 2023-08-08 at 12 25 25 PM Screenshot 2023-08-08 at 12 25 04 PM
MicaiahReid commented 1 year ago

Hmm, I couldn't reproduce. Whenever I had the same values in both the predicate and Chainhook.toml, this worked.

If I have testnet in that predicate and mainnet in the Chainhook.toml, I get Specification missing for network Mainnet: Network unknown, and when I have mainnet in the predicate and testnet in the Chainhook.toml, I get Specification missing for network Testnet: Network unknown

Can you confirm this behavior?

timstackblock commented 1 year ago

Still the same thing let me throw some time on your calendar tomorrow.

timstackblock commented 1 year ago

duplicate toml files caused this issue