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

[New ac_param] -ac_aur : Allow to enable active user reward on smartchains #410

Closed
wants to merge 65 commits into from

Conversation

phm87
Copy link

@phm87 phm87 commented Apr 19, 2021

-ac_aur

This pull request introduces a new Antara Customization parameter (ac_param) allowing to enable active user rewards on new smartchains using -ac_aur. Basic tests were performed manually successfully and a testchain (TAUR) is currently under test on #kmdlabs channel on Komodo discord, thank you to all KMDLabs notaries (and anonymous miners) that participates. Since TAUR network is not good (too few nodes), maybe a new testchain will be launched.
https://gist.github.com/phm87/fc75d5820d232376a8256874726673b4
https://discord.com/channels/412898016371015680/497080413387489291/780873228838895626

Please do not merge yet, I still need to do some cleanup (see below) and more tests performed.

-ac_aur needs several parameters separated by commas: Enable/disable active user rewards (parameters: 1, activationHeight (60000), minCoins (10), LOCKTIME_THRESHOLD (500000000), percentage (5)), default is disable
Example (TAUR): -ac_aur=1,10,2,500000000,10 will enable active user rewards activated at block 10, min 2 coins to earn AUR, min locktime identical to Komodo (500000000), Percentage per year of 10%

TAUR_help

TAUR_getinfo

As discussed with @ptyx on discord, allowing to enable AUR on smartchains can be a good idea.

What was done in the code ?

  • src/coins.cpp src/komodo_bitcoind.h src/komodo_gateway.h src/komodo_interest.h src/main.cpp src/miner.cpp src/rpc/misc.cpp src/wallet/rpcwallet.cpp src/wallet/wallet.cpp : code changes related to enabling active user rewards for smartchains and not restrict it to Komodo only)
  • src/init.cpp strUsage documentation how to use -ac_aur
  • src/komodo_defs.h src/komodo_globals.h : internal definitions of -ac_aur data as ASSETCHAINS_ACTIVEUSERREWARD
  • src/komodo_utils.h : the sub-parameters used in _ac_aur=sub-parameters separated by commas are splitted into ASSETCHAINS_ACTIVEUSERREWARD data structure & some checks are performed on allowed values & adapt extraptr and extralen if -ac_aur is used (
  • src/notaries_staked.cpp : change that I need to clean before PR is merged

A part of To do's:

  • I tried to execute python regression tests (where TONYCL chain is synced) but I encountered problems, unsure if it is due to test configuration or to python installation. I'll ask some help to @tonymorony about how to run usual python regression tests to be sure that there is no regression when -ac_aur is not used.
  • I tested manually each forbidden value in the sub-parameters of -ac_aur= (i.e. negative percentage per year is forbidden in this implementation) but is it worth to be automated ?
  • Another idea to be discussed with @alright would be to automate for parameters identical to Komodo and compare with a Komodo node
  • Maybe I should open another PR to update the docs:
    https://developers.komodoplatform.com/basic-docs/antara/antara-setup/antara-customizations.html
  • I left on purpose few interrogation marks on purpose in my code changes, I don't think that I need to change these lines but it is worth to be discussed

Thank you to Alright, KMDLabs team, KMD Team, jl777 and PTYX.

@phm87 phm87 changed the title [New ac_param] -ac-aur : Allow to enable active user reward on smartchains [New ac_param] -ac_aur : Allow to enable active user reward on smartchains Apr 19, 2021
@smk762 smk762 requested review from DeckerSU, Alrighttt and ca333 May 5, 2021 10:12
@ca333 ca333 closed this Feb 20, 2022
@ca333
Copy link

ca333 commented Feb 20, 2022

outdated/conflicts

who-biz pushed a commit to who-biz/komodo that referenced this pull request Jun 14, 2022
@rusaik
Copy link

rusaik commented Jul 27, 2022

Is this parameter available to use in smart chain ? I would like this parameter to implemented in the smart chain i have created.

@dimxy
Copy link
Collaborator

dimxy commented Jul 27, 2022

Is this parameter available to use in smart chain ? I would like this parameter to implemented in the smart chain i have created.

There is no such ac_aur parameter supported in the official repo

@rusaik
Copy link

rusaik commented Jul 28, 2022

I would like to make request to make this feature available on Smart Chains, Could you please help me on this ?

@dimxy
Copy link
Collaborator

dimxy commented Jul 29, 2022

I would like to make request to make this feature available on Smart Chains, Could you please help me on this ?

I am afraid we do not have plans to add such a param in the nearest future.
If you'd like to start your own chain with this param activated I'd suggest you may make a repo fork and add this code there

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

Successfully merging this pull request may close these issues.

5 participants