technical-talk
  • nutzipper

    nutzipper

    11/19/2022, 1:38 PM
    Can Alice read the name Bob created/update content on that name?
  • p

    prathyush

    11/19/2022, 1:39 PM
    No unless Bob sends a channel to Alice then she can read/write on that specific channel depending on the permissions (similar to bundle) that bob gives.
  • p

    prathyush

    11/19/2022, 1:42 PM
    Basically you cannot forge a channel with a different name space ID. You can only receive it.
  • p

    prathyush

    11/19/2022, 7:08 PM
    edited: typo I mean can't.
  • p

    prathyush

    11/19/2022, 7:09 PM
    I was digging into HVM even more. It's quite neat, I can even roughly understand some parts of the implementation.
  • p

    prathyush

    11/19/2022, 7:38 PM
    This the reducer syntax, that I am trying to figure out.https://github.com/Kindelia/HVM/blob/master/src/runtime/base/reducer.rs
  • p

    prathyush

    11/19/2022, 7:38 PM
    // HVM's reducer is a finite stack machine with 4 possible states:
    // - visit: visits a node and add its children to the visit stack ~> visit, apply, blink
    // - apply: reduces a node, applying a rewrite rule               ~> visit, apply, blink, halt
    // - blink: pops the visit stack and enters visit mode            ~> visit, blink, steal
    // - steal: attempt to steal work from the global pool            ~> visit, steal, halt
  • p

    prathyush

    11/19/2022, 7:42 PM
    //   main {
    //     work {
    //       visit { ... }
    //       apply { ... }
    //       complete
    //     }
    //     blink { ... }
    //     steal { ... }
    //   }
  • nutzipper

    nutzipper

    11/20/2022, 7:37 AM
    What if the name should not be controlled nor by Alice not by Bob but the smart contract deployed by Alice? I’m thinking about e.g. multisig case.
  • p

    prathyush

    11/20/2022, 7:56 AM
    This is the design that immediately comes to my mind is, I haven't spent time thinking of the details. But multisig is a registered namespace to which Alice can send a channel signed with her namespace. The name will be stored in the multi sig and contracts can be made using that name. So Alice can send something like like (namespace_id,"Channel for multi sig use") and the multisig can do whatever with that specific channel.
  • p

    prathyush

    11/20/2022, 7:58 AM
    There can be other fancy designs like clonable not clonable etc etc. That needs more careful consideration.
  • p

    prathyush

    11/20/2022, 8:01 AM
    Is there benchmarks for processor use during Rholang Runtime ? And performance scaling benchmarks when processor number increases.
  • p

    prathyush

    11/20/2022, 8:02 AM
    This photo was for a very old HVM version. The latest version maxes of all cores to 100 pc and Available memory to close to 100 pc.
  • p

    prathyush

    11/20/2022, 3:57 PM
    Anyone has a clue? performance scaling of runtime as number of processor cores increases ?
  • t

    Tobi

    11/21/2022, 4:58 PM
    maybe here:https://github.com/rchain/rchain/issues/3596
  • p

    prathyush

    11/21/2022, 5:47 PM
    I am not sure if I am interpreting the graph right. It looks like most of the time is spent in read write to the database. I was curious about core usage, but I guess that is not the bottle neck.
  • p

    prathyush

    11/21/2022, 5:51 PM
    This is pretty cool. https://arxiv.org/html/cs/0311032v1 I imagine the final version of core Rholang will have a not too complex self-recognizer.
  • nutzipper

    nutzipper

    11/22/2022, 9:05 AM
    https://github.com/rchain/rchain/issues/3700 this is better one - it shows the bottlenecks of rholang execution. The issue was about speeding up map implementation but it is in general about speed of rholang.
  • nutzipper

    nutzipper

    11/22/2022, 9:08 AM
    Related to concurrency - we saw that scaling limited, there was some charts Tomislav shown last winter. But it looks like scaling of scala is limited, since some measurements of simple tasks invoked concurrently with Scala having FP stack that we use and rust shown that rust scales linearly but Scala not. There was a suggestion that there should be some solution on JVM world but we did not get to this
  • p

    prathyush

    11/22/2022, 7:55 PM
    Dennis created some nice detailed on worked on Rholang performance metrics. In https://github.com/rchain/rchain/issues/3768 he says
    After executing this code, the garbage contract sayHello will appear in the Rspace, and this garbage will lie in the Rspace forever. XD
    Even I was wondering about this long ago.
  • p

    prathyush

    11/22/2022, 7:59 PM
    Persistence is same as self replication. I prefer the self replication syntax because it is closer to Rholang core syntax but also reminds the programmer this language is very much capable getting stuck in non halting cycles.
  • p

    prathyush

    11/22/2022, 8:01 PM
    new mySet, loop in {
      contract loop(@n, @acc) = {
        if (n == 0) mySet!(acc)
        else loop!(n - 1, acc.add(n))
      } |
      loop!(10, Set())
    }
    new mySet, loop in {
      for( (@n, @acc) <- loop  ) = {
        if (n == 0) mySet!(acc)
        else loop!(n - 1, acc.add(n)) | {Rewrite the same for contract again}
      } |
      loop!(10, Set())
    }
    Will not leave garbage in Rspace.
  • p

    prathyush

    11/22/2022, 8:07 PM
    Basically contract is just a fancy way to
    [Rewrite the same for process again]
    .
  • p

    prathyush

    11/22/2022, 8:08 PM
    I actually don't like the persistence syntax, it feels more restrictive to me.
  • fabcotech

    fabcotech

    11/30/2022, 8:52 PM
    TON blockchain uses the actor model for concurrent computation
  • fabcotech

    fabcotech

    11/30/2022, 8:52 PM
  • fabcotech

    fabcotech

    11/30/2022, 8:52 PM
    interesting