ordinals / ord

👁‍🗨 Rare and exotic sats
https://ordinals.com
Creative Commons Zero v1.0 Universal
3.85k stars 1.38k forks source link

```ord``` fails with Bitcoin Core v28.0 #3982

Closed gus4rs closed 1 month ago

gus4rs commented 1 month ago
[INFO  ord::index] Failed to connect to Bitcoin Core RPC at `127.0.0.1:8332/`:  JSON error: invalid type: sequence, expected a string
[WARN  ord::subcommand::server] Updating index: Failed to connect to Bitcoin Core RPC at `127.0.0.1:8332/`:  JSON error: invalid type: sequence, expected a string

image

gus4rs commented 1 month ago

probably related https://github.com/bitcoin/bitcoin/pull/29845

an example of bad engineering from Core, you can't simply break an API without creating a new method and deprecating the old one, and delete it after people have time to catch up and update their code. Can't believe this must be written down

so7ow commented 1 month ago

You can fix it by downgrading to bitcoin core v27.1, presuming you're running an unreleased x.99 version.

Oh, shut me up. Didn't realize 28.0 was released now.

gus4rs commented 1 month ago

sure, but this needs to be addressed because v28 was already officially released

so7ow commented 1 month ago

sure, but this needs to be addressed because v28 was already officially released

Yep, for sure. Edited my previous reply.

gus4rs commented 1 month ago

Can be "fixed" by adding -deprecatedrpc=warnings to bitcoin core v28 startup params

FTR: the correct way for Core to do it, ord should've just worked with v28. And in the bitcoin core logs, a message should be printed like this:

The RPC method getXXX() is deprecated and will be removed next version. Please use getXXX_WithCosmetics() instead
so7ow commented 1 month ago

Can be "fixed" by adding -deprecatedrpc=warnings to bitcoin core v28 startup params

FTR: the correct way to do it, it should've just worked. And in the bitcoin core logs, a message should be printed like this:


The RPC method getXXX() is deprecated and will be removed next version. Please use getXXX_WithCosmetics() instead

Nice to know.

gmart7t2 commented 1 month ago

https://crates.io/crates/bitcoincore-rpc/0.19.0 supports the new API. Is there a good reason we aren't using it instead of the old ord-bitcoincore-rpc fork?

raphjaph commented 1 month ago

We've removed the dependency on the old ord-bitcoincore-rpc here.

https://crates.io/crates/bitcoincore-rpc/0.19.0 relies on rust-bitcoin 0.32.x and unfortunately that crate has many breaking changes. I'm currently working on upgrading here: https://github.com/ordinals/ord/pull/3962 but it's an incredibly manual and frustrating task. v28 incompatibility means I'm going to prioritise that now.

gmart7t2 commented 1 month ago

Consider something like #3996 as a short term fix.