Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DIY chaincode package digest error #37

Closed
davidkhala opened this issue Apr 21, 2022 · 5 comments
Closed

DIY chaincode package digest error #37

davidkhala opened this issue Apr 21, 2022 · 5 comments
Labels

Comments

@davidkhala
Copy link
Owner

The content digest of function pack output is inconsistent among time.
Unlike peer chaincode package command

@davidkhala davidkhala added the bug label Apr 21, 2022
@davidkhala davidkhala changed the title DIY chaincode package issue DIY chaincode package digest error Apr 21, 2022
@davidkhala
Copy link
Owner Author

found new peer command option:
peer lifecycle calculatepackageid packageFile

@davidkhala
Copy link
Owner Author

found abnormal:

const binDigest = sha2_256(fs.readFileSync(output2).toString());

does not match with

const binID = pack.calculateId(output2, binManager);

@davidkhala
Copy link
Owner Author

See in

func (p *Platform) GetDeploymentPayload(codepath string) ([]byte, error) {
...

@davidkhala
Copy link
Owner Author

davidkhala commented Apr 25, 2022

peer cmd control file header in fine-grain

header.Mode = 0o100644
header.Uid = 500
header.Gid = 500
header.Uname = ""
header.Gname = ""

See in isaacs/node-tar#316

@davidkhala
Copy link
Owner Author

if a way to archive is time consistent, then it is good to go even the final hash is not consistent with bin peer
peer lifecycle chaincode package is not mighty since it deny type 'ccaas' nor 'external'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant