ic-tools | A collection of tools for the DFINITY Internet Computer | Awesome List library
kandi X-RAY | ic-tools Summary
kandi X-RAY | ic-tools Summary
A collection of tools for the DFINITY Internet Computer.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ic-tools
ic-tools Key Features
ic-tools Examples and Code Snippets
Community Discussions
Trending Discussions on ic-tools
QUESTION
Hyperledger Fabric version: 2.2.4
Fabric Client: Fabric-Tools 2.2 Docker Image - https://hub.docker.com/layers/hyperledger/fabric-tools/2.2/images/sha256-a5f691808466e90942af3f5f72d697cdaa4e545acfc1f645a553986423ef7ea5?context=explore
Chaincode: Fabric-samples Javascript
Context on the issue:
I am currently creating a CI/CD pipeline for the deployment of chaincode using the 2.x chaincode lifecycle. I am facing unexpected behavior with Node.js chaincode deployment whereby the node_modules I install using npm install prior to running peer lifecycle chaincode package
(per the documentation) are not included in the resulting tar.gz package within code.tar.gz. Because my peer nodes are not able to access the internet to install dependencies, the missing modules result in errors when running the chaincode after installation. More specifically, I get errors related to missing modules like Fabric Shim which are defined in require()
statements in the chaincode sample.
When manually deconstructing unpacking the tar.gz structure, the code.tar.gz archive does not include node_modules that are present in the target chaincode directory that I defined the path to in the peer lifecycle chaincode package
command.
Expected Behavior: My understanding was that the new chaincode lifecycle packaging process included the dependencies in the tar.gz package before deploying and therefore there is no need to run npm install or otherwise download dependencies from externally at runtime. More specifically, based on the documentation and examples online, it seems the peer lifecycle chaincode package command would include installed dependencies from node_modules in the package for deployment.
Is this not the default behavior of the chaincode packaging mechanism, and if not, is there a best practice for bundling dependencies on Node.js chaincode where npm install
at the peer is not possible?
TIA for any help here
...ANSWER
Answered 2022-Jan-24 at 23:58The peer lifecycle chaincode package explicitly excludes the node_modules directory. Also as I assume you are currently using the inbuilt docker builder and launcher of the peer, even if you did send a package that contained the node_modules directory, it will still call npm install
on it even with the presence of the node_modules directory and may end up trying to interact with an external npm registry.
I would suggest that you look at either using a chaincode external builder and launcher, see https://hyperledger-fabric.readthedocs.io/en/release-2.2/cc_launcher.html and you could process a chaincode package that already has the node_modules included. A chaincode package is just a tar.gz file so is easy to package yourself as described in the link
or use chaincode as a service https://hyperledger-fabric.readthedocs.io/en/release-2.2/cc_service.html which doesn't require any code to be packaged and processed by the peer.
QUESTION
I have an java app (JDK13) running in a docker container. Recently I moved the app to JDK17 (OpenJDK17) and found a gradual increase of memory usage by docker container.
During investigation I found that the 'serviceability memory category' NMT grows constantly (15mb per an hour). I checked the page https://docs.oracle.com/en/java/javase/17/troubleshoot/diagnostic-tools.html#GUID-5EF7BB07-C903-4EBD-A9C2-EC0E44048D37 but this category is not mentioned there.
Could anyone explain what this serviceability category means and what can cause such gradual increase? Also there are some additional new memory categories comparing to JDK13. Maybe someone knows where I can read details about them.
Here is the result of command jcmd 1 VM.native_memory summary
ANSWER
Answered 2022-Jan-17 at 13:38Unfortunately (?), the easiest way to know for sure what those categories map to is to look at OpenJDK source code. The NMT tag you are looking for is mtServiceability. This would show that "serviceability" are basically diagnostic interfaces in JDK/JVM: JVMTI, heap dumps, etc.
But the same kind of thing is clear from observing that stack trace sample you are showing mentions ThreadStackTrace::dump_stack_at_safepoint
-- that is something that dumps the thread information, for example for jstack
, heap dump, etc. If you have a suspicion for the memory leak in that code, you might try to build a MCVE demonstrating it, and submitting the bug against OpenJDK, or showing it to a fellow OpenJDK developer. You probably know better what your application is doing to cause thread dumps, focus there.
That being said, I don't see any obvious memory leaks in StackFrameInfo
, neither can I reproduce any leak with stress tests, so maybe what you are seeing is "just" thread dumping over the larger and larger thread stacks. Or you capture it when thread dump is happening. Or... It is hard to say without the MCVE.
Update: After playing with MCVE, I realized that it reproduces with 17.0.1, but not with either mainline development JDK, or JDK 18 EA, or JDK 17.0.2 EA. I tested with 17.0.2 EA before, so was not seeing it, dang. Bisection between 17.0.1 and 17.0.2 EA shows it was fixed with JDK-8273902 backport. 17.0.2 releases this week, so the bug should disappear after you upgrade.
QUESTION
I've set up a sample network with three organizations:
- Org0 with two orderers;
- Org1 with one peer and one admin identity;
- Org2 with one peer, one admin identity and two user identities.
I've also set two CA, the second one gives certificates for TLS.
In the docker-compose.yaml, I've created two cli containers for Org1 and Org2 where I can act as admin joining a channel and installing the chaincode. In this way, I am able to deploy the chaincode without any problem. If I invoke the chaincode from the cli container of Org1 or Org2, it is always invoked with the role of admin of the organization (the certificate of the requestor is always the one of the admin of the org).
How can I invoke a smart contract with the role of a user that I've already registered on my CA (with the user certificate of one of the users of Org2) without implementing an application? This is useful for me only for testing purposes.
Currently I run this command:
...ANSWER
Answered 2021-Oct-25 at 06:50You can simply enroll your new user cryptographic material (MSP and TLS) from your CA and deploy a client container analog to the admin one, but pointing to the new material (with different volumes and env variables CORE_PEER_ID
, CORE_PEER_MSPCONFIGPATH
, etc.).
Anyone, at any point you are going to need to develop a client application with the SDK to implement more complex operations and execution flows.
You can also look for some higher level tool. IBM Blockchain Platform extension for VSCode is a good one.
QUESTION
When I specify the squashfs file system type in the wic
kickstart file (.wks file):
ANSWER
Answered 2021-Sep-02 at 18:06The dependency can be put in the machine configuration file with the WKS_FILE_DEPENDS
variable. For example:
QUESTION
I am trying to set up a Hyperledger Fabric Network with Hyperledger Explorer. I spin up a VM on the digital ocean cloud with ubuntu OS. From there, I spin up 3 orderers node, and 2 peers node. Which result in total of 5 nodes. (I am using RAFT setup).
However, I encounter the error as below when trying to start the hyperledger fabric explorer docker-container images.
Error: ...ANSWER
Answered 2021-Feb-20 at 23:54All configurations seems good, however you have to upgrade explorer version to be compatible with hyperledger fabric version.
So please use v1.1.4 instead of v1.1.1
Also make sure that you have mounted crypto config correctly, try to access this path inside the container /tmp/crypto/peerOrganizations/acme.com/tlsca/tlsca.acme.com-cert.pem
Try to change tlsCACerts
path to use peer tls ca.crt
/tmp/crypto/peerOrganizations/acme.com/peers/peer1.acme.com/tls/ca.crt
You have mentioned that the same configurations works with hyperledger fabric v2, if you have tried it locally not on the same server so I please disable the firewall on the server and give it a try
To check if you can reach domain and port please try this
cat > /dev/tcp/peer1.acme.com/7051
Check this https://support.bluemedora.com/s/article/Using-Bash-to-test-if-a-TCP-port-on-a-remote-system-is-open
QUESTION
Working on Webpack 5 and Storybook integration in our React apps' repository. Mainly upgrading from Webpack v4 to v5 because its support has been announced here in this blog post officially. Following the suggested full instructions.
With the below mentioned setup I get the following error message on the console:
...ANSWER
Answered 2021-May-28 at 08:12We had the same issue.
First, you will need to install @storybook/builder-webpack5@next
.
Then you have to upgrade every @storybook dependency to version ^6.3.0-alpha.6
using this command:
QUESTION
I'm wanting to create a script which can run k apply -Rf ./service-token-auth
for each of the logical groups here. Mainly all of the graphql-* and data-service-* folders.
Is this something that would be quite easy to implement?
...ANSWER
Answered 2021-Apr-28 at 21:21you can iterate over files in bash
first make sure that it only hits the folders that you want
QUESTION
My Hyperledger Fabric network in production runs on Docker swarm, but I want to migrate it to Kubernetes. I have tried searching online but found no resource explaining this process. Is this migration possible? What are the steps involved, and how straightforward would this process be?
I have three orderers deployed on three nodes. This is a sample orderer yaml file (I have three):
...ANSWER
Answered 2021-Apr-16 at 14:55The process can be really straightforward but it is not possible to avoid the inherent greater complexity of kubernetes (compared to swarm) which results, in turn, to a more complex configuration.
My advise is to start using kompose
tool, which both gives you the yaml files corresponding to you original docker-compose.yml but also warn you regarding possible issues that may arise.
After following kompose installation steps, naming orderer.yaml
your first file and peer.yaml
your second file it's only a matter of executing
QUESTION
https://www.devprovider.com/how-to-take-backup-from-hyperledger-fabric/
https://www.devprovider.com/how-to-restore-hyperledger-fabric-from-backup/
I follow this 2 tutorials for back up and restore my Blockchain,I did everything the same except:
Make back up:
1:
...ANSWER
Answered 2021-Mar-31 at 07:13according to your describe,in the tourial ,fabric version is v1.4.X,and the fabric you now use is v2.x.x,so in v1.4.x the test script is byfn.sh and in v2.x.x the test script is network.sh,these two scripts are different.
if you want to backup a fabric network and restore,you need just backup crypto-config(organizations in v2.x.x),ledger data which obtain from /var/hyperledger/fabric of docker container,and start your orderer and peer container ,you need not create channel or join channel ,you can query and invoke chaincode.
I have answer another question about restore fabric network,you can reference it In Hyperledger Fabric, is there a way to reuse the data of previous network?
--------------new answer-------------------------------
if you exec you peer chaincode invoke
command in terminal,you should add this env,and you can invoke success.
QUESTION
I'm new to Hyperledger and trying to use Hyperledger Caliper v0.3.2 as benchmark tool to test Fabric v1.3. I followed two official tutorials: https://hyperledger-fabric.readthedocs.io/en/release-1.3/build_network.html and https://hyperledger.github.io/caliper/v0.3.2/fabric-tutorial/tutorials-fabric-existing/
Now I have successfully instantiated fabcar
chaincode and the query is successful in peer0.org1
as follows
ANSWER
Answered 2021-Mar-19 at 12:36try it:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ic-tools
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page