GithubHelp home page GithubHelp logo

Implement Basic Tipset about forest HOT 2 CLOSED

chainsafe avatar chainsafe commented on July 17, 2024
Implement Basic Tipset

from forest.

Comments (2)

dutterbutter avatar dutterbutter commented on July 17, 2024

pub fn NewTipSet {
// The blocks must be distinct (different CIDs), have the same height, and same parent set

// Also sorts tickets from smallest to largest; sorted array so index 0 is the smallest ticket in tipset

// returns TipSet type
}

Will also need to implement fn for identifying and attaching unique tipSetKey

from forest.

dutterbutter avatar dutterbutter commented on July 17, 2024

Included:

tipset methods

  • new() // builds a new TipSet from a collection of blocks
  • at() // returns the i'th block in the tipset
  • equals() // tests whether the tipset contains the same blocks as another

block methods

  • cid() // returns the content id of this block
  • decode_block() // decodes raw cbor bytes into a Block
  • signature_data() // returns the block's bytes without the blocksig for signature creating and verification

tipsetkey methods

  • new() // initialises a new tip_set_key
  • new_from_unique() // initialises a set with CIDs that are expected to be unique
  • equals() // checks whether the set contains exactly the same CIDs as another

ticket methods:

  • sort_keys() // returns the canonical byte ordering of the ticket

from forest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.