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

[BUG] Unable to Submit Treasury Type Proposal #1565

Closed
kneerose opened this issue Jul 12, 2024 · 18 comments
Closed

[BUG] Unable to Submit Treasury Type Proposal #1565

kneerose opened this issue Jul 12, 2024 · 18 comments
Assignees
Labels
🐛 Bug Something isn't working 🖥 Frontend Frontend related

Comments

@kneerose
Copy link
Contributor

Context & versions

  • Encountered a ParseIntError (Empty) error when submitting a treasury-type proposal.

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

  • Create a treasury-type proposal
  • Submit it as a governance action

Actual behaviour

image

@kneerose kneerose added 🐛 Bug Something isn't working PDF Bug labels Jul 12, 2024
@bosko-m
Copy link
Contributor

bosko-m commented Jul 12, 2024

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

@bosko-m bosko-m moved this to To do in Govtool all Jul 12, 2024
@teske00
Copy link

teske00 commented Jul 12, 2024

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

@bosko-m bosko-m moved this from To do to In progress in Govtool all Jul 12, 2024
@bosko-m bosko-m moved this from In progress to In QA in Govtool all Jul 15, 2024
@Ryun1
Copy link
Member

Ryun1 commented Jul 15, 2024

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

@bosko-m
Copy link
Contributor

bosko-m commented Jul 15, 2024

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

@Ryun1
Copy link
Member

Ryun1 commented Jul 15, 2024

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

@Ryun1
Copy link
Member

Ryun1 commented Jul 15, 2024

was only recently deployed to sanchonet

@Ryun1
Copy link
Member

Ryun1 commented Jul 15, 2024

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

@kneerose
Copy link
Contributor Author

@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
Copy link

teske00 commented Jul 23, 2024

@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
Copy link
Contributor

bosko-m commented Jul 23, 2024

@Ryun1 Did you do reference implementation using CSL?

@Ryun1
Copy link
Member

Ryun1 commented Jul 23, 2024

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
Copy link
Contributor

bosko-m commented Jul 23, 2024

Feels like it should go to To Do.

@Ryun1
Copy link
Member

Ryun1 commented Jul 23, 2024

Ill try to implement today via;

@MSzalowski
Copy link
Contributor

MSzalowski commented Jul 23, 2024

@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: #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
Copy link
Contributor

mesudip commented Aug 1, 2024

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
Copy link
Member

Ryun1 commented Aug 1, 2024

@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
Copy link
Member

Ryun1 commented Aug 8, 2024

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.

@bosko-m bosko-m moved this from In QA to To do in Govtool all Aug 9, 2024
@Ryun1 Ryun1 added 🖥 Frontend Frontend related and removed PDF Bug labels Aug 9, 2024
@Ryun1
Copy link
Member

Ryun1 commented Sep 10, 2024

Will close, as fix pushed but carry on conversation here: #1845

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working 🖥 Frontend Frontend related
Projects
Status: Done
Development

No branches or pull requests

7 participants