RGB-WG / rgb-core

RGB Core Library: consensus validation for private & scalable client-validated smart contracts on Bitcoin & Lightning
https://spec.rgb.tech
Apache License 2.0
207 stars 52 forks source link

Clarify the build process in README #105

Closed Goosie closed 2 years ago

Goosie commented 2 years ago

Trying to install rgb-core on ubuntu following the instructions I end in the following warnings, but get a Finished release in the end. After the command ./contrib/test.sh

I got more errors, see under:

rror[E0433]: failed to resolve: use of undeclared crate or module psbt --> /home/perry/.cargo/registry/src/github.com-1ecc6299db9ec823/bp-dbc-0.7.0/src/anchor.rs:35:5 | 35 | use psbt::commit::tapret::ProprietaryKeyTapret; | ^^^^ use of undeclared crate or module psbt

Checking lnpbp_chain v0.7.0
 Running `rustc --crate-name lnpbp_chain --edition=2021 /home/perry/.cargo/registry/src/github.com-1ecc6299db9ec823/lnpbp_chain-0.7.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="serde"' --cfg 'feature="serde_crate"' --cfg 'feature="serde_with"' -C metadata=669ffb605f35ebd3 -C extra-filename=-669ffb605f35ebd3 --out-dir /home/perry/repos/rgb-core/target/debug/deps -L dependency=/home/perry/repos/rgb-core/target/debug/deps --extern amplify=/home/perry/repos/rgb-core/target/debug/deps/libamplify-0cfc6f3b8a774cdf.rmeta --extern bitcoin=/home/perry/repos/rgb-core/target/debug/deps/libbitcoin-0b69ee99256a070b.rmeta --extern bitcoin_hashes=/home/perry/repos/rgb-core/target/debug/deps/libbitcoin_hashes-814f2713d90d6bdf.rmeta --extern lightning_encoding=/home/perry/repos/rgb-core/target/debug/deps/liblightning_encoding-010262c3388e3725.rmeta --extern once_cell=/home/perry/repos/rgb-core/target/debug/deps/libonce_cell-7dbdb3bf4059c672.rmeta --extern serde_crate=/home/perry/repos/rgb-core/target/debug/deps/libserde-ed069ace383f0a0e.rmeta --extern serde_with=/home/perry/repos/rgb-core/target/debug/deps/libserde_with-5599ed008200e0a3.rmeta --extern strict_encoding=/home/perry/repos/rgb-core/target/debug/deps/libstrict_encoding-a9c29fdc56ce016f.rmeta --cap-lints allow -L native=/home/perry/repos/rgb-core/target/debug/build/secp256k1-sys-2fa2869a95908ea6/out -L native=/home/perry/repos/rgb-core/target/debug/build/grin_secp256k1zkp-dbc025c2acc7503c/out`

For more information about this error, try rustc --explain E0433. error: could not compile bp-dbc due to previous error

Caused by: process didn't exit successfully: rustc --crate-name dbc --edition=2021 /home/perry/.cargo/registry/src/github.com-1ecc6299db9ec823/bp-dbc-0.7.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="serde"' --cfg 'feature="serde_crate"' --cfg 'feature="serde_with"' -C metadata=0e96283deb1778bd -C extra-filename=-0e96283deb1778bd --out-dir /home/perry/repos/rgb-core/target/debug/deps -L dependency=/home/perry/repos/rgb-core/target/debug/deps --extern amplify=/home/perry/repos/rgb-core/target/debug/deps/libamplify-0cfc6f3b8a774cdf.rmeta --extern bitcoin=/home/perry/repos/rgb-core/target/debug/deps/libbitcoin-0b69ee99256a070b.rmeta --extern bitcoin_scripts=/home/perry/repos/rgb-core/target/debug/deps/libbitcoin_scripts-9efdaf9a65330d61.rmeta --extern commit_verify=/home/perry/repos/rgb-core/target/debug/deps/libcommit_verify-7720f65d24ed618a.rmeta --extern secp256k1=/home/perry/repos/rgb-core/target/debug/deps/libsecp256k1-b4428a90d622e121.rmeta --extern serde_crate=/home/perry/repos/rgb-core/target/debug/deps/libserde-ed069ace383f0a0e.rmeta --extern serde_with=/home/perry/repos/rgb-core/target/debug/deps/libserde_with-5599ed008200e0a3.rmeta --extern strict_encoding=/home/perry/repos/rgb-core/target/debug/deps/libstrict_encoding-a9c29fdc56ce016f.rmeta --cap-lints allow -L native=/home/perry/repos/rgb-core/target/debug/build/secp256k1-sys-2fa2869a95908ea6/out -L native=/home/perry/repos/rgb-core/target/debug/build/grin_secp256k1zkp-dbc025c2acc7503c/out (exit status: 1) warning: build failed, waiting for other jobs to finish... error: build failed perry@Desktop:~/repos/rgb-core$ cargo build --release --all-features warning: unused variable: regs --> src/vm/alure.rs:39:20 39 fn exec(&self, regs: &mut CoreRegs, site: LibSite) -> ExecStep { ExecStep::Next } ^^^^ help: if this is intentional, prefix it with an underscore: _regs

= note: #[warn(unused_variables)] on by default

warning: unused variable: site --> src/vm/alure.rs:39:41 | 39 | fn exec(&self, regs: &mut CoreRegs, site: LibSite) -> ExecStep { ExecStep::Next } | ^^^^ help: if this is intentional, prefix it with an underscore: _site

warning: unused variable: writer --> src/vm/alure.rs:57:29 | 57 | fn write_args(&self, writer: &mut W) -> Result<(), BytecodeError> | ^^^^^^ help: if this is intentional, prefix it with an underscore: _writer

warning: unused variable: node_subtype --> src/vm/alure.rs:91:9 | 91 | node_subtype: NodeSubtype, | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: _node_subtype

warning: unused variable: previous_owned_rights --> src/vm/alure.rs:92:9 | 92 | previous_owned_rights: &OwnedRights, | ^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: _previous_owned_rights

warning: unused variable: current_owned_rights --> src/vm/alure.rs:93:9 | 93 | current_owned_rights: &OwnedRights, | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: _current_owned_rights

warning: unused variable: previous_public_rights --> src/vm/alure.rs:94:9 | 94 | previous_public_rights: &PublicRights, | ^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: _previous_public_rights

warning: unused variable: current_public_rights --> src/vm/alure.rs:95:9 | 95 | current_public_rights: &PublicRights, | ^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: _current_public_rights

warning: unused variable: current_meta --> src/vm/alure.rs:96:9 | 96 | current_meta: &Metadata, | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: _current_meta

warning: unused variable: format --> src/schema/state.rs:169:49 | 169 | StateSchema::CustomData(format) => { | ^^^^^^ help: if this is intentional, prefix it with an underscore: _format

warning: unused variable: data --> src/schema/state.rs:178:38 | 178 | ... Some(data) => { | ^^^^ help: if this is intentional, prefix it with an underscore: _data

warning: rgb-core (lib) generated 11 warnings Finished release [optimized] target(s) in 0.37s perry@Desktop:~/repos/rgb-core$

After the command ./contrib/test.sh I got this: use psbt::commit::tapret::ProprietaryKeyTapret; | ^^^^ use of undeclared crate or module psbt

Checking psbt v0.7.1
 Running `rustc --crate-name psbt --edition=2018 /home/perry/.cargo/registry/src/github.com-1ecc6299db9ec823/psbt-0.7.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="serde"' --cfg 'feature="serde_crate"' --cfg 'feature="serde_with"' -C metadata=db5f6870ff2b5321 -C extra-filename=-db5f6870ff2b5321 --out-dir /home/perry/repos/rgb-core/target/debug/deps -L dependency=/home/perry/repos/rgb-core/target/debug/deps --extern amplify=/home/perry/repos/rgb-core/target/debug/deps/libamplify-0cfc6f3b8a774cdf.rmeta --extern bitcoin=/home/perry/repos/rgb-core/target/debug/deps/libbitcoin-0b69ee99256a070b.rmeta --extern bitcoin_hd=/home/perry/repos/rgb-core/target/debug/deps/libbitcoin_hd-e93c666fc44b4879.rmeta --extern bitcoin_onchain=/home/perry/repos/rgb-core/target/debug/deps/libbitcoin_onchain-a2f1ffea28eaee13.rmeta --extern bitcoin_scripts=/home/perry/repos/rgb-core/target/debug/deps/libbitcoin_scripts-9efdaf9a65330d61.rmeta --extern descriptors=/home/perry/repos/rgb-core/target/debug/deps/libdescriptors-68604e276a23f4c7.rmeta --extern serde_crate=/home/perry/repos/rgb-core/target/debug/deps/libserde-ed069ace383f0a0e.rmeta --extern serde_with=/home/perry/repos/rgb-core/target/debug/deps/libserde_with-5599ed008200e0a3.rmeta --extern strict_encoding=/home/perry/repos/rgb-core/target/debug/deps/libstrict_encoding-a9c29fdc56ce016f.rmeta --cap-lints allow -L native=/home/perry/repos/rgb-core/target/debug/build/secp256k1-sys-2fa2869a95908ea6/out -L native=/home/perry/repos/rgb-core/target/debug/build/grin_secp256k1zkp-dbc025c2acc7503c/out -L native=/home/perry/repos/rgb-core/target/debug/build/ring-025733044edd5123/out`

For more information about this error, try rustc --explain E0433. error: could not compile bp-dbc due to previous error

Caused by: process didn't exit successfully: rustc --crate-name dbc --edition=2021 /home/perry/.cargo/registry/src/github.com-1ecc6299db9ec823/bp-dbc-0.7.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="serde"' --cfg 'feature="serde_crate"' --cfg 'feature="serde_with"' -C metadata=0e96283deb1778bd -C extra-filename=-0e96283deb1778bd --out-dir /home/perry/repos/rgb-core/target/debug/deps -L dependency=/home/perry/repos/rgb-core/target/debug/deps --extern amplify=/home/perry/repos/rgb-core/target/debug/deps/libamplify-0cfc6f3b8a774cdf.rmeta --extern bitcoin=/home/perry/repos/rgb-core/target/debug/deps/libbitcoin-0b69ee99256a070b.rmeta --extern bitcoin_scripts=/home/perry/repos/rgb-core/target/debug/deps/libbitcoin_scripts-9efdaf9a65330d61.rmeta --extern commit_verify=/home/perry/repos/rgb-core/target/debug/deps/libcommit_verify-7720f65d24ed618a.rmeta --extern secp256k1=/home/perry/repos/rgb-core/target/debug/deps/libsecp256k1-b4428a90d622e121.rmeta --extern serde_crate=/home/perry/repos/rgb-core/target/debug/deps/libserde-ed069ace383f0a0e.rmeta --extern serde_with=/home/perry/repos/rgb-core/target/debug/deps/libserde_with-5599ed008200e0a3.rmeta --extern strict_encoding=/home/perry/repos/rgb-core/target/debug/deps/libstrict_encoding-a9c29fdc56ce016f.rmeta --cap-lints allow -L native=/home/perry/repos/rgb-core/target/debug/build/secp256k1-sys-2fa2869a95908ea6/out -L native=/home/perry/repos/rgb-core/target/debug/build/grin_secp256k1zkp-dbc025c2acc7503c/out (exit status: 1) warning: build failed, waiting for other jobs to finish... error: build failed

dr-orlovsky commented 2 years ago

These are non-important warnings (noise) coming from my initial work on command-line binaries, which are not complete. This code is not used in the library build and these warnings do not affect the library itself.

The contrib/test.sh is very outdated. Also, ~50% of all unit tests has to be re-implemented since this release breaks binary compatibility with previous versions and the tests on the binary compatibility are all failing (they are not yet updated since creation of new dummy test data will take days, and I will work on them after v0.8 only; these tests are important on maintaining compatibility in the future, but not for the release).

Goosie commented 2 years ago

Oké, maybe an idea to make a comment about this in the readme. Let's try to play further.

dr-orlovsky commented 2 years ago

Yep. I see that the whole readme (and especially installation section) is significantly outdated and has to be rewritten.

dr-orlovsky commented 2 years ago

Readme file is updated. This library has to be used only in context of other rust projects, so there is no point in its standalone compilation - so I updated the description accordingly. From the end-user perspective the binaries to work with RGB will be provided by RGB standard library and RGB Node.