polkadot-java / api

Java APIs around Polkadot and any Substrate-based chain RPC calls. It is dynamically generated based on what the Substrate runtime provides in terms of metadata.Full documentation & examples available.
https://polkadot-java.github.io/
Apache License 2.0
61 stars 28 forks source link

调用jni签名,签出的串无法广播出去 #17

Closed debuggor closed 5 years ago

debuggor commented 5 years ago

new byte[][]{ // 测试用例,用这一组公私钥对 hexToU8a("0x081ff694633e255136bdb456c20a5fc8fed21f8b964c11bb17ff534ce80ebd5941ae88f85d0c1bfc37be41c904e1dfc01de8c8067b0d6d5df25dd1ac0894a325"), hexToU8a("0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48") },

对应的公私钥对生成的地址:5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty 这个地址里面有0.1 testDOT,我跑项目中给的rx E09_TransferEvents,签出的串无法用 author.submitextrinsic广播出去 from:5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty to: 5EcAm6nPxc11xYpsEAt6xvpMYnXzUyphC113ypy3tj5N7w9a amount: 10000000000000L 签出的串:0x390281ff8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4844cdd0896adfd6076fc57501a9b183e1bc07552580c00aceff26809b7c342a36cd37fb817e48f45d9a9c98e88e1f16e664a5c81401db6965071dc710db28ff0700000300ff7077a4307c777d5f77df6e177373a5c3ee4ef152e221fa7654fa1e07918c1f4f0b00a0724e1809

想询问一下是我本地签名出错误了,还是程序存在bug呢

image

wangboy commented 5 years ago

请确保你的substrate是1.0.0-41ccb19c-x86_64-macos,并且ff25a85ac20687de241a84e0f3ebab4c2920df7e这个commit的JS版本能跑你的代码。 Java是对应那个版本的,如果太新的substrate是不支持的。

debuggor commented 5 years ago

@wangboy 不是用的本地的substrate,用的"wss://substrate-rpc.parity.io/"

wangboy commented 5 years ago

请用本地我们指定的那个版本的substrate测试,目前这个Java版本由于是基于4月份的JS版本,无法在外网的新版本的substrate上运行。

debuggor commented 5 years ago

@wangboy substrate新版的交易结构变了吗,如果交易结构没变,签出的串,应该能正常广播出去吧?

wangboy commented 5 years ago

请先确保用本地指定版本的substrate能跑通。目前Java不是最新完成版本,用外网substrate测试没有意义。需要等Java同步到最新再和外网保持同步。至于交易结构有没有改变,我们一直只研究Java基于的版本,没有研究最新版本。