Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Conversation Rewards Hot Fixes #673

Open
0x4007 opened this issue Aug 26, 2023 · 12 comments · May be fixed by #688
Open

Conversation Rewards Hot Fixes #673

0x4007 opened this issue Aug 26, 2023 · 12 comments · May be fixed by #688

Comments

@0x4007
Copy link
Member

0x4007 commented Aug 26, 2023

  • The conversation rewards should not have been granted to the assignee (me)
  • The amount is much higher than expected because we are using "full" response instead of "raw". GitHub dresses up comments, for example, multiple layers wrapping images <a><img> and code blocks <pre><code> so rewards calculations are way higher than they should be.

Conversation Rewards

pavlovcik: [ CLAIM 50.8 WXDAI ]

diamondnegroni: [ CLAIM 2.7 WXDAI ]

Originally posted by @ubiquibot[bot] in ubiquity/sponsorships#4 (comment)

@whilefoo
Copy link
Collaborator

whilefoo commented Aug 26, 2023

Anyway it seems like Github creates a lot of unnecessary HTML tags like:

test is encoded as <code>

test

is encoded as <pre><code>

images are encoded as <a><img>

@ubiquibot
Copy link

ubiquibot bot commented Aug 26, 2023

Available commands

- /start: Assign the origin sender to the issue automatically.
- /stop: Unassign the origin sender from the issue automatically.
- /help: List all available commands.
- /autopay: Toggle automatic payment for the completion of the current issue.
- /query: Comments the users multiplier and address
- /multiplier: Set the bounty payout multiplier for a specific contributor, and provide the reason for why. 
  example usage: "/wallet @user 0.5 'Multiplier reason'"
- /allow: Set access control. (Admin Only)
- /wallet: <WALLET_ADDRESS | ENS_NAME>: Register the hunter's wallet address. 
  ex1: /wallet 0x0000000000000000000000000000000000000000
  ex2: /wallet vitalik.eth

@whilefoo

@0x4007
Copy link
Member Author

0x4007 commented Aug 26, 2023

Shouldn't this be in ubiquibot repo?

Anyway it seems like Github creates a lot of unnecessary HTML tags like:

test is encoded as <code>

test

is encoded as \<pre\><code>

images are encoded as <a><img>

We should be reading the source code of the comments instead of what is rendered on github for sure. For example, if you try and edit your comment, you will see the source code. Lets be sure to get that.

@0x4007 0x4007 transferred this issue from ubiquity/sponsorships Aug 26, 2023
0x4007 added a commit that referenced this issue Aug 26, 2023
@0x4007 0x4007 mentioned this issue Aug 26, 2023
@0x4007
Copy link
Member Author

0x4007 commented Aug 26, 2023

I did some research here and realized that we must use raw and we must convert that into HTML.

@0x4007 0x4007 changed the title Unpredictable Conversation Rewards Conversation Rewards Must Use "Raw" not "Full" Aug 26, 2023
@0x4007 0x4007 changed the title Conversation Rewards Must Use "Raw" not "Full" Conversation Rewards Hot Fixes Aug 26, 2023
@whilefoo
Copy link
Collaborator

But if we want to use HTML tags in the config than we must convert the raw Markdown syntax to HTML. This task was about moving from Markdown to HTML

@0x4007
Copy link
Member Author

0x4007 commented Aug 26, 2023

But if we want to use HTML tags in the config than we must convert the raw Markdown syntax to HTML. This task was about moving from Markdown to HTML

It was supposed to be for unambiguous config property names. Check the referenced conversation, specifically this comment. #383 (comment)

But ultimately either way, the current way the incentives are calculated isn't good.

@whilefoo
Copy link
Collaborator

I see, this was misunderstanding on my end. So we should parse the comment in Markdown format and convert HTML tags in the config to the Markdown equivalent?

@0x4007
Copy link
Member Author

0x4007 commented Aug 26, 2023

Yes I just figured that in the config it's much clearer to use HTML. So it's easier to config.

As we see now the comment incentive calculator must consume the raw source code or else this won't work.

The raw source code is probably going to be markdown.

What happens if it is partially html? Will mdast handle this?

@whilefoo
Copy link
Collaborator

Mdast will leave html as it is.

@ubiquibot
Copy link

ubiquibot bot commented Aug 28, 2023

@whilefoo The time limit for this bounty is on Mon, 28 Aug 2023 12:57:23 UTC

@0x4007 0x4007 removed the ping label Aug 29, 2023
@whilefoo whilefoo linked a pull request Aug 29, 2023 that will close this issue
@ubiquibot
Copy link

ubiquibot bot commented Aug 31, 2023

Do you have any updates @whilefoo? If you would like to release the bounty back to the DevPool, please comment /stop
Last activity time: Sun Aug 27 2023 08:45:47 GMT+0000 (Coordinated Universal Time)

@ubiquibot ubiquibot bot unassigned whilefoo Sep 3, 2023
@EtherealGlow
Copy link
Contributor

@whilefoo are you still working on this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants