Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Dedupe and slim range information in highlights #127

@okjodom

Description

@okjodom

Current range serialization by colighter results in a bunch of duplicate information stored per highlight created on a page. We optimize our range serialization strategy to have the least-but-useful information stored in the range tag.

Here is a sample taken of highlights taken from https://nakamoto.com/the-cypherpunks/

[
  {
    "created_at": 1687606268,
    "content": "Cypherpunk economicsIt's important to understand the cypherpunk take on economic philosophy. The cypherpunks were deeply suspicious of central banks and their control over monetary policy after the end of Bretton Woods. Many years later, their suspicions were arguably justified after the financial crisis of 2008, when central banks created massive amounts of money to bail out failing banks.It's worth taking a brief excursion here. In general, governments have two ways to finance their operations.",
    "tags": [
      ["r", "https://nakamoto.com/the-cypherpunks/"],
      [
        "range",
        "type:textContent|5357$5812$2$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$|6519$6850$1$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$|8203$8704$4$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$|14928$15249$3$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$",
        "colighter"
      ]
    ],
    "kind": 9802,
    "pubkey": "d8d821b0b39c121e89ee90a7f9431136a052b39b164976c51c05e0dd91cb95e3",
    "id": "0f7142d02f4199ec93f545d9117146f286eaef1fd8c68f6a1aae76fa7d407c28",
    "sig": "9c641a5774b754bea55469891d651d980c7faa5593b5b30762d8d33df81a5e48708d4782aec41b3d349e118d268759c54f18fc201462f9ad33da4d09e97cc654"
  },
  {
    "created_at": 1687605532,
    "content": "In 1992, three Bay Area computer scientists launched a new mailing list for discussing cryptography, mathematics, politics, and philosophy. They called the members of this mailing list the cypherpunks: a portmanteau of cyberpunk, a genre of dystopian sci-fi, and ciphers, a staple of cryptography.The cypherpunks were an eclectic crew, but they all shared a core conviction: that the Internet would soon become an important battleground for human freedom.",
    "tags": [
      ["r", "https://nakamoto.com/the-cypherpunks/"],
      [
        "range",
        "type:textContent|5357$5812$2$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$|6519$6850$1$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$",
        "colighter"
      ]
    ],
    "kind": 9802,
    "pubkey": "d8d821b0b39c121e89ee90a7f9431136a052b39b164976c51c05e0dd91cb95e3",
    "id": "1e786642224e38c90227197495fc0cf447f08c8f1ccc12c7561c868cd934c778",
    "sig": "1ae1f59ecb7c1a7fce640dfc9f38ff6ff6faed71bc05402c0cf7592afb5c73fd4bfaf918e99ea2576b6b0f7cb5e6f1fbb1798960b0070ed64f57406c2de1b9f5"
  },
  {
    "created_at": 1687603006,
    "content": "Cryptography is the mathematics of codes and codebreaking. Prior to the 1970s, cryptography was a relatively arcane field, practiced only by the military and by spy agencies. At the time, strong encryption (anything more than 40 bits of security) was considered to be a military munition and therefore illegal to export from the US",
    "tags": [
      ["r", "https://nakamoto.com/the-cypherpunks/"],
      [
        "range",
        "type:textContent|6519$6850$1$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$",
        "colighter"
      ]
    ],
    "kind": 9802,
    "pubkey": "14636c23d56c7417c3930ea34a1e4246c60919aac4341782e36a25d7bbde7a84",
    "id": "2096076cb38e060eb101ecea58b69f288c16506613c6848a3a40c83d7ee09f0d",
    "sig": "3ec7ed6e35cf5a4682982e0543c1f3d9030272760cc16fda9d08b79e65fda69fb9fb8574e62edd28e8a0a64f6df23df13b120ee2a40588053ca6fc7bafd4277d"
  },
  {
    "created_at": 1687606112,
    "content": "DigiCash was not the only attempt at creating a digital currency. The cypherpunks launched many experiments, including Mojo Nation, a payments system for incentivized file sharing, and Hashcash, a \"payments\" scheme for mitigating email spam. (We'll look at Hashcash and implement it ourselves in the cryptography module.)",
    "tags": [
      ["r", "https://nakamoto.com/the-cypherpunks/"],
      [
        "range",
        "type:textContent|5357$5812$2$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$|6519$6850$1$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$|14928$15249$3$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$",
        "colighter"
      ]
    ],
    "kind": 9802,
    "pubkey": "14636c23d56c7417c3930ea34a1e4246c60919aac4341782e36a25d7bbde7a84",
    "id": "3b51a2215627fee6cf100994b48554395975a1bf90c6b77530c145eeb0756f39",
    "sig": "457320e47a4761785053aaf7d19ccd3d306b9707d19f88ca95ae4f8bfb4bf81b08578c0857a038c964b50482cbc8a7dafc8378f4d2d1287507d0611482844587"
  },
  {
    "created_at": 1687606297,
    "content": "Taxation and seigniorage are roughly economically equivalent, but taxation generally requires the assent of citizens, whereas printing money can be done unilaterally. The cypherpunks thus saw money printing as a form of theft from the holders of currency.",
    "tags": [
      ["r", "https://nakamoto.com/the-cypherpunks/"],
      [
        "range",
        "type:textContent|5357$5812$2$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$|6519$6850$1$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$|8203$8704$4$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$|9186$9441$5$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$|14928$15249$3$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$",
        "colighter"
      ]
    ],
    "kind": 9802,
    "pubkey": "d8d821b0b39c121e89ee90a7f9431136a052b39b164976c51c05e0dd91cb95e3",
    "id": "97ea4117675b4f9aab15b850758897105538b60111618ad26d79294c27af1f16",
    "sig": "76432257bf7603b044461f1c4aba30d2014f386fbe27183d2d33940dbc9b0276de0f29f52a48066918846841000a655d9367f3e81ba41880d9c52deccdcd4cbf"
  },
  {
    "created_at": 1687604671,
    "content": "Chaumian eCash was a major leap forward in digital currencies. But in 1998, the company founded on eCash (DigiCash) went bankrupt. It ultimately lost out in user adoption against credit cards and less private payments systems like PayPal. And of course, when the company liquidated, its entire cash ecosystem evaporated.",
    "tags": [
      ["r", "https://nakamoto.com/the-cypherpunks/"],
      [
        "range",
        "type:textContent|14300$14620$1$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$",
        "colighter"
      ]
    ],
    "kind": 9802,
    "pubkey": "14636c23d56c7417c3930ea34a1e4246c60919aac4341782e36a25d7bbde7a84",
    "id": "e0b6d17c60820fd78345eae2703f4a3cd506193fcac0c61b8e784bf66b2fc7b9",
    "sig": "3cbe6773182f7f0150caad5f7d4d7d8ce016cca218dd4362840a702d604625e14f28047591776036ac023ae49372d12c1ac8b8249800dfe87c202edd81cebaf1"
  },
  {
    "created_at": 1687601913,
    "content": "An early cypherpunk named Adam Back (who we'll be visiting again in this course) made his email signature the RSA encryption algorithm, written in five lines of Perl. Due to restrictions on the export of encryption algorithms, this was an illegal act of civil disobedience. He encouraged others on the mailing list to copy it in in solidarity",
    "tags": [
      ["r", "https://nakamoto.com/the-cypherpunks/"],
      [
        "range",
        "type:textContent|7161$7503$1$NPKryv4iXxihMRg2gxRkTfFhwXmNmX9F$",
        "colighter"
      ]
    ],
    "kind": 9802,
    "pubkey": "14636c23d56c7417c3930ea34a1e4246c60919aac4341782e36a25d7bbde7a84",
    "id": "fce6d3453bba3ca4afa6ac29a25bf415ccb33a3ce389b9f4de9735c759b36302",
    "sig": "bf2f99236f2ea2abcacb7a0b9be28a8008c6569203ba5790707b295e2c619a5f18e3e68d8abe15fba1f7ecc7220e196e3ffc746840ba79e6eecaca2d2cface40"
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions