IntersectMBO / govtool

🔩 GovTool and utilities monorepo.
https://preview.gov.tools
Apache License 2.0
10 stars 7 forks source link

[BUG] Unable to Submit Treasury Type Proposal #1565

Open kneerose opened 1 month ago

kneerose commented 1 month ago

Context & versions

Proposal Metadata:

{
  "@context": {
    "@language": "en-us",
    "CIP100": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md#",
    "CIP108": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0108/README.md#",
    "hashAlgorithm": "CIP100:hashAlgorithm",
    "body": {
      "@id": "CIP108:body",
      "@context": {
        "references": {
          "@id": "CIP108:references",
          "@container": "@set",
          "@context": {
            "GovernanceMetadata": "CIP100:GovernanceMetadataReference",
            "Other": "CIP100:OtherReference",
            "label": "CIP100:reference-label",
            "uri": "CIP100:reference-uri",
            "referenceHash": {
              "@id": "CIP108:referenceHash",
              "@context": {
                "hashDigest": "CIP108:hashDigest",
                "hashAlgorithm": "CIP100:hashAlgorithm"
              }
            }
          }
        },
        "title": "CIP108:title",
        "abstract": "CIP108:abstract",
        "motivation": "CIP108:motivation",
        "rationale": "CIP108:rationale"
      }
    },
    "authors": {
      "@id": "CIP100:authors",
      "@container": "@set",
      "@context": {
        "name": "http://xmlns.com/foaf/0.1/name",
        "witness": {
          "@id": "CIP100:witness",
          "@context": {
            "witnessAlgorithm": "CIP100:witnessAlgorithm",
            "publicKey": "CIP100:publicKey",
            "signature": "CIP100:signature"
          }
        }
      }
    }
  },
  "authors": [],
  "hashAlgorithm": {
    "@value": "blake2b-256"
  },
  "body": {
    "abstract": {
      "@value": "Test "
    },
    "motivation": {
      "@value": "Test"
    },
    "rationale": {
      "@value": "Test"
    },
    "references": [],
    "title": {
      "@value": "Test"
    }
  }
}

I have added stake1up0nm089rryg9w8kv0x60xf0u6e44zy92suaxagwjc0ewqgn273q3 as the receiving address and 1000 as the amount.

Steps to reproduce

Actual behaviour

image

bosko-m commented 1 month ago

I think this is for Byron team. CC @jdyczka @pmbinapps @MSzalowski @jankun4

teske00 commented 1 month ago

@bosko-m We found the problem, it will be solved in the next version of the PDF package

Ryun1 commented 1 month ago

also; this will fail at submit time because we havent added the proposal policy when building the tx

bosko-m commented 1 month ago

@Ryun1 Is the policy defined or is yet to be defined?

Ryun1 commented 1 month ago

My bad, it has been renamed to the guardrails script.

Ryun1 commented 1 month ago

was only recently deployed to sanchonet

Ryun1 commented 1 month ago

give me some time and ill do a reference implementation using CSL itll be fairly straight forward

kneerose commented 1 month ago

@teske00 any update on this? I couldn't test it properly due to

{
  "code": 2,
  "info": "Wallet could not send the tx.",
  "message": "{\"contents\":{\"contents\":{\"contents\":{\"era\":\"ShelleyBasedEraConway\",\"error\":[\"ConwayUtxowFailure (UtxoFailure (ValueNotConservedUTxO (MaryValue (Coin 100000000000) (MultiAsset (fromList []))) (MaryValue (Coin 200000000000) (MultiAsset (fromList [])))))\",\"ConwayGovFailure (ProposalDepositIncorrect (Coin 0) (Coin 100000000000))\",\"ConwayGovFailure (InvalidPolicyHash SNothing (SJust (ScriptHash \\\"edcd84c10e36ae810dc50847477083069db796219b39ccde790484e0\\\")))\"],\"kind\":\"ShelleyTxValidationError\"},\"tag\":\"TxValidationErrorInCardanoMode\"},\"tag\":\"TxCmdTxSubmitValidationError\"},\"tag\":\"TxSubmitFail\"}"
}
teske00 commented 1 month ago

@MSzalowski Do you perhaps know what could be the problem here, it looks like it's up to the proposal build tx function, maybe it needs to be updated based on what Ryan wrote above. I don't know if you have any info on what is happening with it and how it should look cc @kneerose @bosko-m

bosko-m commented 1 month ago

@Ryun1 Did you do reference implementation using CSL?

Ryun1 commented 1 month ago

Not yet @bosko-m

This error is because of incorrect deposit amount and missing guard rails script, because DBSync is reporting incorrect protocol params

bosko-m commented 1 month ago

Feels like it should go to To Do.

Ryun1 commented 1 month ago

Ill try to implement today via;

MSzalowski commented 1 month ago

@Ryun1:

This error is because of incorrect deposit amount and missing guard rails script, because DBSync is reporting incorrect protocol params

That is correct and as soon as this and issues around this one are solved - this will be fixed as well as: https://github.com/IntersectMBO/govtool/issues/1591

We are working on providing at least one working environment now, but a new image of db-sync or fixing providing the configuration to db-sync is the recommended solution.

Having that fixed would be enough as no changes on CSL level are required in order to sign&submit such transaction

mesudip commented 1 month ago

Treasury Withdrawal and Parameter Update proposals need to be either added directly on the transaction or with reference UtXo containing script.

Current Error Message

"ShelleyBasedEraConway\",\"error\":[
   \"ConwayGovFailure (InvalidPolicyHash SNothing (SJust (ScriptHash \\\"edcd84c10e36ae810dc50847477083069db796219b39ccde790484e0\\\")))\"],
   \"kind\":\"ShelleyTxValidationError\"},
   \"tag\":\"TxValidationErrorInCardanoMode\"},\"tag\":\"TxCmdTxSubmitValidationError\"},
   \"tag\":\"TxSubmitFail\"}"

@MSzalowski how are we sourcing the guardrail-script? is it hardcoded? Current error InvalidPolicyHash is because the script is not correct.

Ryun1 commented 1 month ago

@mesudip

@MSzalowski how are we sourcing the guardrail-script? is it hardcoded? Current error InvalidPolicyHash is because the script is not correct.

We aren't right now I have been working on a reference implementation for this, but it is taking some time

Ryun1 commented 4 weeks ago

Thanks to @mesudip I am pleased to share that guardrail script support has been added to my demos example dApp via Pull 78.

@MSzalowski I hope this should provide a base to show how guardrail support on treasury withdrawals could be added.