Skip to content
This repository has been archived by the owner on Jan 18, 2019. It is now read-only.

Cannot remove trustlines with NoRipple flag set to true. #156

Open
nullstyle opened this issue Oct 30, 2014 · 6 comments
Open

Cannot remove trustlines with NoRipple flag set to true. #156

nullstyle opened this issue Oct 30, 2014 · 6 comments

Comments

@nullstyle
Copy link
Contributor

As reported here https://stellartalk.org/topic/6435-removing-trust-lines/ and it appears as well in #96:

When a trustline has been set with the NoRipple flag set to true, it appears you cannot remove it, even when you balance is zero and you set the limit to "0".

Notice, for example from an account_lines response on my account:

         {
            "account" : "gnhPFpbYXcYGMkGxfWdQGFfuKEdJoEThVo",
            "balance" : "0",
            "currency" : "NOK",
            "limit" : "0",
            "limit_peer" : "0",
            "no_ripple" : true
         }

Submitting a transaction while logged into my account returns tesSuccess, but nothing changes. An example script to perform this (if executed after logging into the stellar client:

var tx = $get("StellarNetwork").remote.transaction();
tx.trustSet($get("session").get('address'), {
  value: "0",
  currency: "NOK",
  issuer: "gnhPFpbYXcYGMkGxfWdQGFfuKEdJoEThVo"
});
tx.setFlags('NoRipple');
tx.submit();
@nullstyle
Copy link
Contributor Author

Note, setting NoRipple or not on the transaction to remove the trustline has no discernible effect.

@MarkusTeufelberger
Copy link

This is intentional in Ripple at least. Why should this be a bug?

@nullstyle
Copy link
Contributor Author

Because it's confusing, and also raises the reserve on my account. Why should setting NoRipple to true make a trustline permanent in the ledger? What was the intention?

@MarkusTeufelberger
Copy link

It is not permanent, it just is not cleared out if you have any flag left not in its default position. Otherwise it would be easy to make others enable rippling (as a new trust line would have default flags) by resetting their flags, you'd just need a way to set their balance to 0 shortly.

@nullstyle
Copy link
Contributor Author

I don't understand the attack, could you please elaborate? Are you saying, in the event that a person holds a balance on one issuer, but has set the limit of that trustline to zero, you can make them enable rippling again if you somehow convince them to send their entire balance to another account? If so, that seems fine, since the limit is 0, they will not be able to receive any additional funds from that issuer.

To me, in the absence of a specific "Delete this trust line" transaction, setting a limit to zero seems to be an unambiguous signal for deleting a trustline: "Delete this when you can", if you will.

@johansten
Copy link

The problem I was facing in the end seems to have been that my serialized '0' Amount had an exponent that was off by one. So, my bad.

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

No branches or pull requests

3 participants