GithubHelp home page GithubHelp logo

Compute Block Cid about forest HOT 4 CLOSED

chainsafe avatar chainsafe commented on August 16, 2024
Compute Block Cid

from forest.

Comments (4)

dutterbutter avatar dutterbutter commented on August 16, 2024 1

Sorry, I should have been much clearer...I have a skeleton of this completed in my current branch that returns a CID from prefix with default values. CBOR encoding is still required and incomplete.

pub fn cid(mut self) -> cid::Cid {
        let c = Prefix {
            version: Version::V0,
            codec: Codec::DagProtobuf,
            mh_type: DEFAULT_HASH_FUNCTION,
            mh_len: 0,
        };
        let new_cid = cid::Cid::new_from_prefix(&c, &[self.cached_bytes]);
        self.cached_cid = new_cid;
        self.cached_cid
    }

from forest.

dutterbutter avatar dutterbutter commented on August 16, 2024

I have this implemented in my latest branch as it required for fn new to return a new tipset.

from forest.

austinabell avatar austinabell commented on August 16, 2024

I have this implemented in my latest branch as it required for fn new to return a new tipset.

How are you doing the cbor encoding of the block? Is this branch available?

from forest.

ansermino avatar ansermino commented on August 16, 2024

Closing in favour of #46

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.