Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

Metachain exposing control RPCs through feature gate #146

Open
wafflespeanut opened this issue Nov 1, 2022 · 4 comments · May be fixed by #167
Open

Metachain exposing control RPCs through feature gate #146

wafflespeanut opened this issue Nov 1, 2022 · 4 comments · May be fixed by #167
Assignees
Labels
area/ain issues/pr that requires changes on the DeFiCh/ain codebase. area/meta kind/feature New feature request meta/node triage/accepted Triage has been accepted

Comments

@wafflespeanut
Copy link

wafflespeanut commented Nov 1, 2022

As per the discussion from #97 and #106, we've decided to prepackage defid with metachain for production and expose control RPCs only for testing. We can set a flag at build-time for both metachain and ain, so that metachain exposes the RPC and ain enforces a -meta-url when -meta flag is missing.

Note that it won't even be possible to set this URL in a production build.

@wafflespeanut wafflespeanut added kind/feature New feature request meta/node area/meta area/ain issues/pr that requires changes on the DeFiCh/ain codebase. labels Nov 1, 2022
@wafflespeanut wafflespeanut self-assigned this Nov 1, 2022
@defichain-bot defichain-bot added the needs/triage Waiting for triage to be accepted label Nov 1, 2022
@defichain-bot
Copy link
Member

@wafflespeanut: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

Details

I am a bot created to help the DeFiCh developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@fuxingloh
Copy link
Contributor

/triage accepted

Note that it won't even be possible to set this URL in a production build.

I don't think we should restrict the feature based on the release channels. We should make it network-based. The current convention on defid is to allow customizable flags when used in conjunction with -regtest network.

https://github.com/DeFiCh/ain/blob/94e6b978f58b55809f2dc4929a4b32280b99bd7b/src/init.cpp#L483-L509

@defichain-bot defichain-bot added triage/accepted Triage has been accepted and removed needs/triage Waiting for triage to be accepted labels Nov 2, 2022
@wafflespeanut
Copy link
Author

Might need further clarification here. If we pass RPC URL, then defid doesn't need to have prepackaged metachain, in which case we can get rid of linking to libmetachain dependency entirely, so it's better to have it as a build time flag right? Or do you mean that defid executable will always have metachain prepackaged and if we pass RPC URL, it will switch to using RPC client instead of calling FFI?

@fuxingloh
Copy link
Contributor

Might need further clarification here. If we pass RPC URL, then defid doesn't need to have prepackaged metachain, in which case we can get rid of linking to libmetachain dependency entirely, so it's better to have it as a build time flag right? Or do you mean that defid executable will always have metachain prepackaged and if we pass RPC URL, it will switch to using RPC client instead of calling FFI?

The latter.

The defid executable will always have metachain prepackaged and if we pass RPC URL flag with the -regtest flag, it will switch to using RPC client instead of calling FFI.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/ain issues/pr that requires changes on the DeFiCh/ain codebase. area/meta kind/feature New feature request meta/node triage/accepted Triage has been accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants