Hello. This is the final proposal for implementing dynamic fees into NuDroid. I’ve taken into account that Nu 2.1 has not been released yet meaning that the application will be prepared for the 2.1 “getfee” command but shall still work with Nu 2.0.
Matthew
Proposal RIPEMD160 hash: 7a62f4e88e251d963240bf762175fb79c4100fb3
=##=##=##=##=##=## Custodian Hash starts with this line ##=##=##=##=##=##=
Custodial Address: BSn4pCHyK7T9iFafSiYnPuGjGoyW65J5js
Amount Requested: 1600 NBT
This proposal will allow the correct fee to be used in NuDroid for the 2.0 protocol. It may work with the future 3.0 protocol, but this is not guaranteed. It involves the following tasks and changes:
- A new python wsgi script will be created to provide NuBits fees. The script will take “application/x-www-form-urlencoded” POST data with the arguments “bytes” and “amount”. The “bytes” argument shall be the size of the transaction in bytes, and the “amount” argument shall be formatted with 4 decimal places. The script will attempt to use the “getfee” RPC command from Nu 2.1, however if the RPC command is unavailable the script will revert to using the “paytxfee” field from the “getinfo” response. The script will work with Nu 2.0 but will also be compatible with Nu 2.1 when it is released.
- The new script shall be deployed on the “Default - Explorer” server, and potentially on “Default - Anton” with the collaboration of @willy Nu, will be upgraded to 2.1 if 2.1 is available during this time.
- The application will assume that the “amount” parameter should be the total value of all outputs in a transaction. It is assumed that this will likely achieve the correct fee with the future 3.0 protocol, although it is not guaranteed.
- The fee calculation will be altered to first estimate coin selection with an assumed 0.01nbt fee. Then the app will make a server request for the fee and coin selection will be reapplied with the returned fee if it is different. If there is a change in the transaction size as a multiple of 1000 bytes, another request will be made to the server to obtain the new fee. The process will be repeated until the fee is satisfied.
- When requesting fees, the app should try all of the trusted servers with “/getfee” appended to the URL and use the fee of the first server that responds.
- The app should give the error “Cannot obtain fee from servers” if there is an error obtaining the fees.
- This update shall be released no later than 2 weeks after the grant is passed, however efforts will be made to release earlier than this if possible. If the update is not released by this time, the entire grant amount shall be burned.
The update will be released under version 4.4 on Google Play.
=##=##=##=##=##=## Custodian Hash ends with this line ##=##=##=##=##=##=
Verify. Use everything between and including the <custodianhash></custodianhash> tags.