provenance-io / provenance

A distributed, proof of stake blockchain designed for the financial services industry.
https://provenance.io
Apache License 2.0
87 stars 37 forks source link

Enhance the metadata process structure with fields to better represent normal software #2147

Open iramiller opened 2 weeks ago

iramiller commented 2 weeks ago

Summary

The current Process structure is heavily influenced by the concept of a JVM jar file. Unfortunately this is not how most software is actually released and managed. This structure should be realigned around a software release/version style typically used by modern software.

Problem Definition

Currently the Process reference for software in the metadata object is limited and not useful as it presumes that there would be a single hash used to identify the binary used to generate the results. A more typical result such as the standard used by the provenanced protocol would be a source code location and a version.

message Process {
  option (gogoproto.goproto_stringer) = false;
  // unique identifier for this process
  oneof process_id {
    // the address of a smart contract used for this process
    string address = 1;
    // the hash of an off-chain process used
    string hash = 2;
  }
  // a name associated with the process (type_name, classname or smart contract common name)
  string name = 3;
  // method is a name or reference to a specific operation (method) within a class/contract that was invoked
  string method = 4;
}

Proposal

Update the Process data to capture information used in modern software versioning such as that used by go and others which points to a source code location, a version, and in some cases a hash. This could be added as another option to the one of directive for referencing the software.

github.com/provenance-io/cosmos-sdk v0.50.7-pio-1 h1:A4WC4LzcQj6jh+WdIIP4OIN3DCSW1t5qONtkYrJ77jg=

For Admin Use

iramiller commented 2 weeks ago

Optionally we could just use the hash string as a place to put the full GitHub/version/hash example from go.mod above.