Comments (3)
Legitimate question.
Before discussing "why?" we need to understand that not all people trying to bake and use the software for payments are tech savvy. Even from the experienced peoples' standpoint, the application by nature has many configuration parameters which can easily be mistyped.
After dealing with many failure reports from users It was clear that the source of the problems for the majority of the cases was incorrect user input. This is why in V3 user input validation was put so much emphasis.
Each user input is validated against appropriate validation criteria. Most of the validation is put to payment address input because it was the source of the majority of the failure cases.
A payment address can be an alias or a PKH. It can be an implicit account or an originated contract. A payment address requires the secret key to be known so that transactions can be signed. Note that TRD does not do signing, tezos client does. So TRD does not need to know SK, but needs to check that it is known by the client. If payment address is an originated account, its manager account needs to be in the system; because manager signs for the originated account.
In order to make these checks, it is necessary to know:
- list of addresses, aliases and SK status.
- list of contracts and their aliases
- manager of originated contracts
--
Another requirement is that public address of the payment account needs to be revealed. This check is based on tzscan data, because I do not know a way of getting it from client.
from tezos-reward-distributor.
There is a way to avoid TRD from querying account information.
Relevant information can be provided in master.yaml. Here I share an example master.yaml for those who are interested.
version : 2.0
managers: {
"KT1EVBSE6cevRV8Uau2uySzjuYvWh7NDhnfy": "tz1YWn9eVvXuRkUxNwewVdYr71QKA8cr5Ane",
"KT1eVBSE6cevRV8Uau2uySzjuYvWh7NDhnfy": "tz1yWn9eVvXuRkUxNwewVdYr71QKA8cr5Ane"
}
addresses_by_pkh: {
"tz1YWn9eVvXuRkUxNwewVdYr71QKA8cr5Ane": {
'alias': "mainnetme",
"sk": true
},
"tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5": {
'alias': "alphanet1",
"sk": true
},
"tz1RW2P6sMLUMDVWimgYK6LDgsFfRALPEXik": {
'alias': "alphanet2",
"sk": true
}
}
contracts_by_alias: {
"pk1": "KT1EVBSE6cevRV8Uau2uySzjuYvWh7NDhnfy"
}
Note that this is for primarly testing porpuses. Input is not validated. If input is not correct TRD fails. Use of this method is neither suggested nor supported.
from tezos-reward-distributor.
Thanks for the explanation. As a fellow developer, I completely understand user mistypes are the common source of issues.
from tezos-reward-distributor.
Related Issues (20)
- Update docs to use octez-*
- Dry run command not reading correctly
- Batch payer class is unmanageable.
- exit status is always 0 even when TRD fails (in single-shot mode)
- Don't require signer to know about baker address
- Problem with using the new addresses as owner and founder. HOT 10
- Smoke tests are stuck in an infinite loop on the CI only HOT 1
- payouts in failed/backtracked transactions are marked as paid
- Signer auth HOT 2
- re-running failed operations with TzKT backend is so slow, it hangs HOT 2
- use `simulate_operation` instead of `run_operation` HOT 1
- TRD exiting with status code 1, even when it succeeds HOT 2
- Payment to KT always fails on first try, it goes through in a second attempt. HOT 1
- TzStats "offline_losses" is not working HOT 4
- -M 4 seems to be broken, wrong status for backtracked transactions and ctez vaults are no longer avoided
- payment error. Cycle 669 HOT 4
- Error when using on new v19.0 node version HOT 4
- When running with switch -P tzkt no validation of payments is done
- Error: Failed to get network configuration constants from a local node (http://127.0.0.1:8732)
- Warn instead of exit when new protocol live date is exceeded HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tezos-reward-distributor.