Open MarkWillems opened 5 years ago
sorry, it‘s my bug, I have fixed it.
Thanks we are getting closer :) Now I get an Invalid signature size back from the Zilliqa Api.
If I check https://apidocs.zilliqa.com/#transaction-related-methods then I see the signature the code generates is 4 chars longer than the example in the docs.
Let me know if you need more information.
Hi another issue I think I ran into with the sending transactions: https://github.com/FireStack-Lab/LaksaCsharp/blob/a98e75814adfcf59d7c5bafd81fdea494020f291/LaksaCsharp/Transaction/Transaction.cs#L64
That substring does not feel right?
@yanbin007 Do you need more information?
There seems to be an error in the Schurner signature scheme. Returns an invalid signature scheme.
I have fixed it,thanks。
Thanks for fixing the bug. I downloaded the latest source and tested it. But I found something strange. When you call the CreateTransaction method, it returns the hash value only once or twice in ten times, and everything else fails.
{"error":{"code":-8,"data":null,"message":"Invalid Signature size"},"id":"1","jsonrpc":"2.0"} Return this error.
It's a signature value. : 00bce33bb8671842d57b66cbee34664f652f82dd211914adc0aa5a1172eb3ae5943c88be1f0924fd5ce526dcedd0a81aa1b068d2b9d12580d091acb5dd420e76b2
And even if the hash value comes out. The hash value can not be retrieved from https://viewblock.io/zilliqa?network=testnet site. What is the problem?
I always appreciate it. Please check a little more ~
I saw the update, thank you, and I really wanted it to work 🥇 but I got this: {"error":{"code":-8,"data":null,"message":"Invalid Signature size"},"id":"1","jsonrpc":"2.0"}
Testing it this way:
Wallet wallet = new Wallet();
string address = wallet.AddByPrivateKey("<privekey>");
Transaction transaction = new Transaction();
transaction.Version = "65537";
transaction.ToAddr = "<addres>";
transaction.SenderPubKey = "<pubkey>";
transaction.Amount = "10000000";
transaction.GasPrice = "1000000000";
transaction.GasLimit = "1";
transaction.Provider = new HttpProvider("https://api.zilliqa.com/");
transaction = wallet.Sign(transaction);
Console.WriteLine("signature is: " + transaction.Signature);
CreateTxResult result = TransactionFactory.CreateTransaction(transaction);
@yanbin007 Any other information which you need?
Working on it @MarkWillems
I sometimes get a Signature which the api accepts, also a transactionid is returned, however the transaction is never executed.
@MarkWillems would you pull the latest one. and see if the Signature-size problem fixed.
And by the way if you had got the TranID returned, you should use rpc method to track the whether the transaction is accepted by the lookup node. Once you got the receipt from rpc, it means the transaction is accepted and it will give you result with success:true/false.
@neeboo It seem the generaton is stable, no more errors on the size.
However I do not get any transaction done actually. The code return the transaction id but the transaction seems not valid.
The rpc call return "Txn Hash not Present". The comment of 5 days back show the code I executed.
@MarkWillems not sure if it is you are using the mainnet api. However you may consider using testnet api. Make sure you have some testing token in your address. And you can see the example snippet we provide in the repo README.md
@neeboo are you able to do an transaction on mainnet? So not only receive the transaction but really see the transaction occur?
@neeboo are you able to do an transaction on mainnet? So not only receive the transaction but really see the transaction occur?
Not really for now
@neebo We should be really close 😄 Signature is valid size but incorrect?
@neebo We should be really close 😄 Signature is valid size but incorrect?
If you are able to make Txn on Testnet. You should be able to do that on Mainnet. Otherwise its the configuration problem. Would you paste some txn params on Mainnet and the rpc result. And see if we can find out why?
Hi,
Thanks for all the effort so far, I tried to send transactions with the package but ran into a few problems. Will see if I can send a pull request later but here they are:
Signature misses ToString() method. I think it should be ( as in the Java variant)
public override string ToString() { String rHex = Hex.ToHexString(R.ToByteArray()); while (rHex.Length< 64) { rHex = "0" + rHex; } String sHex = Hex.ToHexString(S.ToByteArray()); while (sHex.Length < 64) { sHex = "0" + sHex; } return rHex + sHex; }
Fix in HttpProvider.cs
public Rep<CreateTxResult> CreateTransaction(TransactionPayload payload) { return Send<CreateTxResult, TransactionPayload>("GetContractAddressFromTransactionID", payload); }
The GetContractAddressFromTransactionID should be CreateTransaction.
If i correct the above but then I get an "Invalid Signature size". That is were I got stuck for now.