Jump to content

Recommended Posts

Hi Everybody,

 

i found 2 Errors in the client. The first one is the sendmany api,

 

f.e. the command:

./freicoind sendmany "123" '{"1Prg4TMfQCoaZVAWBUTxWqmFdR1EJHhRww":1, "1AWjvWDBDYNTpKArKkWwcceBCmqoggqM2D":1}'

 

 

This gives me the error:

error: {"code":-4,"message":"Transaction commit failed"}

 

Maybe i am using it wrong, but i can see no Problem in the command.

 

The second error i found is within the GUI version.

Changing: "Settings -> Options -> Display -> Unit to show amounts to:" µFRC

 

gives me:

Microsoft Visual C++ Runtime Library

  "This application has requested the Runtime to terminate it in an unusual way.

Please contact the application's support team dor more information." Error

 

After that the client crashes and is closed.

 

Maybe anyone has an idea?

 

Rik

Link to post
Share on other sites

Tried out both of these on this Windows 7 machine and I get the same results. Will try later on Debian.

Didnt try the RPC calls, but there seems to be need for some formatting on Windows machines:
From bitcointa.lk forums:

"Note that on windows, RPC command lines have to be properly escaped if you are typing them at the command line and not into the bitcoin-qt console (Help->Debug Window->Console). Example:

[

bitcoind sendmany "FromAccountName" "{\"1BiTCoinSNU2BMzf2cN2TK4yzPUA6CnTAd\":.001,\"1DCeLERonUTsTERdpUNqxKTVMmnwU6reu5\":.002}""

]"

For the sendmany error, find the error msg from GitHub: https://github.com/freicoin/freicoin/blob/master/src/rpcwallet.cpp

Find keyword -> keyChange
 

Still learning to read code miself, but maybe something to do with the constructing of the transaction message?

Theres also a latter rebase of the client for 0.9: https://github.com/freicoin/freicoin/tree/0.9
Maybe you have time to try out if the problem(s) persist on that one? :) (will try later miself too when I gets the time :))

Link to post
Share on other sites

Hi Fab,

 

it tries the bool CMerkleTx::AcceptToMemoryPool(bool fCheckInputs, bool fLimitFree)

 

 

function from main.cpp and throws the

 

bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)

 

function in wallet.cpp. I guess it fails the

 

    try {
        return mempool.accept(state, *this, fCheckInputs, fLimitFree, pfMissingInputs);

 

 

 

@Arcurus: Yes it is still there as far as i can tell (i compiled the client 2 weeks ago).

 

All the best Rik

Link to post
Share on other sites

Hi Arcurus,

 

no, as far as i know it is not possible to add them directly. But you can define a subdomain very easy to be a seednode. If you have a standard control panel at your registrars website. Or what exactly do you want to do?

 

I found out that the amount i try to send was doubled by the sendmany command and so the amount i tried to send exeeds the available amount and the commit failed.

 

The command:

./freicoind sendmany "" '{"1Prg4TMfQCoaZVAWBUTxWqmFdR1EJHhRww":1,"1AWjvWDBDYNTpKArKkWwcceBCmqoggqM2D":1}'
error: {"code":-4,"message":"Transaction commit failed"}
 

 

Produced the output in the debug file:

 

CTransaction(hash=6e17f29ffa383249b9608085282f96c75fb02044d1128c1b64755b376aeaaaca, ver=2, vin.size=1, vout.size=3, nLockTime=0, nRefHeight=135049)
    CTxIn(COutPoint(ddd724e820a664432273ad622eea419bc6f8750e4432f4b11797cb7e9e82b0dc, 0), scriptSig=304502205b126a33d7fbd693)
    CTxOut(nValue=97.49895109, scriptPubKey=OP_DUP OP_HASH160 4b8b64c0631e)
    CTxOut(nValue=2.00, scriptPubKey=OP_DUP OP_HASH160 fab7c130a658)
    CTxOut(nValue=2.00, scriptPubKey=OP_DUP OP_HASH160 6859065ae851)
keypool keep 3
2015-12-02 15:22:06 AddToWallet 6e17f29ffa383249b9608085282f96c75fb02044d1128c1b64755b376aeaaaca  new
2015-12-02 15:22:06 WalletUpdateSpent found spent coin 0.00bc ddd724e820a664432273ad622eea419bc6f8750e4432f4b11797cb7e9e82b0dc
2015-12-02 15:22:06 ERROR: CheckInputs() : 6e17f29ffa383249b9608085282f96c75fb02044d1128c1b64755b376aeaaaca value in < value out (99.49895109908109817584691886815366734246499221368302311983245736316319932763217737115013505899696610867977142333984375 < 101.49895109)
2015-12-02 15:22:06 ERROR: CTxMemPool::accept() : ConnectInputs failed 6e17f29ffa383249b9608085282f96c75fb02044d1128c1b64755b376aeaaaca
2015-12-02 15:22:06 CommitTransaction() : Error: Transaction not validtrying connection 148.251.126.241:8639 lastseen=10.0hrs

 

 

Somewhere there seem to be a doubeling of the amount one tries to send. Maybe some copy and paste stuff from the bitcoin to freicoin migration?

 

Rik

Link to post
Share on other sites

/freicoind sendmany "" '{"1Prg4TMfQCoaZVAWBUTxWqmFdR1EJHhRww":1}'

 

is managed without any further commands.. so it seems that the outputs are added together and the sum is used as output for every single transaction. I think its within the createTransaction but i dont see it yet..

Link to post
Share on other sites

Argh, found the error..

 

Inside wallet.cpp >>>   bool CWallet::CreateTransaction   <<<

 

There is the translation of the output value:

 

const mpq qValue = RoundAbsolute(s.second, ROUND_AWAY_FROM_ZERO, 0);
const mpz zValue = nValue.get_num() / qValue.get_den();
CTxOut txout(mpz_to_i64(zValue), s.first);

 

Problem is: nValue is the hole amount which is then added to every txout. The right one should be qValue:

 

const mpz zValue = qValue.get_num() / qValue.get_den();

 

Very small one, but also easy to overlook..

Commit can also be found here:

 

https://github.com/WorldLeadCurrency/WLC/commit/6180a9f23a56d42a8465cb7cd121dc003ccadceb

 

Greetings Rik

Link to post
Share on other sites

Hi Arcurus,

 

no, as far as i know it is not possible to add them directly. But you can define a subdomain very easy to be a seednode. If you have a standard control panel at your registrars website. Or what exactly do you want to do?

 

 

What I want, is that the Freicoin client by default finds the right peers to connect to without the need of first inserting some per command line...

Link to post
Share on other sites

What I want, is that the Freicoin client by default finds the right peers to connect to without the need of first inserting some per command line...

It is doing it, but just after some time. It found me some connections without adding them with addnode.

I think the problem is that no correct configured dnsseed is online, but i can be wrong here.

 

It is no problem to add some static nodes at seed.freico.in but this need to be done by someone who is in control of the sites DNS.

 

Rik

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...