Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: how to step through the proposal process #2

Open
coolaj86 opened this issue Aug 7, 2024 · 0 comments
Open

doc: how to step through the proposal process #2

coolaj86 opened this issue Aug 7, 2024 · 0 comments

Comments

@coolaj86
Copy link
Member

coolaj86 commented Aug 7, 2024

  1. Load up a collateral private key as per Doc: how to find unused addresses #1
  2. Get the gobject prepare command with
    ./scripts/gobject-pre-prepare.js <start-period> <num-periods> <payment> <proposal-url> <proposal-name> <payment-addr>
  3. Check that the big hex blob is valid with gobject check
    dash-cli -testnet gobject check 7b22656e645f65706f6368223a313732393938333630302c226e616d65223a2270726f706f73616c2d31222c227061796d656e745f61646472657373223a22795436475338715072687369694c484561545750594a4d7766505056743253534643222c227061796d656e745f616d6f756e74223a3130302c2273746172745f65706f6368223a313732363132303830302c2274797065223a312c2275726c223a2268747470733a2f2f6578616d706c652e636f6d2f70726f706f73616c2d31227d
  4. Submit the transaction collateral fee with gobject prepare
    dash-cli -testnet gobject prepare 0 1 1722924000 7b22656e645f65706f6368223a313732393938333630302c226e616d65223a2270726f706f73616c2d31222c227061796d656e745f61646472657373223a22795436475338715072687369694c484561545750594a4d7766505056743253534643222c227061796d656e745f616d6f756e74223a3130302c2273746172745f65706f6368223a313732363132303830302c2274797065223a312c2275726c223a2268747470733a2f2f6578616d706c652e636f6d2f70726f706f73616c2d31227d
    1d6ad843bab99d86eb92a17986c3cf6530a0dbf78976c1d8e78c283ad4a99d98
    
  5. WAIT for a few blocks for a proof (this is NOT instant send)
dash-cli -testnet gettxoutproof '["1d6ad843bab99d86eb92a17986c3cf6530a0dbf78976c1d8e78c283ad4a99d98"]'
  1. Run the gobject submit command with all the same data, but also the txid as the final param
    dash-cli -testnet gobject submit 0 1 1722924000 7b22656e645f65706f6368223a313732393938333630302c226e616d65223a2270726f706f73616c2d31222c227061796d656e745f61646472657373223a22795436475338715072687369694c484561545750594a4d7766505056743253534643222c227061796d656e745f616d6f756e74223a3130302c2273746172745f65706f6368223a313732363132303830302c2274797065223a312c2275726c223a2268747470733a2f2f6578616d706c652e636f6d2f70726f706f73616c2d31227d 1d6ad843bab99d86eb92a17986c3cf6530a0dbf78976c1d8e78c283ad4a99d98
    b7cfad999e054d88a08f1a5ad5d9a3e6851c00c3044a5fe1aac429ef7309e525
    
  2. WAIT for a few blocks (this is NOT instant send)
  3. Check the status with gobject get
    dash-cli -testnet gobject get b7cfad999e054d88a08f1a5ad5d9a3e6851c00c3044a5fe1aac429ef7309e525
    
    {
     "DataHex": "7b22656e645f65706f6368223a313732393938333630302c226e616d65223a2270726f706f73616c2d31222c227061796d656e745f61646472657373223a22795436475338715072687369694c484561545750594a4d7766505056743253534643222c227061796d656e745f616d6f756e74223a3130302c2273746172745f65706f6368223a313732363132303830302c2274797065223a312c2275726c223a2268747470733a2f2f6578616d706c652e636f6d2f70726f706f73616c2d31227d",
     "DataString": "{\"end_epoch\":1729983600,\"name\":\"proposal-1\",\"payment_address\":\"yT6GS8qPrhsiiLHEaTWPYJMwfPPVt2SSFC\",\"payment_amount\":100,\"start_epoch\":1726120800,\"type\":1,\"url\":\"https://example.com/proposal-1\"}",
     "Hash": "b7cfad999e054d88a08f1a5ad5d9a3e6851c00c3044a5fe1aac429ef7309e525",
     "CollateralHash": "1d6ad843bab99d86eb92a17986c3cf6530a0dbf78976c1d8e78c283ad4a99d98",
     "ObjectType": 1,
     "CreationTime": 1722924000,
     "FundingResult": {
       "AbsoluteYesCount": 0,
       "YesCount": 0,
       "NoCount": 0,
       "AbstainCount": 0
     },
     "ValidResult": {
       "AbsoluteYesCount": 0,
       "YesCount": 0,
       "NoCount": 0,
       "AbstainCount": 0
     },
     "DeleteResult": {
       "AbsoluteYesCount": 0,
       "YesCount": 0,
       "NoCount": 0,
       "AbstainCount": 0
     },
     "EndorsedResult": {
       "AbsoluteYesCount": 0,
       "YesCount": 0,
       "NoCount": 0,
       "AbstainCount": 0
     },
     "fLocalValidity": true,
     "IsValidReason": "",
     "fCachedValid": true,
     "fCachedFunding": false,
     "fCachedDelete": false,
     "fCachedEndorsed": false
    }

One that maybe works instead

dash-cli -testnet gobject prepare 0 1 1723003200 7b22656e645f65706f6368223a313732393938333630302c226e616d65223a2270726f706f73616c2d34222c227061796d656e745f61646472657373223a22795838793469754e674653773276576a71665a755a3763696d48786d317868587041222c227061796d656e745f616d6f756e74223a3130302c2273746172745f65706f6368223a313732333030333230302c2274797065223a312c2275726c223a2268747470733a2f2f6578616d706c652e636f6d2f70726f706f73616c2d34227d
fc87e8d0f6a75058722c73755f146905fc8b2e31abc004ec7ad934009d4229e4
dash-cli -testnet gobject submit 0 1 1723003200 7b22656e645f65706f6368223a313732393938333630302c226e616d65223a2270726f706f73616c2d34222c227061796d656e745f61646472657373223a22795838793469754e674653773276576a71665a755a3763696d48786d317868587041222c227061796d656e745f616d6f756e74223a3130302c2273746172745f65706f6368223a313732333030333230302c2274797065223a312c2275726c223a2268747470733a2f2f6578616d706c652e636f6d2f70726f706f73616c2d34227d fc87e8d0f6a75058722c73755f146905fc8b2e31abc004ec7ad934009d4229e4
e52b9885f490ae753edb112bb2f657a650a22676e8b84fc2d796bf3cea130f80

Better iteration

dash-cli -testnet gobject prepare 0 1 1722146400 7b22656e645f65706f6368223a313732393938333630302c226e616d65223a2270726f706f73616c2d35222c227061796d656e745f61646472657373223a2279505079375a3552516a3436536e467475465879543644464179677845535052374b222c227061796d656e745f616d6f756e74223a3130302c2273746172745f65706f6368223a313732323134363430302c2274797065223a312c2275726c223a2268747470733a2f2f6578616d706c652e636f6d2f70726f706f73616c2d35227d
# Collateral Tx ID (same byte order as dash-cli -testnet getrawtransaction <tixid> 1)
a942d19993de57a866a70027ca8b504ba8ae637f78e00bc62b7482731ef43545
dash-cli -testnet getrawtransaction a942d19993de57a866a70027ca8b504ba8ae637f78e00bc62b7482731ef43545
0200000002b93767d98e25007ae7aff5c667007dfb515ae4688b81f5d39799219ad1c3ebbb000000006a47304402201856bb7643e7890c421357ff4a50f6c129d3986d2b35965931b3197725669cc502203044a6dc5e6f43e21431156a1086c86804c555b1a0ab4a6eda3a292f899fcf920121036081bc21ec2048ddfd11751ebb13e582e16c598d9894d365a21eb344b31c280bfeffffff0f1d7c6a24e1e013106ccfab244ac7ad167341c48231e1f39aa8c90f220db3c2010000006a473044022025c0cf410c3f939ce73139bf9825797b5eb09453d99a3ef2dd4964a0c143b0ba02200a8a8465f310dd2aaba49733be301ac21a0e9916eb3135470fa97013758d7b090121038c96e3aa6efc4da20deb0a0c709743951efcc5f509e26bfb13bd93c354237e24feffffff02bb503700000000001976a9144272676074ee61a8e83e698bba353755256a170f88ac00e1f50500000000226a20d4f0bf253a042c92518d9577bf408ca5ecf73abdb55172036f29f289c4259c0c0f771000
dash-cli -testnet gobject submit 0 1 1722146400 7b22656e645f65706f6368223a313732393938333630302c226e616d65223a2270726f706f73616c2d35222c227061796d656e745f61646472657373223a2279505079375a3552516a3436536e467475465879543644464179677845535052374b222c227061796d656e745f616d6f756e74223a3130302c2273746172745f65706f6368223a313732323134363430302c2274797065223a312c2275726c223a2268747470733a2f2f6578616d706c652e636f6d2f70726f706f73616c2d35227d a942d19993de57a866a70027ca8b504ba8ae637f78e00bc62b7482731ef43545
# Gobject ID as output from 'gobject submit' (which is reversed)
0c9c25c489f2296f037251b5bd3af7eca58c40bf77958d51922c043a25bff0d4
# Gobject ID (as seen in the Tx Memo) (not reversed)
d4f0bf253a042c92518d9577bf408ca5ecf73abdb55172036f29f289c4259c0c
dash-cli -testnet gobject get 0c9c25c489f2296f037251b5bd3af7eca58c40bf77958d51922c043a25bff0d4
   {
     "DataHex": "7b22656e645f65706f6368223a313732393938333630302c226e616d65223a2270726f706f73616c2d35222c227061796d656e745f61646472657373223a2279505079375a3552516a3436536e467475465879543644464179677845535052374b222c227061796d656e745f616d6f756e74223a3130302c2273746172745f65706f6368223a313732323134363430302c2274797065223a312c2275726c223a2268747470733a2f2f6578616d706c652e636f6d2f70726f706f73616c2d35227d",
     "DataString": "{\"end_epoch\":1729983600,\"name\":\"proposal-5\",\"payment_address\":\"yPPy7Z5RQj46SnFtuFXyT6DFAygxESPR7K\",\"payment_amount\":100,\"start_epoch\":1722146400,\"type\":1,\"url\":\"https://example.com/proposal-5\"}",
     "Hash": "0c9c25c489f2296f037251b5bd3af7eca58c40bf77958d51922c043a25bff0d4",
     "CollateralHash": "a942d19993de57a866a70027ca8b504ba8ae637f78e00bc62b7482731ef43545",
     "ObjectType": 1,
     "CreationTime": 1722146400,
     "FundingResult": {
       "AbsoluteYesCount": 0,
       "YesCount": 0,
       "NoCount": 0,
       "AbstainCount": 0
     },
     "ValidResult": {
       "AbsoluteYesCount": 0,
       "YesCount": 0,
       "NoCount": 0,
       "AbstainCount": 0
     },
     "DeleteResult": {
       "AbsoluteYesCount": 0,
       "YesCount": 0,
       "NoCount": 0,
       "AbstainCount": 0
     },
     "EndorsedResult": {
       "AbsoluteYesCount": 0,
       "YesCount": 0,
       "NoCount": 0,
       "AbstainCount": 0
     },
     "fLocalValidity": true,
     "IsValidReason": "",
     "fCachedValid": true,
     "fCachedFunding": false,
     "fCachedDelete": false,
     "fCachedEndorsed": false
   }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant