You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are there any part of the code holding the response even the mining already done? (the block is created, and the value is already updated, somehow the response not received, and keep processing for 10s)
We created our own Ethereum custom network and tune it to be pretty fast in mining.
What we found during the poc & comparison between web3.js & web3.j is:
Submit request by both method (modify a value in the hashmap and print out the value get directly from the hashmap)
The mining done less than a sec > the block has been created successfully
The mining stopped
web3.js = the value is modified, response received, and printed to the console less than a sec. it can handled quite some concurrent since it processed quite fast even sometimes the printed value operation faster than the mining
web3.j = once the transaction submitted, it seems like the response is hold (the value already changed, somehow it doesn't stop processing). At some point of concurrent, the memory consumption is very high and out of mem.
I think I might do something wrong at some point. Please suggest. Thanks in advance.
This is some part of t he code:
public void addCoin(long who, long value) throws Exception{
try {
TransactionReceipt result = wowClient.addCoin(new Uint256(BigInteger.valueOf(who)), new Uint256(BigInteger.valueOf(value))).get();
EventValues event = wowClient.processPrint2Event(result);
System.out.println(event.getNonIndexedValues().get(0).getValue());
} catch (InterruptedException | ExecutionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
The text was updated successfully, but these errors were encountered:
By default web3j polls every 15 seconds for a transaction response. You can modify this value in your transaction manager:
// Using RawTransactionManagerTransactionManagertransactionManager = neworg.web3j.tx.RawTransactionManager(web3j, <credentials>, 40, 500);
// Or using ClientTransactionManagerTransactionManagertransactionManager = neworg.web3j.tx.ClientTransactionManager(web3j, "0x<fromAddress>", 40, 500);
// Now we'll poll every 500 ms for a transaction responseYourContractcontract = YourContract.deploy("0x<contracAddress>", web3j,
transactionManager, ManagedTransaction.GAS_PRICE, Contract.GAS_LIMIT,
<initialValue>, <constructorParam1>,...);
Note - make sure you're using web3j 2.1.0 as prior to this version, the smart contract initial deployment was fixed at 15 seconds.
If you want this to be as fast as possible, I'd recommend using IPC, as it's a lot faster than HTTP for communicating with the clients. See here for details.
Are there any part of the code holding the response even the mining already done? (the block is created, and the value is already updated, somehow the response not received, and keep processing for 10s)
We created our own Ethereum custom network and tune it to be pretty fast in mining.
What we found during the poc & comparison between web3.js & web3.j is:
web3.js = the value is modified, response received, and printed to the console less than a sec. it can handled quite some concurrent since it processed quite fast even sometimes the printed value operation faster than the mining
web3.j = once the transaction submitted, it seems like the response is hold (the value already changed, somehow it doesn't stop processing). At some point of concurrent, the memory consumption is very high and out of mem.
I think I might do something wrong at some point. Please suggest. Thanks in advance.
This is some part of t he code:
The text was updated successfully, but these errors were encountered: