[spam][crazy][wrong] Decentralised Git Notes Review

Undiscussed Horrific Abuse, One Victim of Many gmkarl at gmail.com
Tue Feb 8 01:13:05 PST 2022


In ethereum, smart contract functions are serialised into bytes based
on their function signature.
So, if you know the function signature of a method, you can call it.

Here's the mango repository interface:
contract MangoRepoInterface {
    function repoInterfaceVersion() constant returns (uint version);

    function refCount() constant returns (uint count);
    function refName(uint index) constant returns (string ref);
    function getRef(string ref) constant returns (string hash);
    function setRef(string ref, string hash);
    function deleteRef(string ref);

    function snapshotCount() constant returns (uint count);
    function getSnapshot(uint index) constant returns (string hash);
    function addSnapshot(string hash);

    function isObsolete() constant returns (bool);
}

It doesn't _name_ a repository. I'm guessing the name of the
repository is the smart contract address. It does name individual
refs. It also appears to enumerates all public pinned hashes on chain,
which is great.

It looks like it might let the owner change which hashes are publicly
pinned, removing some. They appear to be identified via name (likely
git branch names) rather than hashes. The history is stored publicly
on chain but it is a little more irritating to access.

Snapshots, however, appear to be stored immutably by default. Not sure
what is meant by a snapshot, but it has a hash.


More information about the cypherpunks mailing list