Status of Payout script


#1

Hi again.

I see huge balance in my mining account but nothing in my payout account.

mining balance:
1241.000 ETH
364705.08 USD

Here are my relevant addresses:

voting: 0x9314b38abffcf3867287A2c029BF9C684bee63e8
mining: 0xa4A12D11046fbCB5fA8A93A958Cef68AC0856908
payout: 0x3fd1A80A1E9818a09709be4Afa900Dc950237Fea

Please advise.

Thanks.


#2

@jflowers could please create two ballots to add John Holy Ghost LeGassic voting and payout addresses to the consensus using Governance DApp.


#3

Done and done - one idea though (UX).

The landing page for “Governace DAPP” ought to be the “Unanswered”. This would draw to the user’s attn whether or not there are proposals that need their voting on.


#4

@rstorm @henryvishnevsky @Micwebnet can you vote for the proposal pls?


#5

One more idea for UX - have the newest proposals under the DAPPS page - ALL be at the top.

After voting, I was looking for my (now answered) proposal - and initially thought that the network/site needed time to update. Only it was at the end of the page.


#6

Done. Feedback on the main thread.


#7

Done. Voting is complete


#8

OK, something happened but not good.

Looks like the balance in my mining account decreased but still 0 balance in my payout account.

mining balance: 877.000 ETH
251286.82 USD

payout: ( 0x3fd1A80A1E9818a09709be4Afa900Dc950237Fea ) 0 ETH 0 USD

The payout script is on my Azure node – correct?
Can I run manually via ssh with debugging turned on to see what’s what?


#9

you have cron job /etc/cron.daily/transferRewardToPayoutKey
here is a script running


#10

OK, from transferRewardToPayoutKey.out

Seems like my payout key is not configured correctly .

Starting at Thu Nov 2 06:25:04 UTC 2017
miningKey = 0xa4A12D11046fbCB5fA8A93A958Cef68AC0856908
payoutKey = 0x0000000000000000000000000000000000000000
balance from: 1.440000021e+21
gas price: 1000000000
estimated gas: 21000
ammount to transfer: 1.44e+21
Reward is sent to payout key (0x0000000000000000000000000000000000000000) from mining key (0xa4A12D11046fbCB5fA8A93A958Cef68AC0856908)

hmm. what’s happening here:

function retrievePayoutKey(specData, tomlData, miningKey, cb) {
attachToContract(specData, tomlData, function(err, web3, contract) {
contract.miningPayoutKeysPair.call(miningKey, function(err, payoutKey) {
if (err) console.log(err);
cb(payoutKey);
});
});
}

then

function attachToContract(specData, tomlData, cb) {
configureWeb3(tomlData, function(err, web3) {
if (err) return console.log(err);

            var contractABI = config.Ethereum.contracts.Oracles.abi;
            var contractAddress = specData.engine.authorityRound.params.validators.safeContract;

            var MyContract = web3.eth.contract(contractABI);

            contract = MyContract.at(contractAddress);

            if (cb) cb(null, web3, contract);
    });

Assuming contract address is correct then my guess is that my payout address is not bound to my mining address, so kev-value pair looks like ( john_mining_address, john_payout_address ), where john_payout_address would default to 0x0000000000000000000000000000000000000000 ( not "null ) in Solidity if john_payout_address was not specified upon key-value creation … if so then checking for “null” in payout script is not quite right.


#11

This looks scary @jlegassic Thank you for reporting
att @phahulin


#12

@jlegassic
Hi,
thank you for your report on the issue. The payout script was updated, please log in to your machine and pull the latest changes

cd oracles-scripts
git pull origin alphadevtestnet

#13

OK, will do.

Curious – if the ( mine_address, payout_address ) mapping incomplete in contract was indeed root cause was anything done to resolve that or was I mistaken with that assumption.


#14

Well,
the payout script sent your mined coins to 0x0000000000000000000000000000000000000000
which is like burn address

http://testnet.oracles.org:4000/account/0x0000000000000000000000000000000000000000
13180.558985451 ETH coins so far :see_no_evil:


#15

Although, we send you exact amount of coins as refund :slight_smile:


#16

Not really worried about the ETH, want to know if there was a “incomplete” mapping somewhere ( contract ) and if was fixed and how ( is it part of the whole governance code base or what? )

This is the call I’m worried about:

contract.miningPayoutKeysPair.call(miningKey, function(err, payoutKey) {
if (err) console.log(err);
cb(payoutKey);
});


#17

OK. saw diff on: transferRewardToPayoutKey.js in github

From transferRewardToPayoutKey.out – something happened on chain … no? will poke around github contracts for diff on 11/3

Starting at Fri Nov 3 06:25:03 UTC 2017
miningKey = 0xa4A12D11046fbCB5fA8A93A958Cef68AC0856908
payoutKey = 0x0000000000000000000000000000000000000000
balance from: 1.440000021e+21
gas price: 1000000000
estimated gas: 21000
ammount to transfer: 1.44e+21
Reward is sent to payout key (0x0000000000000000000000000000000000000000) from mining key (0xa4A12D11046fbCB5fA8A93A958Cef68AC0856908)

Starting at Sat Nov 4 06:25:03 UTC 2017
miningKey = 0xa4A12D11046fbCB5fA8A93A958Cef68AC0856908
payoutKey = 0x3fd1a80a1e9818a09709be4afa900dc950237fea
balance from: 1.440000021e+21
gas price: 1000000000
estimated gas: 21000
ammount to transfer: 1.44e+21
Reward is sent to payout key (0x3fd1a80a1e9818a09709be4afa900dc950237fea) from mining key (0xa4A12D11046fbCB5fA8A93A958Cef68AC0856908)


#18

I see lots of ethers on your payout account http://testnet.oracles.org:4000/account/0x3fd1a80a1e9818a09709be4afa900dc950237fea

the payout script works


#19

Yea, I see that too. I wanted to know what was done on chain, i.e. what API on what contract was exercised to fix issue.


#20

I see this is part of the governance protocol.

I see (2) proposals to add my payout key 10/29/2017 & 11/3/2017, guess one or both were approved and on 11/3/2017 ( after Payout script ran for that day ), completing my mining/payout key binding. This is why payout script started working on 11/4 with my payout address and not the default 0x0000000000000000000000000000000000000000.