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

stake tx: change is locked for the same period as stake #328

Open
mbg033 opened this issue Jun 28, 2019 · 2 comments
Open

stake tx: change is locked for the same period as stake #328

mbg033 opened this issue Jun 28, 2019 · 2 comments

Comments

@mbg033
Copy link
Contributor

mbg033 commented Jun 28, 2019

Possible solution: change should go in separate tx with the standard unlock time

@avastar
Copy link
Contributor

avastar commented Jun 28, 2019

I haven't looked into what is possible with transfer_split. However, the following is a similar idea I had: "Anyone looked at transfer_split to see if it can be used to create two separate transactions for stake_transfer? First transaction would have unlock_time and the stake amount. Second transaction would pay for the fees of the first transaction and contain the change." Maybe the 2nd doesn't need to pay for the fees of the 1st. But I thought splitting the change to a 2nd might be possible.

@avastar
Copy link
Contributor

avastar commented Jun 29, 2019

Jason:
That solution won't work.

The sum of spent outputs + fee must equal the sum of outputs within every transaction.

Avastar:
Can that must be modified, or is it possible to create a cascade transaction, one transaction followed by another, with the second transaction being the stake_transfer. Doesn't ETH allow two serial transactions (one dependent upon the other) in the memory pool at the same time?

Jason:
It can, but it's not necessary; you can just build a transaction that supports per-transaction unlock times (loki has supported it for a long time).

That said, loki's current solution is much nicer: stakes don't use transaction locks at all; rather there is a whole separate mechanism that locks outputs that are part of a stake so long as the SN itself remains registered.

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

No branches or pull requests

2 participants