Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port other electrum endpoints to hub #3

Open
5 of 10 tasks
lyoshenka opened this issue May 7, 2021 · 0 comments
Open
5 of 10 tasks

Port other electrum endpoints to hub #3

lyoshenka opened this issue May 7, 2021 · 0 comments
Assignees

Comments

@lyoshenka
Copy link
Member

lyoshenka commented May 7, 2021

search

  • blockchain.claimtrie.search

headers

  • need an API that returns N headers. it will replace all of the following

    • blockchain.block.headers
    • blockchain.block.get_chunk (unused)
    • blockchain.block.get_header (unused)

    API: getHeaders(startHeight, numHeaders)
    make sure that 0 < numHeaders <= 40960, though this upper limit may not be the right one anymore. why do we have it? just because we need some limit?

    when Go hub starts, connect to python block processor and load all current headers. keep them in ram
    subscribe to block processor's zmq notifications for new headers. full header will be in there.

  • blockchain.headers.subscribe (don't do this until Go hub can read from block processor db directly - aka till we switch to rocksdb)

db

  • python block processor will emit stream of PUT/DELETE zmq events
  • go hub will listen to zmq events and write them to it's own pebble db
  • no more db in python... but python needs db access for processing blocks

federation

speced in #6

  • server.add_peer
  • server.peers.subscribe

other

  • server.ping
  • server.version
  • server.features
  • blockchain.block.get_server_height
  • blockchain.transaction.broadcast

don't do any of the ones below

needs reorg support

tx can change blocks during a reorg, so we need to handle that correctly to do all this

otoh, doing this reorg support is way easier than doing resolve reorgs. and in fact, btcd may already have all this implemented

blockchain.transaction.get_merkle
blockchain.transaction.get (depends on get_merkle)
blockchain.transaction.get_batch (depends on get_merkle)
blockchain.transaction.info (depends on get_merkle)
blockchain.transaction.get_height
blockchain.address.get_history
blockchain.address.subscribe
blockchain.address.unsubscribe

resolve

wait on this till roy/brannon finish porting chain to Go. they'll be implementing this

blockchain.claimtrie.resolve

unused

blockchain.address.get_mempool
blockchain.estimatefee
blockchain.relayfee
blockchain.scripthash.get_balance
blockchain.scripthash.get_history
blockchain.scripthash.get_mempool
blockchain.scripthash.listunspent
blockchain.scripthash.subscribe
server.banner
server.payment_address
server.donation_address
mempool.get_fee_histogram
blockchain.address.get_balance
blockchain.address.listunspent

@jeffreypicard jeffreypicard self-assigned this Jul 14, 2021
@jeffreypicard jeffreypicard linked a pull request Jul 14, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants