Comments (8)
Are you building inside docker? This could be due to a proto compiler mismatch.
from subzero.
Thanks Alok for your help. I am building on a MacOS laptop from the source (no docker). I installed protoc using homebrew. Is there a specific version I should look for?
from subzero.
The dockerfile uses 3.5.2. On my mac, I believe I have used 3.6.1 (I can confirm that tomorrow).
from subzero.
3.6.1 on mac os works. What version are you using?
You might want to try picking up #37 and running
mkdir core/build
cd core/build
TARGET=dev CURRENCY=btc-testnet cmake ../
make
from subzero.
Yes I had that same protoc version. Those instructions worked fine though.
Originally I had cloned the nanopb and trezor-crypto dependencies myself. I guess something went wrong with that. Now with the submodules this is how I did:
git fetch origin pull/37/head:pull_37
git checkout pull_37
git submodule update --init --recursive
And then the build instructions you provided:
mkdir core/build
cd core/build
TARGET=dev CURRENCY=btc-testnet cmake ../
make
Now when I run ./subzero
I see the error below:
[ERROR] src/checks/validate_fees.c:118 (next line is expected to show red text...)
[ERROR] src/sign.c:243 validate_fees: fee underflow for output 1.
But those don't prevent it from starting as I see final message [INFO] src/main.c:94 waiting for client
.
Are the errors above expected behaviour for execution outside HSM?
This is the complete output:
C02WW21FHV2Q:build a530616101$ ./subzero
[DEBUG] src/main.c:28 in main
[DEBUG] src/dev/check_ver.c:59 writing version file (/tmp/.subzero-ver).
[INFO] src/main.c:40 running self checks.
[INFO] src/checks/verify_mix_entropy.c:55 verify_mix_entropy: ok
[INFO] src/checks/verify_protect_pubkey.c:31 verify_protect_pubkey: ok
[INFO] src/checks/bip32.c:93 verify_bip32 ok
[INFO] src/checks/check_sign_tx.c:108 checking sign_tx.
[DEBUG] src/sign.c:530 Loaded pubkey 0: tpubD9jBarsLCKot45kvTTu7yWxmNnkBPbpn2CgS1F3yuxZGgohTkamYwJJKenZHrsYwPRJY66dk3ZUt3aZwZqFf7QGsgUUUcNSvvb9NXHFt5Vb
[DEBUG] src/sign.c:530 Loaded pubkey 1: tpubD8u5eHk8B6q63G4ekfBB2eVCeBYTrW2uCvi7Z3BF6bY2z33jW14Uzna8f5cFQWS3HFwdAzUWxqESq7j5x2CUQ7uBPgpXnpf8X9FPnh63XYd
[DEBUG] src/sign.c:530 Loaded pubkey 2: tpubD9dkteiWZqa3jL17meqVvy1RSUQsmJvU3hBfAosMzrSa69DacRku8yHy3E2fma1Q4Den25ukcsBL3bYTFyKjKbF8CEWHu86Xg9YXiY6CkeC
[DEBUG] src/sign.c:530 Loaded pubkey 3: tpubD8GrNWdYHDjdJryH5tng8LUzHSrEo4gToaguKnzthEqTxyfF13jTsp4sMtmso4n1VC58R5Wvt4Ua4npZTecR1xaGGYJgLLQj5sQGdD2xh2N
[DEBUG] src/sign.c:29 Computing prevout hash, input 0
27d180c652f83556518040d296fc5a00aa2bee8bcba11e6b5789c0a3c66573d3
00000000
[DEBUG] src/sign.c:537 prevoutsHash
1beaae4b6bb87b2892b4ce4ffe0ec228602a8f4ead2d436d029f7fb299b4d31e
[DEBUG] src/sign.c:545 seqHash
18606b350cd8bf565266bc352f0caddcf01e8fa789dd8a15386327cf8cabe198
[DEBUG] src/sign.c:331 public_key:
0263ca186765e4df92ef8d1fc39fb8f4f1cef6000dfd5752f1dbde4b79c9d5d9df
[DEBUG] src/sign.c:372 hashing output script:
1976a91414b8b8a87b0695442f9df6858a42ef399db3fab588ac
[DEBUG] src/sign.c:554 outputHash
65e916ab1b0f368cac37059e2b732fce7c7db8e35e3dd3f30a7de6cc09889acf
[DEBUG] src/sign.c:265 hash_input
010000001beaae4b6bb87b2892b4ce4ffe0ec228602a8f4ead2d436d029f7fb299b4d31e
18606b350cd8bf565266bc352f0caddcf01e8fa789dd8a15386327cf8cabe198
27d180c652f83556518040d296fc5a00aa2bee8bcba11e6b5789c0a3c66573d3
00000000[DEBUG] src/sign.c:293 script.data:
8b52210242d1e4eb9d5b8102013c71210aaceb1ef83d400a70dc7103634cdbb6fead7c7b21025773e967c3adcafc6d2958254c4609360ef7cb5d0cd3c2858a00bcc060f5a99e2102abbc5c832a0e7ed5fd4dedd1618d0bf4052a66a0aab7d0f6716ec8c2a7f56d422102f48bd236291c172b83002f51d859627ea926b7d4b83df4cd85327987cee8da0054ae
40420f0000000000feffffff65e916ab1b0f368cac37059e2b732fce7c7db8e35e3dd3f30a7de6cc09889acf
0000000001000000
[DEBUG] src/sign.c:318 That's it folks. Final input hash:
20e02943a743fd5d1eb1092699aa17872d9d064e20ccfe5c35c93ccbb2c33355
[DEBUG] src/sign.c:590 Signing for pubkey 0
[DEBUG] src/sign.c:617 Successfully validated with public key:
0242d1e4eb9d5b8102013c71210aaceb1ef83d400a70dc7103634cdbb6fead7c7b
[DEBUG] src/sign.c:624 Signature:
30450221009db16421c956c694498acce44eb4de031cc87187f12860fa11377993e4621a8f02203e80612543f4f7b4d2d7c7e59c3977014fec7ce59f97305e9a2f5ee91dc420b8
[INFO] src/checks/check_sign_tx.c:135 sign_tx passed
[ERROR] src/checks/validate_fees.c:118 (next line is expected to show red text...)
[ERROR] src/sign.c:243 validate_fees: fee underflow for output 1.
[INFO] src/checks/validate_fees.c:127 verify_validate_fees: ok
[INFO] src/main.c:47 self-checks passed.
[INFO] src/main.c:94 waiting for client.
from subzero.
Great! Sorry for not including the submodule in the first place, I didn't set things up the right way.
Yes, the code performs a bunch of self checks at startup. We do this, because our CI infrastructure don't have HSMs. I guess I could set/unset a flag to not show the output in red?
You are now ready to talk to the C code from the Java GUI (or your own custom thing if you don't want to use the GUI).
The java piece is still missing a bunch of build scripts, which I'm currently working on.
from subzero.
I think it is ok the way it is in red. Thanks a lot for your help on this.
from subzero.
I'm going to close this ticket. I'll post an update in #11 once our build story improves (I'm getting close -- probably need another few days and we should be good).
from subzero.
Related Issues (20)
- Document when/how to use fake_ncipher module vs nCipherKM.jar
- Disable unix users and make DVD a kiosk-like app
- Create an automated demo.iso build
- Use a single proto file for C and Java
- Hook up coveralls.io
- Hook up linter/static analyzer/fuzzer HOT 1
- Improve pom.xml library versioning HOT 1
- Single ISO for dev/staging/prod
- Simplify segwit code in java/
- Speed up boot time
- Additional validation in Java code
- Mix entropy with hmac instead of xor HOT 2
- Improve dev/staging experience HOT 1
- InitWallet.java incorrectly sets currency to Wallet.Currency.TEST_NET HOT 2
- Document a threat model
- There is a vulnerability in Bouncy Castle 1.58.0.0 ,upgrade recommended HOT 2
- Security Policy violation Outside Collaborators HOT 6
- Error validating transaction: Error running script for input 0 referencing <vin-txid> at 0: Script was NOT verified successfully
- CentOS 8 is deprecated for core Dockerfile
- Security Policy violation Binary Artifacts HOT 124
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from subzero.