Hyperledger Iroha

86 Members
blockchain framework for mobile apps https://github.com/hyperledger/iroha4 Servers

Load older messages

Timestamp Message
14 Feb 2019
18:52:44@gitter_asifjav71696631_twitter:matrix.orgAsif Javed (Gitter) hi everyone,
i am new on Iroha.
can somebody guide me ?
18:58:19@gitter_liralemur:matrix.orgSara (Gitter) @AsifJav71696631_twitter Hi! Sure :) You can start here: https://iroha.readthedocs.io/en/master/getting_started/index.html
18:59:04@gitter_asifjav71696631_twitter:matrix.orgAsif Javed (Gitter) set a profile picture.
18:59:06@gitter_asifjav71696631_twitter:matrix.orgAsif Javed (Gitter) @LiraLemur ok
19:00:48@gitter_liralemur:matrix.orgSara (Gitter) @AsifJav71696631_twitter and we're always here if any questions occur)
19:53:28@gitter_frgomes:matrix.orgRichard Gomes (Gitter)

Hello, I'm doing a simple PoC based on iroha-java/.../Example2.java, but written in Scala.
This is the code:

        import jp.co.soramitsu.iroha.java.{IrohaAPI, Transaction, TransactionStatusObserver}

        val api: IrohaAPI = new IrohaAPI(host, port)

        val tx =
            .createAsset("usd", defaultDomain, 2)

        val observer =
            .onComplete            (() => println("Complete"))
            .onError               (t  => println(s"Failed with exception: ${t}"))
            .onTransactionCommitted(t  => println(s"Committed: ${t}"))
            .onTransactionFailed   (t  => println(s"Failed transaction ${t.getTxHash} with message: ${t.getErrOrCmdName}"))


where Admin.id = "admin@test" and key pairs are defined like this:

    val defaultKeyPair: KeyPair =

    val peerKeyPair: KeyPair =

If I sign with defaultKeyPair (as shown above), I obtain an error message saying "signature validation". If I substitute defaultKeyPair by peerKeyPair, I obtain "wrong signature".


19:54:56@gitter_frgomes:matrix.orgRichard Gomes (Gitter) (edited) ... in Scala. This ... => ... in Scala, using the default development Docker image based on 1.0.0_rc3. This ...
19:55:24@gitter_sorabot:matrix.orgsorabot (Gitter) B V via telegram
where did you get peerKeyPair?
19:56:20@gitter_sorabot:matrix.orgsorabot (Gitter) B V via telegram
double check arguments, I have a feeling that you need to change order in second Ed25519Sha3.keyPairFromBytes
19:56:44@gitter_frgomes:matrix.orgRichard Gomes (Gitter) From node0.pub and node0.priv
root@43f287e6069f:/opt/iroha_data# ls -al
total 56
drwxr-xr-x 4 1000 1000 4096 Feb 13 20:33 .
drwxr-xr-x 1 root root 4096 Feb 11 19:59 ..
-rw-r--r-- 1 1000 1000   48 Feb  1 21:51 README.md
-rw-r--r-- 1 1000 1000   64 Feb  1 21:51 admin@test.priv
-rw-r--r-- 1 1000 1000   64 Feb  1 21:51 admin@test.pub
-rw-r--r-- 1 1000 1000  312 Feb 13 14:29 config-win.sample
-rw-r--r-- 1 1000 1000  317 Feb 13 14:29 config.docker
-rw-r--r-- 1 1000 1000  314 Feb 13 14:29 config.sample
-rw-r--r-- 1 1000 1000 5153 Feb  1 21:51 genesis.block
drwxr-xr-x 2 1000 1000 4096 Feb  1 21:51 java
-rw-r--r-- 1 1000 1000   64 Feb  1 21:51 node0.priv
-rw-r--r-- 1 1000 1000   64 Feb  1 21:51 node0.pub
drwxr-xr-x 3 1000 1000 4096 Feb 13 14:29 python
19:59:40@gitter_frgomes:matrix.orgRichard Gomes (Gitter)
root@43f287e6069f:/opt/iroha_data# echo $(cat node0.pub)

root@43f287e6069f:/opt/iroha_data# echo $(cat node0.priv)
20:00:57@gitter_sorabot:matrix.orgsorabot (Gitter) B V via telegram
yep, I was right. for peerKeyPair you need to swap arguments
20:00:58@gitter_sorabot:matrix.orgsorabot (Gitter) B V via telegram
20:01:01@gitter_frgomes:matrix.orgRichard Gomes (Gitter) It's public key then private key:
  public static KeyPair keyPairFromBytes(byte[] privateKey, byte[] publicKey) {
    return new KeyPair(
20:01:09@gitter_sorabot:matrix.orgsorabot (Gitter) B V via telegram
1arg is private key
20:02:28@gitter_frgomes:matrix.orgRichard Gomes (Gitter) Oh... I've just realized that the order of arguments are swaped in relation to the way KeyPair is built!!!
20:03:28@gitter_frgomes:matrix.orgRichard Gomes (Gitter)Thanks a lot!
20:06:57@gitter_sorabot:matrix.orgsorabot (Gitter) B V via telegram
20:27:28@gitter_frgomes:matrix.orgRichard Gomes (Gitter) Solved. I have to sign with the keypair relative to the transaction builder (account id).
Moreover... the problem was pub and priv keys inverted, as you've pointed out.
        val tx =
            .createAsset("usd", defaultDomain, 2)
20:28:21@gitter_frgomes:matrix.orgRichard Gomes (Gitter) (edited) ... was pub and priv keys inverted, as ... => ... was swapped pub and priv keys, as ...
16 Feb 2019
13:26:00@gitter_sorabot:matrix.orgsorabot (Gitter) SaraG via rocketchat
Hi everyone! Yesterday I uploaded a video made by one of the contributors some time ago, where he uses Iroha as a base for messaging app. It's based on older Iroha version but pretty cool and simple: https://youtu.be/CDrHzjGecLI If you want to challenge yourself, you are also welcome to make a PR for an update :)
17 Feb 2019
16:22:56@gitter_sorabot:matrix.orgsorabot (Gitter) Renji Panicker via telegram
Hi all, is there some place I can get the max values for various parameters in Iroha? e.g: max number of assets per account, max value of amount, max size of key-value pairs, etc. Thank you in advance!
17:20:30@gitter_sorabot:matrix.orgsorabot (Gitter) Nikolay Soramitsu via telegram
Stateless validation rules are attached to each command/query description, in Validation part
17:20:50@gitter_sorabot:matrix.orgsorabot (Gitter) Nikolay Soramitsu via telegram
Check section #5 API in iroha.readthedocs.io
17:21:13@gitter_sorabot:matrix.orgsorabot (Gitter) Renji Panicker via telegram
Thank you so much!
17:21:23@gitter_sorabot:matrix.orgsorabot (Gitter) Nikolay Soramitsu via telegram
You are welcome 🙏🏻
17:21:47@gitter_sorabot:matrix.orgsorabot (Gitter) Nikolay Soramitsu via telegram
Sorry #6
17:22:24@gitter_sorabot:matrix.orgsorabot (Gitter) Nikolay Soramitsu via telegram
17:22:30@gitter_sorabot:matrix.orgsorabot (Gitter) Nikolay Soramitsu via telegram
You need to scroll a table though :)
17:23:18@gitter_sorabot:matrix.orgsorabot (Gitter) Renji Panicker via telegram
I realised that as I was just checking that link. Its very helpful!

There are no newer messages yet.

Back to Room List