lbry-sdk icon indicating copy to clipboard operation
lbry-sdk copied to clipboard

Blocking and Reposting Epic (work required to fully remove filters app side)

Open tzarebczan opened this issue 4 years ago • 4 comments

  • [ ] linked issues in epic

  • [x] figure out what resolve should show when content is blocked / filtered. There should be some indication on resolve that the content was filtered.

  • [x] figure out how we are differentiating between blocking / filter lists. We could go with tags or blocking channel name + tag (or some other way to designate blocking vs filtering). Right now we have 2 params, but besides the name (lbry-blocked, and lbry-filtered), there's no indication of which is which. Also, when doing a claim search, only one high level blocked summary is shown.

    • Not sure if separate channels alone will work for distinguishing for this- since the output in claim search/resolve will vary by the type. i.e. a filtered claim will still resolve and show why it was filtered, whereas a blocked one won't fully resolve. Filtered would be removed from claim search though. A third type would be web-only filtered, but that should work with lbry.tv + additional filtered channel. The other downstream work, like on reflector, will also need to make a decision on what to do based on the type (i.e. don't delete blobs for filtered, but delete for blocked). Also, for https://github.com/lbryio/lbry-sdk/issues/2740 to work, it would need to know which (at least a count) are filtered
  • [x] Should/could we do something about claims being reposted to a new channel if channel level blocking is used?

  • [x] Add additional metadata options to repost api https://github.com/lbryio/lbry-sdk/issues/2679

  • [x] Add / support APIs for updating reposts https://github.com/lbryio/lbry-sdk/issues/2678

  • [x] support blocked channel ids - all claims signed by this channel should be blocked.

  • [x] support filtering (only block from claim searches, don't block from resolve).

My notes from recent testing:

  • [x] blocking stops it from being resolved currently - is that what we decided? How would we know something doesn't exist vs is blocked?

  • [x] Channel fails to return when referenced by name, but shows blocked if queried by id:

C:\Users\SoloDolo\Desktop>lbrynet claim search --channel=@FransNFNRoses
{
  "blocked": {
    "total": 0
  },
  "items": [],
  "page": 1,
  "page_size": 20,
  "total_items": 0,
  "total_pages": 0
}
C:\Users\SoloDolo\Desktop>lbrynet claim search --claim_ids=1ff8b739ba27392d025f7fb58f94e7ea802c6ab3
{
  "blocked": {
    "reposted_in_channel": {
      "ccd46c266d0ef9f4cbcd383ab29408c26073dc44": 1
    },
    "total": 1
  },
  "items": [],
  "page": 1,
  "page_size": 20,
  "total_items": 1,
  "total_pages": 1
}

tzarebczan avatar Dec 23 '19 16:12 tzarebczan

Added recent notes to OP.

tzarebczan avatar Jan 21 '20 15:01 tzarebczan

Sample repost:

{
  "lbry://repost#602808e9e83262ed4a81cbc4e7421662255fb2d1": {
    "address": "bQhwHStHWa8W8sFjD83MJCRwckEvh43QhZ",
    "amount": "0.01",
    "canonical_url": "lbry://@tom+laptop#4/repost#6",
    "claim_id": "602808e9e83262ed4a81cbc4e7421662255fb2d1",
    "claim_op": "create",
    "confirmations": 2873,
    "height": 703628,
    "is_channel_signature_valid": true,
    "meta": {
      "activation_height": 703628,
      "creation_height": 703628,
      "creation_timestamp": 1579710083,
      "effective_amount": "0.01",
      "expiration_height": 2806028,
      "is_controlling": true,
      "reposted": 0,
      "support_amount": "0.0",
      "take_over_height": 703628,
      "trending_global": 0.0,
      "trending_group": 0,
      "trending_local": 0.0,
      "trending_mixed": 0.0
    },
    "name": "repost",
    "normalized_name": "repost",
    "nout": 0,
    "permanent_url": "lbry://repost#602808e9e83262ed4a81cbc4e7421662255fb2d1",
    "reposted_claim": {
      "address": "bUAokaLYaAwp2pc1KVvAERVSrjPNNqYVkF",
      "amount": "0.1",
      "canonical_url": "lbry://test-upload-mp4-converted#b",
      "claim_id": "ba6042f59b90623a1cca07ce3e7483516f6fca43",
      "claim_op": "create",
      "confirmations": 7614,
      "height": 698887,
      "meta": {
        "activation_height": 698887,
        "creation_height": 698887,
        "creation_timestamp": 1578949431,
        "effective_amount": "6.1",
        "expiration_height": 2801287,
        "is_controlling": true,
        "reposted": 1,
        "support_amount": "6.0",
        "take_over_height": 698887,
        "trending_global": 0.0,
        "trending_group": 0,
        "trending_local": 0.0,
        "trending_mixed": 0.0
      },
      "name": "test-upload-mp4-converted",
      "normalized_name": "test-upload-mp4-converted",
      "nout": 0,
      "permanent_url": "lbry://test-upload-mp4-converted#ba6042f59b90623a1cca07ce3e7483516f6fca43",
      "short_url": "lbry://test-upload-mp4-converted#b",
      "timestamp": 1578949431,
      "txid": "92fc95d9dc8fc31e67c610c693cc5f2a54254d551a53c433bb1e70cde641ef18",
      "type": "claim",
      "value": {
        "languages": [
          "en"
        ],
        "license": "None",
        "release_time": "1578949342",
        "source": {
          "hash": "bdad33224479a7f755042db37591aeb7cfd9c3ac5c948f632674dea614141762ed82931f006fa3fe1f91122b32aa7ddd",
          "media_type": "video/mp4",
          "name": "test-helpscout.mp4",
          "sd_hash": "49526c867c8ee490e6ea6b1e3279a1e77a639bbe33d9fc48a1a32cc25850e01b1060247f96e243a3dd5922dbc06889cb",
          "size": "2791280"
        },
        "stream_type": "video",
        "thumbnail": {
          "url": "https://spee.ch/2/Qf3YdXlqbDUX4iftIY7P9cw0.png"
        },
        "title": "test",
        "video": {
          "duration": 65,
          "height": 1080,
          "width": 1920
        }
      },
      "value_type": "stream"
    },
    "short_url": "lbry://repost#6",
    "signing_channel": {
      "address": "bUfk4BTi34sFh96LhvyPk5wtyxHXcCp1KL",
      "amount": "0.9",
      "canonical_url": "lbry://@tom+laptop#4",
      "claim_id": "4a3ddf64575bccb1cfc7bc1d648bd1618e858ed3",
      "claim_op": "update",
      "confirmations": 25970,
      "has_signing_key": false,
      "height": 680531,
      "meta": {
        "activation_height": 670755,
        "claims_in_channel": 1,
        "creation_height": 670755,
        "creation_timestamp": 1574445252,
        "effective_amount": "0.9",
        "expiration_height": 2773155,
        "is_controlling": true,
        "reposted": 0,
        "support_amount": "0.0",
        "take_over_height": 670755,
        "trending_global": 0.0,
        "trending_group": 0,
        "trending_local": 0.0,
        "trending_mixed": 0.0
      },
      "name": "@tom+laptop",
      "normalized_name": "@tom+laptop",
      "nout": 0,
      "permanent_url": "lbry://@tom+laptop#4a3ddf64575bccb1cfc7bc1d648bd1618e858ed3",
      "short_url": "lbry://@tom+laptop#4",
      "timestamp": 1576012289,
      "txid": "c5157c9f1d0519718616810bd72eef4c76b52ac71538672315d32754d0623225",
      "type": "claim",
      "value": {
        "cover": {
          "url": "https://spee.ch/4/68f1a89a-b6df-464f-a481-0885b34ffaa5.jpg"
        },
        "public_key": "3056301006072a8648ce3d020106052b8104000a03420004cdcf9cd281b737145a4c3a1e9aa3c89fd8ac853384786b70b7f6301a496bc9433c7ca6338ae135c6ff4b135bafdba461a844d110065b0e8b9727cbfb2864c7c4",
        "public_key_id": "bESKRxkWxTVBWDQZca4y4axT4wHLL8wQ7j",
        "thumbnail": {
          "url": "https://spee.ch/8/85b94654-dbc3-4f54-b054-f1c587379f75.png"
        }
      },
      "value_type": "channel"
    },
    "timestamp": 1579710083,
    "txid": "53062738ecf0c372918aa69c96652ad1a5103e6acefc47e19b3daef2d1a72867",
    "type": "claim",
    "value": {
      "claim_hash": "Q8pvb1GDdD7OB8ocOmKQm/VCYLo="
    },
    "value_type": "repost"
  }
}

tzarebczan avatar Jan 27 '20 23:01 tzarebczan

@tzarebczan lex's notes say this is "fixed from last time". can i close it?

lyoshenka avatar Feb 19 '20 15:02 lyoshenka

This is an epic that needs more follow on work. Hopefully in the next week or two we can fully close out.

tzarebczan avatar Feb 19 '20 17:02 tzarebczan