Coder Social home page Coder Social logo

pk910 / powfaucet Goto Github PK

View Code? Open in Web Editor NEW
3.3K 40.0 1.2K 18.27 MB

Modularized faucet for EVM chains with different protection methods (Captcha, Mining, IP, Mainnet Balance, Gitcoin Passport and more)

License: GNU Affero General Public License v3.0

JavaScript 1.49% TypeScript 96.21% CSS 1.42% Shell 0.47% HTML 0.13% Dockerfile 0.09% C 0.13% Makefile 0.06% Batchfile 0.01%
ethereum faucet testnet testnet-faucet web3 sybil-resistance

powfaucet's Introduction

PoWFaucet

GitHub release (latest by date) codecov

Modularized faucet for EVM chains with different protection methods (Captcha, Mining, IP, Mainnet Balance, Gitcoin Passport and more)

Why

Faucets for ETH Testnets are spammed by bots. This faucet tries to reduce the efficiency of these automated requests by various protection methods.

This faucet is mostly known for its proof-of-work based protection, which is currently the best and most reliable way to distribute funds on a network that got low on fund reserves.

For clarification: This faucet does NOT generate new coins with the "mining" process. It's just one of the protection methods the faucet uses to prevent anyone from requesting big amount of funds and draining the faucet wallet. If you want to run your own instance you need to transfer the funds you want to distribute to the faucet wallet yourself!

For a more detailed description, take a look into the Project Wiki

Instances

Testnet Link
Sepolia Testnet https://sepolia-faucet.pk910.de Faucet Version Uptime Robot ratio (30 days) Faucet Balance
Holešovice Testnet https://holesky-faucet.pk910.de Faucet Version Uptime Robot ratio (30 days) Faucet Balance
Ephemery Testnet https://ephemery-faucet.pk910.de Faucet Version Uptime Robot ratio (30 days) Faucet Balance

Run Yourself

Read the Faucet Operator Wiki to see the installation and configuration instructions.

You can also find some demo instances with different module combinations here: Demo Instances

Bugs & Features

Please feel free to report bugs and add new features via PRs if you like.

Thanks To

This faucet contains parts of code from the following projects:

pow-captcha - faucet-wasm build script

FaucETH - faucet page design

License

License: AGPL v3

powfaucet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powfaucet's Issues

[bug] coinbase stamp rewards has no score

GIVEN I have a coinbase stamp in git passport
WHEN I copy/paste my JSON into the verification parser
THEN I expect a score of at least 1
OR to label it with an actual non score of 0

image

Sir, I wanna Analyze this repository for personnel studying.

As you can see in title, I wanna know how to operate this faucet system.

I already done mining with it 1.2GoETH.

So I think this service provides mining system for user who wanna get Test Funds.

So I wanna go deep dive in this repository.

Any guide?

Claim reward but hCaptcha can't load

Hi, man, thanks you provide a faucet to people. and i have a question about the workflow. here it is.

once claimed the reward without load the hCaptcha, it caused another 10 mins wasted. i'm wonder if i passed the hCaptcha at the first time to mining, why i need to do that again when i start to claim? also there was no way to recover the session.

i know that's not the project's problem, most time it caused by network for captcha validation. but if there was a way to make it more easier, i think it would be make this project great.

Can't mine

When ever i click on starting mining, it will pop up that I am connecting from the hosting IP

I don't understand what it really means

the page frozen in `Claiming rewards`

Hi... Is the second time today that the page has not transferred the GoETH... still in Claiming rewards but nothing happened... I have attached a screenshot... what happened with my rewards?... thanks

2022-08-16-175953_1515x1059_scrot

Boost Score (Passport) not applied sometimes

There is currently an issue with fetching the gitcoin passport scores.

About 40-60% of the refresh requests fail due to empty/malformed responses.
I guess my faucet is being rate limited, as there are too many requests...

Workaround for now:
Refresh your Gitcoin Passport manually from the faucet UI if the score is not applied correctly.

Disabling EIP-1559 support / Invalid params error

Hello. Is there any way to disable EIP-1559 support? I tried to change the code to work with regular transactions, but it seems to me transactions don't get sent when I modify the code to work with type-0 (legacy) transactions. This includes replacing maxPriorityFeePerGas and maxFeePerGas with gasPrice and also changing EthTx.FeeMarketEIP1559Transaction with EthTx.Transaction.

Getting Error of Limit

Hello there
I am getting popup message of Limit
It Says You have claimed 3.48 GETH in last 5 days
I am mining the faucet for the Linea Project
Please change this limit it is urgent

claim txs are running oog

eg see 0x6a188e722af1aa641dd0f04f3a0accbd15f89ebd3d6790fd4d4961cb5d5c5f49 or 0x09c7e501dd4979831ad515a7df4d11f5c737afd05730b91244957d72a8eea0cc

Concurrent session limit reached

Hi,
I was mining for a little and then stopped and claimed some rewards earlier. But now I can't start mining again. I am getting "Concurrent session limit reached" although I don't have any that I am aware of.

I am guessing there is a session in the servers that is not terminated yet. What can I do?

Are you trying to steal funds?

I entered your website, from chainlink faucet
As soon as I enter my Sepolia Eth balance went zero. I did not even approve any transaction

Ip blocked

I am getting this message cant mine goerili eth [IPINFO_RESTRICTION] IP Blocked: You're connecting from a proxy IP range.

Try to start

Hello,

I try to start but I have this message 👍
goerli@bot:~/softwares/PoWFaucet$ npm run start

[email protected] start /home/goerli/softwares/PoWFaucet
tsc && node dist/app.js

/home/goerli/softwares/PoWFaucet/node_modules/yaml/dist/compose/composer.js:33
if (prelude[i + 1]?.[0] !== '#')
^

SyntaxError: Unexpected token .
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/home/goerli/softwares/PoWFaucet/node_modules/yaml/dist/index.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: tsc && node dist/app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/goerli/.npm/_logs/2023-05-14T18_23_39_524Z-debug.log
goerli@bot:/softwares/PoWFaucet$ cat /home/goerli/.npm/_logs/2023-05-14T18_23_39_524Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]
prestart: [email protected]
6 info lifecycle [email protected]start: [email protected]
7 verbose lifecycle [email protected]
start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]start: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/goerli/softwares/PoWFaucet/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle [email protected]
start: CWD: /home/goerli/softwares/PoWFaucet
10 silly lifecycle [email protected]start: Args: [ '-c', 'tsc && node dist/app.js' ]
11 silly lifecycle [email protected]
start: Returned: code: 1 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: tsc && node dist/app.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess. (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/goerli/softwares/PoWFaucet
16 verbose Linux 5.4.0-144-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "start"
18 verbose node v10.19.0
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: tsc && node dist/app.js
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Configure timeout?

This is more a suggestion for configuring the hosted faucet than for the underlying code, but it looks like you're the hoster as well as the maintainer and I couldn't find a more appropriate contact method.

It looks to me like the timeout for the faucet is a static multiplier of the maximum time it can run. This is a reasonable choice, but it meant a moderate feature degradation when switching from Goerli to Sepolia, namely that it was no longer possible to start a mining run and let it go overnight, then claim the results in the morning; that was fine for 5h/10h was fine, but not for 3h/6h.

Extending the claim timeout somewhat would be helpful. If there's some reason that's infeasible, that's obviously fine, but in that case I'd appreciate a brief explanation.

Funds not coming to faucet wallet after I stop mining

I got the faucet running locally and successfully mining. I loaded the private key from facet config and sent 1 Goerli Eth to fund the faucet wallet. When I stop the faucet after mining 0.5ETH to claim the rewards, and then transfer to other wallet, I can see that I lose the Goerli ETH that I initially seeded the account with, and now the faucet wallet has only 0.5ETH.

Is there a setting which I am missing here that needs to change, so that the faucet wallet gets the mined ETH once I stop the mining?

reCAPTCHA will not validate when claiming funds

I've noticed the issue for a couple days, where it took more tries than usual to validate (about 10 times). However, today 5/30/2023, I can't validate after 30 tries. After successfully clicking all boxes the reCAPTCHA asked to click on, 'Please Try Again' is returned. See attached. I'm not having issues with any other CATCHA in web3.
Screen Shot 05-30-23 at 08 51 AM

Decentralizing the faucet

I just love this idea!

This is the true spirit of blockchain - Proof-of-X, even for testnets (and proof-of-work is the simplest of them all)

But why stop here - why should it have a server except the blockchain itself ?

All you need is a contract that can verify the PoW, and send the claimed eth to the calling user.

in the following code, the client is expected to find a keccak on (addr,timestamp,nonce) that is small enough.
The proof is bound to this specific user's address, at a specific timeslot (in the past 2 hours, in this example)

This sample gives a fixed payback for a single pow proof, but it can be easily expanded to accept multiple "proofs".

The faucet owner may modify the required difficulty if the demand seems too high, or faucet balance too low
(can even increase the difficulty exponentially as the faucet "liquidity" drops..)

function claim(uint timestamp, bytes32 nonce) {
   require(timestamp<block.timestamp && timestamp > block.timestamp-3600*2);
   require(!claims[nonce], "already claimed");
   claimed[nonce]=true;
   uint result = uint(keccak256(abi.encode(msg.sender,timestamp,)nonce);
   require(result<requiredDifficulty, "didn't spend enough");
   msg.sender.call{value: payValue}("");
}

Reward Boost Not working

My reward boost not working I connected my passport and have very good score
Earlier I have 500% Boost but now it is not working

how does it work?

I'm curious, here are my questions.

  1. What does it do in the background while waiting?
  2. What's Proof of Work mean here? Do I contribute to something? (I mean I know what PoW is, I'm confused)
  3. Also if I create my own, do I need a huge amount of funds for the specific testnet?

Sorry to be a pain, but I'm really curious about what does it. Maybe add more info to the repo.

Captcha no longer captcha-ing

Not sure how this project is for this world, but the captcha started failing today (and I'm definitely not a bot). If anyone else knows where to get some sweet goerli eth, please let me know. I think I have enough for just 3 more contracts :/

Couldn't connect to node https://rpc.goerli.mudit.blog

I run it myself, but have some error.

2023-04-11 16:15:19 ERROR Error loading wallet state for 0xCA9456991E0AA5d5321e88Bba44d405aAb401193: Error: CONNECTION ERROR: Couldn't connect to node https://rpc.goerli.mudit.blog.
2023-04-11 16:15:31 ERROR Error loading wallet state for 0xCA9456991E0AA5d5321e88Bba44d405aAb401193: Error: CONNECTION ERROR: Couldn't connect to node https://rpc.goerli.mudit.blog.

mumbai support?

is adding support for polygon network / mumbai something that can be done on the config level or is it a much bigger project?

hCaptcha verification failed

Hello,

Congrats on the great work.

When deploying your code, I have nonetheless an issue with hCaptcha.
The captcha is rendering well on the website, I can click and pass the test, excluding a problem related to a missing site-key/secret-key (as the statistics are updating correctly on my hCaptcha dashboard).

When clicking on "Start Mining", hence triggering "onStartMiningClick()", I systematically fall into an Exception with the variable "close " containing the code 'INVALID_CAPTCHA' and the message "Captcha verification failed".

Then, the window "Could not start session." (className='alert alert-danger') is opening with the message stated above.

All the best,
xyokube

mining

Hello,

i see that the goerli faucet mines with my cpu but can i change it to my gpu? becouse my gpu is 100x better.

thank you in advance

Claim failed

Nevermind if it was mentioned before. I didnt find it.

So if I claim before captcha loaded it seems to me that the params are not passed correctly, or smth is missing

Claim failed

Rewards Timeout

This is utterly stupid. I left this stupid system "mining" - to get back to "you didn't claim your rewards in time" - What a complete waste of resources

Idea: lock test ether in a smart contract that requires work to unlock

Hi - this is not a bug or a feature request, but an idea for a related project.

I discovered this app today and I realized that a smart contract I wrote called CrackableDeposit could be used as a PoW faucet. I'm not really sure what the advantage would be, but it would not require a server to operate the faucet, unless you wanted to have a server automatically deploy these contracts every hour.

The downside would be that users would have to already have some gas to call the withdraw function. And it costs more gas than your program because it has to pay gas to deploy a contract and users also have to pay gas. Your program only has to pay the gas for a simple transaction.

If you think this is a good idea then I could make a prototype web3.js app and host it on github pages. It would just need to know the address of any CrackableDeposit contracts that exist.

Boost is not working

Hi,

I've linked a bunch of socials to get boosted rewards:

image

But I still get 0% boost:

image

At first I thought maybe it's a UI not updating thing but after an hour of hashing, I saw that no boost was applied

Differences between Gitcoin Passport Score and Faucet Passport Score

Thank you for enabling the PoW Faucet for Sepolia.

When trying to increase reward boost, I see differences between Gitcoin's passport score and the score that the Faucet shows (after refreshing score). The faucet recognizes the stamps but adds no value to some of them.

I hope a screenshot reflects clearly what I am trying to say:
powfaucet

In addition to the ones in the screenshots, the "ZksyncEra" stamp adds no value neither.

I suspect it has to do with updating something on the Faucet's code?

Hope I explained myself clearly and thank you very much for creating such service!!!

clouds

Is it possible to get money and a reward for this work? I have a limited number of these deposits. Do I benefit and thank you for this faucet, and is there a faucet dedicated to agriculture

Can I buy some Goerli ETH?

I've been mining for 2 days and it covered for one contract deployment...

I will buy Goerli ETH for Mainnet ETH if someone's willing to sell. @pk910 maybe? I need like 50 Goerli ETH, how much would that cost?

Convert "PoW" to useful mining ?

Given the number of people running this in a browser, is there a way to turn that work into a mining node to actually improve the network's performance ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.