gitmachtl / scripts

StakePool Operator Scripts. Learn how to create and manage your StakePool / manage your DRep stuff / do Governance Actions with these simple scripts. Hardware-Ledger/Trezor Support, Token/Asset Sending, Offline-Mode and much more...
MIT License
271 stars 95 forks source link

user error or code error? #8

Closed matiwinnetou closed 4 years ago

matiwinnetou commented 4 years ago
[mati@cardano ~]$ 05c_regStakepoolCert.sh mypool owner.payment

(Re)Register StakePool Certificate mypool.pool.cert with funds from Address owner.payment.addr:

   Owner Stake Keys: 1 owner(s) with the key(s)
                     owner.staking.vkey & owner.deleg.cert
      Rewards Stake: owner.staking.vkey
             Pledge: 95000000000 lovelaces
               Cost: 0 lovelaces
             Margin: 0.04

      Current EPOCH: 12
Current Slot-Height: 263040 (setting TTL to 273040)

Pay fees from Address owner.payment.addr: 008e065cd87a470f5377a64a695ec381e28bf2b10296139b7c57407d26cbd7981718cbeb744fb43dd4a0338cb5df091306e013d5a6a227f62c

1 UTXOs found on the payment Addr!

HASH: 29c35e190f99aec2442a9e53d8e314b4483db5881051a511139df258cf31336a   INDEX: 0    LOVELACES: 99498509622
Total lovelaces in UTX0:  99498509622 lovelaces

Minimum transfer Fee for 1x TxIn & 1x TxOut & 2x Certificate:  188073 lovelaces
Pool Deposit Fee:  500000000 lovelaces

Minimum funds required for registration (Sum of fees):  500188073 lovelaces

Lovelaces that will be returned to payment Address (UTXO-Sum minus fees):  98998321549 lovelaces

Building the unsigned transaction body with  mypool.pool.cert and all PoolOwner Delegation certificates:  /tmp/mypool.txbody

type: TxUnsignedShelley
title: Free form text
cbor-hex:
 18b3a5008182582029c35e190f99aec2442a9e53d8e314b4483db5881051a511139df258cf31336a
 000181825839008e065cd87a470f5377a64a695ec381e28bf2b10296139b7c57407d26cbd7981718
 cbeb744fb43dd4a0338cb5df091306e013d5a6a227f62c1b000000170cc2818d021a0002dea9031a

Sign the unsigned transaction body with the owner.payment.skey, mypool.node.skey and all PoolOwner Staking Keys:  /tmp/mypool.tx

type: TxSignedShelley
title: Free form text
cbor-hex:
 18b183a5008182582029c35e190f99aec2442a9e53d8e314b4483db5881051a511139df258cf3133
 6a000181825839008e065cd87a470f5377a64a695ec381e28bf2b10296139b7c57407d26cbd79817
 18cbeb744fb43dd4a0338cb5df091306e013d5a6a227f62c1b000000170cc2818d021a0002dea903

Stakepool Info JSON: mypool.pool.json
{
  "poolName": "mypool",
  "poolOwner": [
    {
      "ownerName": "owner"
    }
  ],
  "poolRewards": "owner",
  "poolPledge": "95000000000",
  "poolCost": "0",
  "poolMargin": "0.04",
  "poolRelaySingleIPv4": "",
  "poolRelaySingleDNS": "kokosz.nerdpol.ovh",
  "poolRelayPort": "3001",
  "poolMetaName": "FreeDOM",
  "poolMetaDescription": "FreeDOM - financial freedom with Cardano",
  "poolMetaTicker": "FRD",
  "poolMetaHomepage": "https://kokosz.nerdpol.ovh",
  "poolMetaUrl": "https://pastebin.com/raw/7E7Xc12A",
  "poolMetaHash": "469497303285568fba523f1ba1d3aaf78ba74b5c67495d43560046293990f59a",
  "regCertCreated": "Fri 26 Jun 2020 10:02:33 PM CEST",
  "regCertFile": "mypool.pool.cert",
  "poolID": "7aaeaff44f679606fdae5de8af690637388702a3d0974686071c235e"
}

Pool-ID: 7aaeaff44f679606fdae5de8af690637388702a3d0974686071c235e

ATTENTION - You're registered Pledge will be set to 95000000000 lovelaces, please respected it with the sum of all registered owner addresses!

Does this look good for you? Do you have enough pledge in your owner.payment account, continue and register on chain ? [y/N] Y

Submitting the transaction via the node...Error while submitting tx: Failed to submit Shelley transaction: ApplyTxError [LedgerFailure (UtxowFailure (UtxoFailure (ValueNotConservedUTxO (Coin 99498509622) (Coin 98998509622))))]
DONE

Stakepool Info JSON: mypool.pool.json
{
  "poolName": "mypool",
  "poolOwner": [
    {
      "ownerName": "owner"
    }
  ],
  "poolRewards": "owner",
  "poolPledge": "95000000000",
  "poolCost": "0",
  "poolMargin": "0.04",
  "poolRelaySingleIPv4": "",
  "poolRelaySingleDNS": "kokosz.nerdpol.ovh",
  "poolRelayPort": "3001",
  "poolMetaName": "FreeDOM",
  "poolMetaDescription": "FreeDOM - financial freedom with Cardano",
  "poolMetaTicker": "FRD",
  "poolMetaHomepage": "https://kokosz.nerdpol.ovh",
  "poolMetaUrl": "https://pastebin.com/raw/7E7Xc12A",
  "poolMetaHash": "469497303285568fba523f1ba1d3aaf78ba74b5c67495d43560046293990f59a",
  "regCertCreated": "Fri 26 Jun 2020 10:02:33 PM CEST",
  "regCertFile": "mypool.pool.cert",
  "poolID": "7aaeaff44f679606fdae5de8af690637388702a3d0974686071c235e"
}
matiwinnetou commented 4 years ago

https://iohk.zendesk.com/hc/en-us/articles/900001220843-Transaction-errors-ValueNotConservedUTxO

gitmachtl commented 4 years ago

your pool with that pool-id is already registered on the blockchain. so this should be a re-registration. how did you register it the first time? it is registered with this metadata json url "https://kokosz.nerdpol.ovh/mypool.metadata.json" and not the url you're using above "https://pastebin.com/raw/7E7Xc12A" so, how did you register it? have you registered it before and than deleted the json or removed some entries in it?

matiwinnetou commented 4 years ago

Yes, I deleted some entries because I thought this is needed to be able to change values there. I wanted to change metadata url since at the moment I cannot host it in the url I put initially. What should one do in such case?

gitmachtl commented 4 years ago

so, the scripts are tracking the data in the json, deleting the regSubmitted key in the json is not good. now the script does not know anymore that the pool was registered before. also the latest version of the 05a script generates a dummy json with a special line like "dont edit below this line" :-)

So to fix that, run the 05c again with your parameters and add the keyword REREG, to force a re-registration. Your re-registration needs some epochs to become valid on the chain.

matiwinnetou commented 4 years ago

Thanks! You are a star!