Unable to deploy contract in quorum(truffle) - blockchain

was working with deploying contracts using truffle(truffle migrate) for manually created nodes as per "https://docs.goquorum.com/en/latest/Getting%20Started/Getting-Started-From-Scratch/" (using raft-consensus) . I am able to add peer(other machine) and create network, but when i was deploying using truffle i am gettong the following errorError encountered, bailing. Network state unknown. Review successful transactions manually.
Error: Error: Error: Returned error: authentication needed: password or unlock
at Object.run (/usr/lib/node_modules/truffle/build/webpack:/packages/truffle-migrate/index.js:92:1)
at processTicksAndRejections (internal/process/task_queues.js:86:5

This is a duplicate of your question posted on Slack. I suggest avoiding multiple postings to avoid duplication of effort. For reference, here is the link to the Slack conversation:
https://go-quorum.slack.com/archives/C68NY0QQZ/p1562682519077000
(it may require Slack membership to view it).

Related

Gnosis Safe Contracts : Error deploying to custom Network

There is an error in deploying to custom network using deterministic deployment approach. The custom network is a evm based network. By adding PK and NODE_URL in the .env the code is expected to deploy all contracts in the custom network but I am facing the below error.
Error Screenshot
I am using hardhat to deploy the contracts https://github.com/gnosis/safe-contracts with the below params in .env.
# Used for custom network
NODE_URL="https://public-node-api.klaytnapi.com/v1/baobab"
PK="08bb64b0bb5d4baa180920c93e9820a6e10669e0b7576b8e88baf2959447d46a"
ETHERSCAN_API_KEY=""
# Use the Safe singleton factory for singleton deployment. This is required if EIP-155 is enforce on a chain.
CUSTOM_DETERMINISTIC_DEPLOYMENT="false"
When I yarn deploy-all custom below is the specific error
deploying create2 deployer contract (at 0x4e59b44847b379578588920ca78fbf26c0b4956c) using deterministic deployment (https://github.com/Arachnid/deterministic-deployment-proxy)An unexpected error occurred:
I can provide you with two checkpoints:
"The chain needs to be fully compatible, i.e. support all opcodes used by the Safe contracts."
You can request a new deployment at https://github.com/safe-global/safe-singleton-factory for Deterministic Deployment Proxy

Running Metaplex on localhost

Trying to run Metaplex with locally hosted test validator. The wallet seems to be connecting correctly and showing the balance as expected. But it fails to initialize the store. Whenever I press "init store" I run into a timeout waiting for the transaction confirmation.
To enable connecting to localhost I've modified ENDPOINTS in 'connection.ts by adding the following to the array:
{
name: 'localnet' as ENV,
endpoint: 'http://127.0.0.1:8899',
ChainId: ChainId.Devnet,
}
Upon a closer investigation it seems that the init store does not actually deploy the programs to the local blockchain.
If by "Metaplex" in your orginal post you are referring to the Web UI here https://github.com/metaplex-foundation/metaplex/tree/master/js/packages/web keep in mind this UI does a lot of stuff.
As you have noted in your update: Metaplex is composed of many different program accounts. You would have to locate each of these accounts then "--clone" them on the solana-test-validator command line in order to ensure Metaplex works.
AFAIK there is no script or instructions about how to set up Metaplex from scratch.
The Metaplex storeFront is deprecated and is no longer maintained by the Metaplex Team. So i will advice for building an NFT Marketplace better use the Auction house contract for that. Here is the link for Auction house link

MetaMask RPC error? 'MetaMask - RPC Error: Internal JSON-RPC error.'

I'm developing the front-end to an application that I'm trying to test. However, MetaMask keeps giving me this error? I tried changing the gas limit like previously suggested and nothing. Any ideas?
Error:
MetaMask - RPC Error: Internal JSON-RPC error.
code: -32603
data: {code: -32000, message: "gas required exceeds allowance (30000000) or always failing transaction"}
message: "Internal JSON-RPC error."
Without seeing the code, it's hard to say for sure but you could try:
Check any code you changed in the front end, specifically in your code you may have something like this:
const contractInstance = new state.web3.eth.Contract(
MyContract.abi,
"0x.....", // contract address
{
from: state.accounts[0],
gasPrice: 1000,
gas: 100000
}
);
Make sure the gas prices are similar to those, you may have to adjust for your case.
Re-compile and redeploy --> for truffle, run truffle develop first, then compile then migrate --reset for local deployment.
In Metamask, reset your test account. Metamask > Select Account > Settings > Advanced > Reset account. Only do this for testing accounts
Previously it used to happen in older versions due to a gas specification issue which was fixed. rpcErrors.internal` expects a string as the first argument, with arbitrary data being the optional second argument. Passing in a non-
string first argument results in the error being shadowed by an error
from eth-json-rpc-errors.
Please check what you are passing to Metamask.
In my case, after trying so many options I have restarted Ganache and re-imported new account from Ganache to Metamask.
I connected this new account with localhost application.
This resoles my issue.
Before performing any transaction the sending ETH address must be connected to your own site or UI. So it can get the address of sending account and goes towards the further transaction in the metamask.
Make sure Your sending account address must be connected to your UI.

Unable to start amplify mock InternalFailure: The request processing has failed because of an unknown error, exception or failure

I have just tried to start my amplify mock service and received the follow error:
InternalFailure: The request processing has failed because of an unknown error, exception or failure.
This has previously worked, a few hours ago with no resets or other changes.
To fix this, I did have success with removing amplify completely, doing amplify init & amplify add api but this means I lose my local data each time, but it happens randomly multiple times in the last few hours.
For the full log while error is taking place:
hutber#hutber:/var/www/unsal.co.uk$ amplify mock
GraphQL schema compiled successfully.
Edit your schema at /var/www/unsal.co.uk/amplify/backend/api/unsalcouk/schema.graphql or place .graphql files in a directory at /var/www/unsal.co.uk/amplify/backend/api/unsalcouk/schema
Failed to start API Mock endpoint InternalFailure
the problem probably comes from the SQLite file use for the mock (lock stories I guess). Delete the file in the mock-data/dynamodb/your_db_file.db folder and execute the again amplify mock api. The file recreates itself correctly. This avoids resetting the whole amplify project.

failed to instantiating chaincode in IBM Blockchain Platform

Basically, I am following this
https://cloud.ibm.com/docs/services/blockchain/howto?topic=blockchain-ibp-console-smart-contracts#ibp-console-smart-contracts-connect-to-SDK
to deploy a smart contract from my local network to IBM Blockchain Platform. Everything went smoothly until step four. I got an error indicating that something is wrong with my container.
I googled for a while and the most promising answer inferring that there might be some problems on web docker.
Here is the description for the error:
An error occurred during instantiation.
grpc payload is empty: error starting container: error starting container: Post http://localhost:2375/build?t=dev-jdoe-papercontract-0.0.4-c9f772dd033af7a0d2fa0b7aafb268a2f2d8045143cb4344d3356fbe72999ee0: Failed to generate platform-specific docker build: Failed to pull ibmblockchain/fabric-javaenv:amd64-v1.4.1: API error (404): pull access denied for ibmblockchain/fabric-javaenv, repository does not exist or may require 'docker login'
This is what it looks like on my screen:
It would be rather helpful if someone can tell me how to fix it. Thanks a lot in advance.
a little update: I tried to use JS instead of Java to write the smart contract, the same error popped out during the instantiating step.