Transaction decoding is not available for chainId 1337 in hyperledger Besu - ethereum

I deployed a smart contract(simplestorage.sol) in Hyperledger Besu and I was able to call the smart contract and execute the smart contract. However, I got 「Transaction decoding is not available for chainId 1337」error and I cannot see the transaction data.
Does anyone know how to solve this error? I read it somewhere on the internet that some said this is not an error but it's a feature that is still not available in Metamask.
Can anyone clarify this?

Related

(ethereum/solidity/truffle) calling smart contract method from test/client question

I am taking a udemy course and I encounter a code like this
https://github.com/acloudfan/Blockchain-Course-Basic-Solidity/blob/93ca256bcf8c436c144425291257dcff5c3b269f/test/constants_payable.js#L45
I am confuse why the call to a method is called directly instead of using .call or something, wherein if I do google, the way to call a method of a contract is either using .call or .send but at this point the author just calls it directly, is this allowed, why?
here is the contract code
https://github.com/acloudfan/Blockchain-Course-Basic-Solidity/blob/master/contracts/ConstantsPayable.sol
More or less, what is the context of calling smart contract method from a truffle test here? is it like the real environment where it waits for the transaction to be mined before returning or do tests just directly calls it like an ordinary function?
I am posting it here since the author of the udemy course is non responsive and its almost a week and more than a dozen Q&A question are not answered, so the author probably is busy or forgets about the course already (as it is kinda old course but reviewed well).
Before Truffle returns the contract instance (line 41), it uses the ABI interface (provided by the Solidity compiler) to build a map of JS functions for interacting with the contract, including receiveEthers().
what is the context of calling smart contract method from a truffle test here
Even though Truffle JS tests can be connected to a public testnet or mainnet, it's usually used together with another Truffle tool - local EVM and blockchain emulator called Ganache (see the config file where the author defines connection to a local blockchain). By default, Ganache mines a block after each transaction so that you (as a developer or a tester) don't need to worry about mining and other processes in setting up the network, and the response from the local blockchain it returned almost instantly.
if I do google, the way to call a method of a contract is either using .call or .send
Answering only about Truffle. Other packages such as Web3js or Ethers.js might have slightly different rules. And there are .call() and .send() methods in Solidity (for interacting with other contracts or addresses), that also behave differently than explained here:
You can interact with a contract in two different ways:
transactions (can make state changes - change contract storage, emit events)
calls (only read the contract data - no state changes)
By default, if you don't specify whether you want to make a transaction or a call, Truffle makes a transaction. You can override this decision and make a call instead by using the .call() method.
The .send() method is only used for low-level built transactions. A common use case is sending ETH - you need to build the transaction data field, fill the (ETH) value, and call the .send() method (assuming you have configured Truffle to use your private key to sign the transaction).

Etherem connection with Decentralized application

I Need to setup ethereum for thesis work and I need to use smart contract too. The Etereum should be private and I can make changes, Please give me step by step solution

Secp256k1 solidity contract assembly errors: SyntaxError: loop flag outdated. Please consider using "switch", "if" or "for" statements instead

I'm working on updating some smart contracts to deploy on the Ethereum blockchain, however the cryptographic primitive for this project are really outdated and I don't know enough about cryptography to update them. Can anyone help me to rewrite the code? The repo is here -> [https://github.com/kCox96/smart-contracts/blob/master/contracts/Secp256k1_noconflict.sol]
Please don't write your own crypto!
If you just want to verify ecdsa-signatures you can use ecrecover() a builtin function to verify signatures, or this library https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/cryptography/ECDSA.sol
If you really need these curve functions there are some libraries out there (e.g. https://github.com/tdrerup/elliptic-curve-solidity) but they also seem to be not well maintained

Connecting Ethereum nodes that are on different machines

I am experimenting with Ethereum. I have successfully setup a private testnet via the instructions on the site. However, I am having trouble adding peers from different machines. On any node I create, the admin.nodeInfo.NodeUrl parameter is undefined. I have gotten the enode address by calling admin.nodeInfo and when I try the admin.addPeer("enode://address") command (with the public IP,) it returns true but the peers are not listed when calling admin.peers.
I read on another thread (here) that the private testnet is only local, but I am seeing plenty of documentation that suggests otherwise (here and here.) I have tried the second tutorial adding the command-line flags for custom networkid and genesis block.
Any advice would be much appreciated. Please let me know if I can provide more details.
It is difficult to find in the available documentation but a key function is admin.addPeer().
https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console
There are a few ways you could do it I suppose, but I have 1 node running on my local PC and one node running on a remote server. This saves me Ether while testing contracts and keeps me from polluting the Ethereum blockchain with junk. The key when running the admin.addPeer() is to find the "enode" for each of the notes such that you will run the function to look something like this on one of the nodes: admin.addPeer(enode#ipaddress:port). If you run admin.peers and see something other than an empty list, you were probably successful. The main thing to check for is that the enode ID and ip address from admin.peers match what you were expecting.
The geth configuration settings are a little tricky as well. You will have to adopt it for your particular uses, but here are some of the parameters I use:
geth --port XYZ --networkid XYZ --maxpeers X
Replace XYZ and X with the numbers you want to use and make sure you run the same parameters when starting both notes. There could be more parameters involved, but that should get you pretty far.
Disclaimer: I'm new to Geth myself as well as using computers for anything more than facebook, so take my answer with a grain of salt. Also, I haven't given you my full command line with starting up Geth because I'm not 100% sure on whether some of the parameters are related to a private testnet and which are not. I've only given you the ones that I'm sure are related to running a private testnet.
Also, you may find that can't execute any transactions which running a private test net. That's because you need one of them to start mining. So run: miner.start(X) when you are ready to start deploying contracts.
I apologize for this not being fully complete, but just passing on my experience after spending 1-2 weeks trying to figure out myself because the documentation isn't full clear on how to do this. I think it should be actively discouraged in the spirit of Ethereuem, but in my case, I run primarily not to pollute the blockchain.
PS. As I was just getting ready to hit submit, I found this that also sheds more light.
connecting to the network

Memcache (northscale) socket pool question for Enyim

I'm using Northscale 1.0.0 and need a little help getting it to limp along for long enough to upgrade to the new version. I'm using C# and ASP.NET to work with it using the Enyim libraries. I currently suspect that the application does not have enough connections per the socketPool setting in my app.config. I also noted that the previous developer's code simply treats ANY exception from an attempted Get call to MemCache as if the item isn't in the cache, which (I believe) may be resulting in periodic spikes in calls to the database when the pool gets starved. We've been having oddball load spikes that don't seem to have any relation to server load. I suspect that he is not correctly managing the lifecycle on the connections to Northscale and that we are periodically experiencing starvation in the socket pool as a result, but I'm unable to prove it.
Is there a specific exception I should be looking for when I call the Get method to retrieve items from cache? I'm not really seeing much in the docs that gives me sufficient information on this. Anybody have any sample code on this? I'd even accept java or php code, as I think the .NET libraries were probably based on one of those anyway.
Any ideas?
Thanks,
Will
If you have made the connection correctly to the membase server(formerly Northscale) typically you only get an exception on 'get' when it's not a hit.