-
Notifications
You must be signed in to change notification settings - Fork 716
feat: set impossible lock_transfer_block_id #2316
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
Conversation
…o prevent wallet txs
yknl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @zone117x Looks good to me!
| def export_account_state(self, account_state): | ||
| """ | ||
| Make an account state presentable to external consumers | ||
| """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @jcnelson has the most context on the appropriate place to apply this. Alternatively, you can catch the forwarding that happens in api/server.py and rewrite the lock time there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All this change will do is alter what is (a) returned by the RESTful API and (b) what is returned by blockstack/lib/client.py. If that's what you want, then this is fine. I think it's more appropriate to do it here than in api/server.py.
blockstack/blockstackd.py
Outdated
| 'txid': account_state['txid'], | ||
| } | ||
| # if block height is after the migration export threshold, return a lock height that will force the wallet to error when sending a tx | ||
| if result['block_id'] >= 665750: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use the constant IMPORT_BLOCK defined in Aaron's PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk how to import that from the other file. @kantai
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not critical if that's not straight forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably is but python module import is cancer
|
I'm a little confused as to what this is supposed to do. Is it just supposed to trick the 1.0 wallet into thinking it can't spend STX because the tokens are all "locked"? If so, then the changes proposed here should be fine, but you'll want to of course test them with the 1.0 wallet. |
Yep -- that's the idea. I think this PR needs a slight tweak -- the |
|
Tested locally with an already passed block height, and this works correctly. |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
@yknl