Start9Labs / bitcoind-startos

wrapper for building bitcoind.s9pk
Other
14 stars 20 forks source link

Not compatible with 0.2.x config #19

Closed dr-bonez closed 2 years ago

dr-bonez commented 3 years ago

create a migration to handle

chrisguida commented 3 years ago

@dr-bonez please elaborate

dr-bonez commented 3 years ago

A migrated config from 0.2.x throws an error on config.get because it does not conform to the new config spec.

chrisguida commented 3 years ago

Can you give me more info as to what the solution is supposed to look like? I'm not sure what a "migration" is. Also is the only way to test this to migrate an 02x box?

chrisguida commented 3 years ago

Looks like I just need to put one of these in the manifest https://github.com/Start9Labs/embassy-os/blob/ba7fab467e837d14e098831ba1a8cd77707d57eb/appmgr/src/migration.rs#L17

dr-bonez commented 2 years ago

...is the only way to test this to migrate an 02x box?

You just need a config.yaml from an 0.2.x version of bitcoind.

chrisguida commented 2 years ago

...is the only way to test this to migrate an 02x box?

You just need a config.yaml from an 0.2.x version of bitcoind.

In that case, what exactly is the incompatibility? Any config.yaml from 02x will be valid on the 030 version of bitcoind. I've only added a new variant of the pruning enum, so the 030 version is a superset of the 02x version.

chrisguida commented 2 years ago

Upon closer inspection, looks like I might need to find these tor addresses somewhere: https://github.com/Start9Labs/bitcoind-wrapper/pull/15/files#diff-e09ac2fd502f8332fb6d7efbe3dca38dfb2487228efabefedecb6165a6ee6e63R1-R16

Do you know where the migration would be able to pull these tor addresses from?

chrisguida commented 2 years ago

Ok, third pass, looks like maybe it's because the default on the pruning enum changed: https://github.com/Start9Labs/bitcoind-wrapper/pull/15/files#diff-e09ac2fd502f8332fb6d7efbe3dca38dfb2487228efabefedecb6165a6ee6e63R254

You did mention that this would make a config incompatible, but I'm not exactly sure what the fix would be. The default is not saved in config.yaml.

chrisguida commented 2 years ago

Ok so

Never mind, tested config.get on a recovered 02x bitcoind and no errors happened. Closing