You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue contains several discussions over the current channel_config API
the logic of checking a channel already exists should be included in the create channel_config task -- leaving this to be manually specified by users are slightly troublesome and prone to errors.
So the return value might require changes: path shouldn't be returned since it is required as an input parameter; exist: bool could be added as the return of create action
AFAIU, create contains both "creating a new channel" AND "updating an existing channel". If so, maybe this should be noted in the documentation, as the task is being named as "creating a new channel config"
fetch operation should be of a separate module called channel_config_info which follows the commonly shared pattern of other modules (certificate_authority and certificate_authority_info etc.)
The primary reason for this separation is cleaner, consistent API, since fetch would return a channel_config object whereas create, update, sign and update might at most returns a status bit.
in the doc, *-policy.json is used whereas in tutorial/08-*.yml, *.json.j2 is used. Might be great to document down the various format supported and give example of commonly used policies including m-out-of-n channel update policy, operator, writer, reader permission etc.
To summarize, here is a tentative todo list:
merge channel existence check into create API logic
revise on return API of channel_config module
move fetch into a separate module named channel_config_info
update documentations on "create & update channel config", and on "policy examples & supported format"
👍 thanks! All suggestions above would be subjected to further discussions. Please let me know your thought~
The text was updated successfully, but these errors were encountered:
FYI, operation: create only allows you to create new channels, it does not allow you to update them.
I'm not sure about the splitting out of operation: fetch into a channel_config_info. The _info modules generally return information as the result, and are read-only. However operation: fetch fetches the latest config and writes it to the file system, and does not return any useful information in the result.
This issue contains several discussions over the current
channel_config
APIthe logic of checking a channel already exists should be included in the
create
channel_config task -- leaving this to be manually specified by users are slightly troublesome and prone to errors.So the return value might require changes:
path
shouldn't be returned since it is required as an input parameter;exist: bool
could be added as the return ofcreate
actionAFAIU,
create
contains both "creating a new channel" AND "updating an existing channel". If so, maybe this should be noted in the documentation, as the task is being named as "creating a new channel config"fetch
operation should be of a separate module calledchannel_config_info
which follows the commonly shared pattern of other modules (certificate_authority and certificate_authority_info etc.)The primary reason for this separation is cleaner, consistent API, since
fetch
would return achannel_config
object whereascreate
,update
,sign
andupdate
might at most returns a status bit.in the doc,
*-policy.json
is used whereas intutorial/08-*.yml
,*.json.j2
is used. Might be great to document down the various format supported and give example of commonly used policies includingm-out-of-n
channel update policy,operator, writer, reader
permission etc.To summarize, here is a tentative todo list:
create
API logicchannel_config
modulemovefetch
into a separate module namedchannel_config_info
👍 thanks! All suggestions above would be subjected to further discussions. Please let me know your thought~
The text was updated successfully, but these errors were encountered: