Metadata Portal is a self-hosted web page that shows you the latest metadata for a given network.
This is an important addition to Signer, which can update the metadata inside only through a special video QR code without going online. Parity will host its own version of the page for all chains for which we sign the metadata. External users (chain owners) will be able to deploy their versions of metadata portal if they want.
List of supported chains is published in Nova-utils repository
It all starts with the Github repository. Any user can clone it and run their Metadata Portal. We also host our own version, so let's break down the principles of working on it.
Metadata Portal supports two metadata sources in parallel. Both are equally important for different types of users.
By default, only production networks are displayed in the user interface.
If you'd like to get all list of networks including test networks add /dev
to the url. For example https://novasamatech.github.io/metadata-portal/#/dev
This flow is important for all users who want to always have the latest metadata in their signing devices to parse and sign their transactions right away.
make updater
make signer
locally to sign new metadata using his signing air-gapped deviceThis flow is for security-oriented users and Parity itself. It allows chain owners to sign their metadata updates and host QR codes for their users.
This flow is not recommended because private key
should be stored in CI configuration
and passed as command line argument.
This flow is important for all users who want to always have the latest metadata in their signing devices to parse and sign their transactions right away.
make updsigner --signing-key=<private key> --source=<source>
<private key>
is a private key for signinggithub
or node
You can use Github Pages to host the metadata-portal for your set of chains
config-template.toml
. The key can be exported from parity-signercargo run --release -- update-chain-config
for updating the config.toml
filecargo run --release -- update-chain-config --env dev
for updating the config_dev.toml
file from chains_dev.json
gh-pages
branch (Settings
-> Pages
-> Source
)homepage
field in package.json
public/CNAME
fileNOTIFY_MATRIX: false
in .github/workflows/update.yml
MATRIX_SERVER
, MATRIX_ROOM_ID
, MATRIX_ACCESS_TOKEN
values to project Actions secretsYou can use Github Pages to host the metadata-portal for your set of chains
config.toml
gh-pages
branch (Settings
-> Pages
-> Source
)homepage
field in package.json
public/CNAME
fileNOTIFY_MATRIX: false
in .github/workflows/update.yml
MATRIX_SERVER
, MATRIX_ROOM_ID
, MATRIX_ACCESS_TOKEN
values to project Actions secretsUpdate chains_config file
action in order to update config.toml
and config_dev.toml
filesCheck updates&sign
runs automatically by cron and generates QRs for production chainsDeploy
runs automatically after the PR mergeIf you'd like to update test networks from chains_dev
file then run
Update chains_config file
action with dev
environment parametercargo run --release -- -c=config_dev.toml update --sign --signing-key ${{secrets.SIGNING_KEY}} --source node
in order to generate metadata for all networks including test networksThe main requirement is the OpenCV. You can check this manual: https://crates.io/crates/opencv
OpenCV package in Arch is suitable for this.
pacman -S clang qt5-base opencv
sudo apt install libopencv-dev clang libclang-dev
You have several options of getting the OpenCV library:
install it from the repository, make sure to install -dev
packages because they contain headers necessary
for the crate build (also check that your package contains pkg_config
or cmake
files).
build OpenCV manually and set up the following environment variables prior to building the project with
opencv
crate:
PKG_CONFIG_PATH
for the location of *.pc
files or OpenCV_DIR
for the location of *.cmake
filesLD_LIBRARY_PATH
for where to look for the installed *.so
files during runtimeAdditionally, please make sure to install clang
package or its derivative that contains libclang.so
and
clang
binary.
clang
clang
and libclang-dev
brew install opencv
If you're getting dyld: Library not loaded: @rpath/libclang.dylib
:
OS can't find libclang.dylib dynamic library because it resides in a non-standard path, set up the DYLD_FALLBACK_LIBRARY_PATH environment variable to point to the path where libclang.dylib can be found, e.g. for XCode:
export DYLD_FALLBACK_LIBRARY_PATH="$(xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/lib/"
Before running the frontend locally, you need to generate a data file:
make collector
And then run the app in the development mode
yarn start
Metadata Portal is available under the GNU GENERAL license. See the LICENSE file for more info. © Novasama Technologies GmbH 2023