Giter Site home page Giter Site logo

Comments (7)

monsterbitar avatar monsterbitar commented on July 30, 2024 1

I commented on the MR with a preference for null instead of error, as I have what I consider valid usage that will not find data (recover from seed without knowing the derivation path, therefor trying multiple paths).

Closing this issue since the feature is implemented, but ideally some coordination with other implementations on the matter would be helpful. if they are willing to update they can, for example, make it so that after some specific version it adops the new behaviour. If not, then it's probably better to stick with the error version for now.

from fulcrum.

cculianu avatar cculianu commented on July 30, 2024 1

Update: After discussions on TG it appears people are ok with returning null for unused addresses. I have updated Fulcrum to do just that in the latest commit pushed to master.

from fulcrum.

cculianu avatar cculianu commented on July 30, 2024

Yes this is not difficult at all to implement since it re-uses existing database data easily enough with zero extra cost. I’ll try and get this in before the next release.

from fulcrum.

zander avatar zander commented on July 30, 2024

this would be useful

from fulcrum.

cculianu avatar cculianu commented on July 30, 2024

Ok I implemented this in PR #210 . Note that I am copying the API of the Electrs & Rostrum implementation. Of note:

  • Electrs/Rostrum return a JSON-RPC error if the address and/or scripthash in question has 0 history (unused). Is this desirable? Can also just return a null result here (but then we would be breaking from Rostrum).
  • It's currently impossible to implement the new 2nd optional argument token_filter here in Fulcrum. This is because Fulcrum doesn't store token history (only token utxos). So the API for this in Fulcrum is like the old pre-token Electrs API.

I am in particular curious about the first bullet-point above. Do we want to return null if the address has no history or do we want to throw an RPC error. I am a bit uncomfortable with throwing an error here because the other blockchain.address.* RPCs only throw on invalid arguments, never on missing history or missing utxos for a particular address.

from fulcrum.

cculianu avatar cculianu commented on July 30, 2024

TBH for the reasons you cited -- it makes more sense to return null here. I will change it and notify in this issue when that's done.

from fulcrum.

cculianu avatar cculianu commented on July 30, 2024

Actually. I just re-read what you wrote. It seems you want to co-ordinate with Rostrum (the only other impl.). Can you ask @dagurval if he is willing to change it?

If so then I will change it. He may listen to you. :)

from fulcrum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.