Skip to content

Conversation

@Sjors
Copy link
Member

@Sjors Sjors commented Feb 27, 2019

This changes range: {begin: ..., end: ...} parameter for deriveaddress to range: {start: ..., end: ...} to be consistent with importmulti.

@Sjors
Copy link
Member Author

Sjors commented Feb 27, 2019

Pointed out by @instagibbs in the original PR. Would be nice to get this into 0.18. Fixed a grammar nit as well.

@instagibbs
Copy link
Member

utACK 483b1c0

@promag
Copy link
Contributor

promag commented Feb 27, 2019

After consistency, personally I prefer begin/end and start/stop.

@Sjors
Copy link
Member Author

Sjors commented Feb 27, 2019

I can change importmulti to use begin ... end instead if people prefer. I find start ... end and begin ... end fine, but not start ... stop.

@maflcko maflcko added the Docs label Feb 27, 2019
@maflcko maflcko added this to the 0.18.0 milestone Feb 27, 2019
@laanwj
Copy link
Member

laanwj commented Feb 27, 2019

Good catch. Makes sense to at least be consistent between calls.

@meshcollider
Copy link
Contributor

utACK 483b1c0

@sipa
Copy link
Member

sipa commented Feb 27, 2019

Given that both importmulti and deriveaddress are new in 0.18, would it be worthwhile to make it compatible with scantxoutset (which uses a parameter called "range", but not start position)?

@instagibbs
Copy link
Member

@sipa importmulti would have collisions if you try to import 100, then another 100?

@sipa
Copy link
Member

sipa commented Feb 27, 2019

@instagibbs Well clearly importmulti should support a range that doesn't start at 0. My suggestion is whether we want to consider naming the argument "range" rather than stop or end, to be compatible with scantxoutset (which is already in 0.17). What about "range" : [start,stop] for start-stop, and "range" : stop for 0-stop?

@sipa
Copy link
Member

sipa commented Feb 27, 2019

@instagibbs See #15497.

@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #15497 (Consistent range arguments in scantxoutset/importmulti/deriveaddresses by sipa)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@laanwj laanwj removed this from the 0.18.0 milestone Feb 28, 2019
@laanwj
Copy link
Member

laanwj commented Feb 28, 2019

Replacing this with #15497 in the 0.18 milestone.

@Sjors Sjors closed this Feb 28, 2019
maflcko pushed a commit that referenced this pull request Mar 1, 2019
…ulti/deriveaddresses

ca253f6 Make deriveaddresses use stop/[start,stop] notation for ranges (Pieter Wuille)
1675b7c Use stop/[start,stop] notation in importmulti desc range (Pieter Wuille)
4566011 Add support for stop/[start,stop] ranges to scantxoutset (Pieter Wuille)
6b9f45e Support ranges arguments in RPC help (Pieter Wuille)
7aa6a8a Add ParseRange function to parse args of the form int/[int,int] (Pieter Wuille)

Pull request description:

  This introduces a consistent notation for RPC arguments in `scantxoutset`, `importmulti`, and `deriveaddresses`, either:
  * `"range" : int` to just specify the end of the range
  * `"range" : [int,int]` to specify both the begin and the end of the range.

  For `scantxoutset`, this is a backward compatible new feature. For the two other RPCs, it's an incompatible change, but neither of them has been in a release so far. Because of that non-released reason, this only makes sense in 0.18, in my opinion.

  I suggest this as an alternative to #15496, which only makes `deriveaddresses` compatible with `importmulti`, but not with the existing `scantxoutset` RPC. I also think `[int,int]` is more convenient than `{"start":int,"stop":int}`.

  I realize this is technically a feature added to `scantxoutset` after the feature freeze. If desired, I'll drop the `scantxoutset` changes.

Tree-SHA512: 1cbebb90cf34f106786dbcec7afbf3f43fb8b7e46cc7e6763faf1bc1babf12375a1b3c3cf86ee83c21ed2171d99b5a2f60331850bc613db25538c38b6a056676
dzutto pushed a commit to dzutto/dash that referenced this pull request Dec 1, 2021
…importmulti/deriveaddresses

ca253f6 Make deriveaddresses use stop/[start,stop] notation for ranges (Pieter Wuille)
1675b7c Use stop/[start,stop] notation in importmulti desc range (Pieter Wuille)
4566011 Add support for stop/[start,stop] ranges to scantxoutset (Pieter Wuille)
6b9f45e Support ranges arguments in RPC help (Pieter Wuille)
7aa6a8a Add ParseRange function to parse args of the form int/[int,int] (Pieter Wuille)

Pull request description:

  This introduces a consistent notation for RPC arguments in `scantxoutset`, `importmulti`, and `deriveaddresses`, either:
  * `"range" : int` to just specify the end of the range
  * `"range" : [int,int]` to specify both the begin and the end of the range.

  For `scantxoutset`, this is a backward compatible new feature. For the two other RPCs, it's an incompatible change, but neither of them has been in a release so far. Because of that non-released reason, this only makes sense in 0.18, in my opinion.

  I suggest this as an alternative to bitcoin#15496, which only makes `deriveaddresses` compatible with `importmulti`, but not with the existing `scantxoutset` RPC. I also think `[int,int]` is more convenient than `{"start":int,"stop":int}`.

  I realize this is technically a feature added to `scantxoutset` after the feature freeze. If desired, I'll drop the `scantxoutset` changes.

Tree-SHA512: 1cbebb90cf34f106786dbcec7afbf3f43fb8b7e46cc7e6763faf1bc1babf12375a1b3c3cf86ee83c21ed2171d99b5a2f60331850bc613db25538c38b6a056676
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
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.

8 participants