-
-
Notifications
You must be signed in to change notification settings - Fork 41
Allow multiple transfers by CLI #236
base: master
Are you sure you want to change the base?
Conversation
5994ea7
to
826514b
Compare
I wouldn't worry about making breaking changes in strongly-typed APIs, so long as semver rules are respected. Rust will let developers know they need to make updates. I'd prioritize making the optimal API and maintainable, de-duplicated code instead of worrying about downstream users, at this stage (pre-1.0), at least. |
This is a good advice, thanks! |
Hi @crisdut! This might not be the best approach. Given the RGB invoice could contain multiple endpoints, each with its own protocol, I don't think rgb-node APIs should use storm directly. Actually I think we should completely remove connections between rgb-node and storm, in order to allow more generalized exchange mediums for consignments. In order to achieve the same result of this PR, I propose to edit the finalize CLI command in order to accept a list of end seals only having seal and consignment (without the bifrost endpoint) and to add a separate CLI command (on storm) to send consignments to storm endpoints. |
Hi @zoedberg
I saw your PR to allow the flexibility of transport protocols to consignment files. For now, I think removing the integration between RGB and STORM makes sense, but I would like to discuss a way to propagate consignment files to guarantee a global state (I was working on new integrations between rgb and storm). I will open a discussion later.
I will make the change ASAP Thanks for feedback! |
826514b
to
e26532c
Compare
Hi @zoedberg, I made the changes. Can you review it again, please? I will open a new PR to remove the code related to Storm, but I would like to know if @dr-orlovsky has plans to maintain some integration between the nodes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you review it again, please?
I've reviewed it and left some comments. I don't have the time right now to test it but I assume you already verified it works as expected.
but I would like to know if @dr-orlovsky has plans to maintain some integration between the nodes.
I'm convinced that separating rgb-node from storm is the best architectural choice, so I'd like to first have confirmation from @dr-orlovsky that we're on the same page in this regard. Users of rgb-node should not be forced to also run storm, since it's not required to operate with RGB. In my opinion, any integration between rgb-node and storm should be optional (e.g. via cargo features) or implemented in separate projects.
e26532c
to
fcdf41f
Compare
fcdf41f
to
bd17faa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crisdut there are some commented lines in cli/src/opts.rs
that can be removed but other than that the PR looks good now so I'll approve it, nice job
|
This is a good point... Since the consignment is persisted on-disk and this retains state between invocations, multiple transfers can be added to it just by running the command multiple times using different parameters. Is this what you mean, @dr-orlovsky ? |
|
Ok I see now (re pt 3). I revoke my "Concept NACK". Though I still think the way it is packed into a single command parameter is hard to deal with. Will think on a better approach. So: Concept ACK, approach NACK modulo if we do not find a better one. |
|
It seems to me that the right thing to do is to separate methods for:
Another thing that this PR is API breaking, so it has to be done with bumping RGB Node to |
Sure. We can remove only finalize_transfer for now and maintain the same behavior of the cli (only send one transfer). Does make sense to you? |
I updated the current
rgb-cli transfer finalize
to support multiple transfers with bifrost send option.Before:
Now:
Example:
PS: @zoedberg I didn't modify finalize_transfers because I was afraid of breaking something in rgb-lib.