Author Topic: Leasing in(de)finitely  (Read 1127 times)

eRoh on: May 13, 2016, 06:01:17 AM

  • Grand Fimker
  • ****
  • Posts: 322
    • View Profile
Related to the previous discussions about automatic leasing, I just found this thread. Any thoughts?
https://nxtforum.org/leasing-pools/leasing-balance-indefinitely/?PHPSESSID=tead53lhtuuo8f3dkpj1q2gkv4
FIM-34B3-PWY5-TMHC-9JYW8

Dirk Diggler #1 on: May 13, 2016, 12:39:20 PM

  • FIMK Staff
  • *****
  • Posts: 486
    • View Profile
    • Krypto Fin ry
It's possible, did that already actually but this is not in FIMK atm.

The reason for the absurdly low number of blocks might seem arbitrary, which it actually is, since its simply the biggest number you could fit in a 2 byte SHORT.
The database uses a SHORT field to store the balance lease period which gives us the weird small number.

Why is it not possible to lease ones balance for more than 32767 blocks? How was that number determined?
Maybe I am missing something but wouldn't it make sense to be able to lease indefinitely and have a new transaction sub type "stop leasing"?
What if forging hubs don't include transactions (that would take their forging power away) into the blocks?

To answer that question: "Simple, the next the forger will include that transaction in a block".

The answer about the plugin could work, albeit that the NXT plugin system is very overrated (as is everything client related to NXT) and it would of course never work for your headless server nicely tucked away on some server you never touch.

The real solution is to change the balance lease field in the database from a short to an int and you could lease for millions of blocks.
FIMK Developer | GPG fingerprint: CEF2 7C39 43BE 6800 504E  71BC 7E87 A7B0 AC34 E2D5 | mofowallet.com | blog

warmach #2 on: May 13, 2016, 12:58:14 PM

  • Senior Fimker
  • ***
  • Posts: 227
    • View Profile

The real solution is to change the balance lease field in the database from a short to an int and you could lease for millions of blocks.

The only risk with leasing for a million blocks is if the leased to account shuts down forging.  The lessee would then be stuck until the lease runs out before forging again.  There would need to be a way to cancel the lease or update the number of blocks.
Warmach's Forging Pool
http://fim.warmach.info/pool/
May the forge be with you...

Dirk Diggler #3 on: May 13, 2016, 01:29:08 PM

  • FIMK Staff
  • *****
  • Posts: 486
    • View Profile
    • Krypto Fin ry
The only risk with leasing for a million blocks is if the leased to account shuts down forging.  The lessee would then be stuck until the lease runs out before forging again.  There would need to be a way to cancel the lease or update the number of blocks.

That is the better way indeed and not much extra work. It would in all cases require a hard fork.
FIMK Developer | GPG fingerprint: CEF2 7C39 43BE 6800 504E  71BC 7E87 A7B0 AC34 E2D5 | mofowallet.com | blog

warmach #4 on: May 13, 2016, 03:05:46 PM

  • Senior Fimker
  • ***
  • Posts: 227
    • View Profile
That is the better way indeed and not much extra work. It would in all cases require a hard fork.

While the feature would be nice, I'm not sure we should hard fork just for that.  The next time a hard fork is needed, I say we just slip that in also.  Just my opinion...
Warmach's Forging Pool
http://fim.warmach.info/pool/
May the forge be with you...

Espo #5 on: May 14, 2016, 09:49:52 AM

  • Fresh Fimker
  • *
  • Posts: 16
    • View Profile
While the feature would be nice, I'm not sure we should hard fork just for that.  The next time a hard fork is needed, I say we just slip that in also.  Just my opinion...

I Think thats the best Idea