Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Minimum viable Bitcoin RPC support #1052

Closed
wants to merge 3 commits into from
Closed

Minimum viable Bitcoin RPC support #1052

wants to merge 3 commits into from

Conversation

Fang-
Copy link
Member

@Fang- Fang- commented Feb 3, 2019

This includes a bitcoin sur and lib for dealing with Bitcoin RPC requests and responses.
I've included a simple /app/bitcoin-cli that uses the lib to forward RPC call nouns to an actual node. Very bare-bones, with hard-coded URL and all... but it works!

This PR is easily considered incomplete, but I'm opening it for discussion to support further development. Maybe we're fine merging this as-is though? It works, and "support additional Bitcoin RPC calls" might be a good contributor issue.

It'd be cool if we could send transactions in whatever way. I think my best bet it to talk to @loganallenc about what the deal is with the accounts/wallets and transactions interfaces.
I vaguely remember there being auras for bitcoin addresses, does anyone know what they are?

The request-tag-as-json-id pattern here feels pretty nice. We might want to consider using that for Ethereum RPC integration as well, as a default, but I haven't thought it over much yet.

Includes/depends on #1051.

These now live in zuse, rpc:jstd.
Includes a type for rpc requests, and functions for turning those
into more actionable types (json, hiss).
Includes a minimum-viable bitcoin-cli app.
@dpc
Copy link

dpc commented Feb 4, 2019

I wish I could understand the code more, but hoon is still new and foreign to me.

From what I can deduce - this will require running a bitoin core node locally? And the plan is to use bitcoin core's wallet API to manage keys etc.? I wish urbit could do bitcoin crypto internally, and create addresses in hierarchical-deterministic fashion, and then craft transactions. Then it could be configured even against a (set of) remote node, or be an SPV wallet.

I'm looking forward to trying this out.

@Fang-
Copy link
Member Author

Fang- commented Feb 4, 2019

this will require running a bitoin core node locally?

This will require RPC access to any node. It doesn't need to be local. But I got the impression (from hasty searches) that public RPC-enabled nodes aren't at all common in Bitcoin?

I wish urbit could do bitcoin crypto internally

Generating and signing raw transactions seemed too complicated for MVP work (you need to manually specify inputs and outputs? I haven't looked into this too deeply either), but I do definitely want to support the "wallets on urbit" case. We already have ECDSA, BIP32 and BIP39 implementations, so most of the groundwork is out of the way. It's just a matter of applying that to actual transactions.

I think you might still need at least a local light node in that case, unless I'm wrong about the public RPC nodes thing. (There's probably also services offering plain ol' web APIs, but those aren't as interesting.)

@Fang-
Copy link
Member Author

Fang- commented Feb 4, 2019

(I'd be happy to talk you through the code, by the way. It's really quite dumb. Feel free to get in touch over email while chat is down.)

@dpc
Copy link

dpc commented Feb 4, 2019

I've shoot you an email @Fang- . TTYL

@Fang- Fang- removed the priority low label Apr 3, 2019
@jtobin
Copy link
Contributor

jtobin commented May 8, 2019

This PR is easily considered incomplete, but I'm opening it for discussion to support further development. Maybe we're fine merging this as-is though? It works, and "support additional Bitcoin RPC calls" might be a good contributor issue.

As I pass through the list of open PRs, wearing my finest hooded black robe and carrying my favourite nine-foot scythe, I note that this one could probably be closed for the time being, my good man.
Discussion has slowed down on it without really going anywhere, and as you point out, it could probably stand to bake a bit more anyway.

Yea / nah?

@Fang-
Copy link
Member Author

Fang- commented May 8, 2019

Yeah very fair. I will return!

@Fang- Fang- closed this May 8, 2019
@jtobin jtobin deleted the bitcoin-rpc-mvp branch August 12, 2019 12:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants