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

$500 Bounty: Automatically fix CPID sync issues in Gridcoin wallet #10

Open
makeasnek opened this issue Apr 26, 2023 · 11 comments
Open

Comments

@makeasnek
Copy link
Contributor

makeasnek commented Apr 26, 2023

btcbalance badge
eth balance badge
grc balance badge

Context: Gridcoin issues GRC rewards to users on the basis of their BOINC CPID, but the BOINC client may report multiple CPIDs. In theory, these CPIDs should all converge onto one "dominant" CPID (the oldest one), but for brand new users this process may take days and is very confusing.

Requirements to claim bounty:

  • Submit code to Gridcoin repo adding this feature and have it approved by maintainers, following all coding standards used by the repo and making any style and other edits requested by them. Note that SCI is working with Gridcoin on our bounty program and it is expected that they will integrate any well written code into their repo.
  • Important: We have been alerted that some devs are having trouble withdrawing funds from BountySource. All future bounty increases will be paid out by us directly, we cannot guarantee that BountySource will release any funds currently stuck there.

Feature Description

  • The feature starts in the solo crunching wizard where it displays the user's projects and CPIDs.
  • The feature checks if the user is connected to a Gridcoin crunching pool (read data from an XML file and compare against known pool URLs). If so, it should offer to detach the user from the pool and remove any projects attached under the pool's account. If no accounts remain, it should direct the user to register for a new project and attach to it, linking them to the solo crunching guide. At this point, the feature can close.
  • The feature should also check that all BOINC accounts are attached under the same e-mail address (read XML files). If they are not, and there are more BOINC projects under e-mail A than e-mail B, it should offer to remove projects not attached under e-mail A (connect to BOINC client RPC and issue project detach command)
  • The feature should then check that all CPIDs match. If they don't, the feature should offer to automatically fix the user's CPIDs. If the user says yes, the feature should do so. (find oldest CPID by comparing dates from XML files, write oldest CPID to all XML files, force BOINC to read client state from xml files using appropriate RPC command)
  • The feature should communicate with BOINC via the RPC port BOINC provided by default.
  • The feature should determine which is the oldest CPID (intended CPID) based on user registration date in the BOINC xml files, close BOINC, manually edit the XML status file of each project in the BOINC directory to the intended CPID, and then restart BOINC. This will insure that BOINC uses that CPID in the future. The field which needs to be edited is "external CPID"
  • The feature should create a custom class so that Gridcoin Wallet<->BOINC communication developed for this feature can be repurposed elsewhere in the wallet

Contribute to this Bounty
You can contribute to SCI's bounty program by donating cash or crypto to SCI. You will get a nice tax deduction, and we will spend those donated funds on our bounty programs. You can also support us every time you shop on Amazon and eBay, please see our donation page for more information.

You can donate to this bounty specifically by sending crypto to the following addresses.

BTC (Bitcoin): bc1q2444qjdhwqqelfptcuz9nwrctyvru7unvdvpg0 btcbalance badge
ETH (Ethereum) and DAI: 0xd9e1971ce36B927c744C3246A920e9cae9C8B6f7 eth balance badge
GRC (Gridcoin): S3RG46XcuWtJPADckxgFUyNw92Vd5yt4z6 grc balance badge
Note that GRC badge does not automatically update. ETH and BTC do.

PS Did you know that crypto is one of the most effective ways to make donations (for US donors)? Cryptocurrency donations to 501(c)3 nonprofits are considered tax-deductible and do not trigger a taxable event, meaning you do not usually have to pay capital gains tax on them. We request that any individual donating over $500USD (or equivalent) provide their information along with their donation to ensure compliance with our AML and KYC policies. Any organization that wishes to make a donation to SCI is requested to reach out to us directly at contact{at}thesciencecommons.org. In the event that the awardee does not want the crypto or the bounty is closed without being paid out, it will be turned over to SCI's bounty fund to be spent on future bounties.

Bounty amount: $500 + Whatever is on BountySource + Whatever is in above Crypto Addresses

BountySource at time of writing has $200 on the bounty. You will also get the satisfaction of knowing you are helping a software and ecosystem which supports the progress of science. BountySource

Development Notes
In short, this tool will need to:

  • Communicate to BOINC client via its HTTP RPC on localhost, issuing commands to attach/detach/update projects
  • Read some XML files stored in the BOINC directory to obtain the CPIDs and find the oldest
  • Write the new CPID to those xml files

Claiming bounty

Comment below if you want to indicate you are working on the bounty (though this is not required) or if you have any questions. BountySource bounty will paid under the BountySource terms (if bounty payers vote that your change fixes the issue). The first person to submit code to the Gridcoin repo and have it accepted will be the only one able to claim the bounty.

About SCI
The SCI is a US 501(c)(3) non-profit organization dedicated to rebuilding the bridge of participation and trust between the public and the scientific process. We support tools and infrastructure that enable people to learn about and engage with science. Follow our work via our free newsletter on substack.

@mamonet
Copy link

mamonet commented Jun 10, 2023

bountysource/core#1586
Bountysource isn't paying hunters anymore. Please stop posting any further bounties at this platform.

@TheSCInitiative TheSCInitiative deleted a comment from AgCaliva Jul 3, 2023
@makeasnek
Copy link
Contributor Author

bountysource/core#1586 Bountysource isn't paying hunters anymore. Please stop posting any further bounties at this platform.

We have had no issues with BountySource so far, all bounties have been paid as expected. I'm not sure what's going on in that thread but things are working fine here.

@mamonet
Copy link

mamonet commented Jul 3, 2023

Since when your last bounty has been paid? I mean actual withdrawal to bank or PayPyal account of bounty hunter not just moving balance from yours to bounty hunter's.

I've been working on bounties at Bountysource for more than 5 years, never had problem until this year. I haven't got paid since March and they no longer response to emails. IBM's contacting CEO of The Blockchain Group and he keeps procrastinating. It's not safe to do business through Bountysource anymore.

@makeasnek
Copy link
Contributor Author

Within the last few weeks

@makeasnek
Copy link
Contributor Author

We are certainly open to using other platforms if you have suggestions.

@tehami02
Copy link

Is this issue still open. Please link the actual Gridcoin Repo...its difficult to find the actual project.

@makeasnek
Copy link
Contributor Author

makeasnek commented Jul 12, 2023

Is this issue still open. Please link the actual Gridcoin Repo...its difficult to find the actual project.

This is a draft issue and is not open yet my apologies for the confusion:
https://github.com/gridcoin-community/Gridcoin-Research

@makeasnek
Copy link
Contributor Author

Is this issue still open. Please link the actual Gridcoin Repo...its difficult to find the actual project.

My apologies, this bounty is actually open. I've updated the bounty info to include a link to BountySource

@makeasnek makeasnek removed the Draft label Jul 12, 2023
@makeasnek makeasnek changed the title Bounty: Automatically fix CPID sync issues in Gridcoin wallet $300 Bounty: Automatically fix CPID sync issues in Gridcoin wallet Aug 13, 2023
@makeasnek makeasnek changed the title $300 Bounty: Automatically fix CPID sync issues in Gridcoin wallet $500 Bounty: Automatically fix CPID sync issues in Gridcoin wallet Oct 26, 2023
@makeasnek
Copy link
Contributor Author

Bounty increased to $500

@cmpsb
Copy link

cmpsb commented Nov 22, 2023

Hello! I've been working on this for a some evenings. I have a few questions now that I'm working on the e-mail requirement:

The feature should also check that all BOINC accounts are attached under the same e-mail address (read XML files). If they are not, and there are more BOINC projects under e-mail A than e-mail B, it should offer to remove projects not attached under e-mail A (connect to BOINC client RPC and issue project detach command)

This does not consider the e-mail address entered earlier in the wizard, is that correct?

It also seems infeasible to show the e-mail address(es) that are in the minority, as they're hashed with MD5 and I couldn't find a plain-text version anywhere. Would listing the project names be a solution?

@makeasnek
Copy link
Contributor Author

It also seems infeasible to show the e-mail address(es) that are in the minority, as they're hashed with MD5 and I couldn't find a plain-text version anywhere. Would listing the project names be a solution?

Aah yes it appears BOINC does store the MD5 not the original e-mail address. In that case, it would be best if the feature would be aware of the e-mail address the user initial pasted into the Gridcoin wallet.

If:

  • Given e-mail address (or md5 hash of it) is attached to projects: offer to remove all projects not attached under that e-mail address. Present user with a list of projects that will be removed.
  • Given e-mail address is not attached to any projects: warn user and have them input a new e-mail address. Keep asking for a new e-mail address until user-supplied e-mail address matches a project

One final aspect to this which isn't included in the original specs but is needed in order to accomplish this goal is that the feature should check if the user is connected to the Science United account manager. If so, it should warn the user that SU is not compatible with Gridcoin and offer to remove it. This should be done at the same step where it is checked if the user is crunching for a pool.

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

No branches or pull requests

4 participants