Skip to content

🐛 Handling of large anchor data of Gov Actions #1841

@spannercode

Description

@spannercode

Area

Voting Pillar

Domain

sanchogov.tools

Which wallet were you using?

N/A

Context

Handling large anchor data (validation and rendering) is problematic on GovTool, ranging from insufficient display to browser crashing.

Here are some test cases:

Test no Name GovTool Output Comments Action Id
1 Simple valid file All OK All OK 059fdaf7919525863f2e7625aaf959301e4e56176617ce7283435ee137c56e26#0
2 Out of context file Data Formatted Incorrectly Gov tool doesn't support invalid json that is outside of cips context 8b8fe0ff42c9718caa7a05441eed4e1d75274350a319575031302f1cc71e0107#0
3 Title greater than 80 Data Formatted Incorrectly Expected but proper error could be shown to inform what was wrong d3ad66dad758696180850f9f090138c9c35de3717fe337875b5f7de37349876e#0
4 Abstract greater than 2500 Data Formatted Incorrectly Expected but proper error could be shown to inform what was wrong 4de5fbb44b6336298fd6ef7daf1a1ef75c47c532b0cd13a1e48c3aab86e1d701#0
5 100KB content rationale Read/Parse OK but -> Rationale text is truncated 2a76c7f9b35de7571528872fca4502656f006143863c5321c3801b28f8100d3b#0
6 1MB content rationale Read/Parse OK but -> Rationale text is truncated 8ac3d199f41eda85120d0d64b4ba02bf9b090a93e11193c66e86a871600409f8#0
7 10MB content rationale Except rationale other fields are parsed Clicking on view details and vote feel laggy. No text shown on rationale. 987ed32dd01b363ad3dad7d7b09556c70ddc143f1ad7c4b4afc95ade3628518b#0
8 100MB content rationale Browser crahsed Likely high memory usage 3ded0413648c1abb1e34cd03e1b545555069b78a02d4c33c7414b31da940717a#0
9 1GB content rationale -   9da679f7e4c5a436025cb39cb655c23aede3afe623f04e8788624e93a009dbcc#0

Steps to reproduce

  1. On sanchonet deployment, compose the governance_actions URL using the Action ID.
    {BASE_URL}/connected/governance_actions/{ACTION ID}
    For eg. case 2: 8b8fe0ff42c9718caa7a05441eed4e1d75274350a319575031302f1cc71e0107#0
  2. Observe the rendering of the governance action on GovTool.
  3. With the increasing content size, the loading of the page and responsiveness seems to diminish and finally crashes (browser).

Actual behavior

  • Missing proper error messages
  • Text truncation can be better
  • Browser crashes for large content

Expected behavior

  • Lazy loading or warning on large content processing on the frontend
  • Browser does not crash

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    To do

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions