metachain
metachain copied to clipboard
Metachain exposing control RPCs through feature gate
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: 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.
/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
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?
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.