Network: Babylonnet test network
Network Version:
{
"chain_name": "TEZOS_ALPHANET_BABYLON_2019-09-27T07:43:32Z", "distributed_db_version": 0, "p2p_version": 0
}
Case: I'm trying to invoke a smart contract with a suit of RPC requests via the binary tezos-client the command-line client, to do so here is a list of operation and requests:
// RPC request: Get Counter
let counter = await getCounter();
// RPC request: Get Manager Key
const managerKey = await getManagerKey();
// RPC request: Get Protocol
const protocol = await getProtocol();
// RPC request: Get Blockhash
const blockHash = await getBlockHash();
// RPC request: Get ChainID
const chainId = await getChainID();
// Increment the Counter
counter = parseInt(counter.data, 10) + 1;
// Forge an operation returning the unsigned bytes
const forgeOperationResult = await forgeOperation(
blockHash.data,
chainId.data,
counter.toString()
);
// Sign Forge Result with tezos-client
const signatureExecution = await signOperation(forgeOperationResult.data);
const operationBytes = signatureExecution.split(" ")[1].split("\n")[0];
// Decode the signature
const signatureBS58 = bs58.decode(operationBytes.split("\n")[0]);
const signatureBytes = signatureBS58
.toString("hex")
.substring(10, signatureBS58.toString("hex").length - 8);
// We get finally the data ready to be injected
const injectionReady = forgeOperationResult.data.concat(signatureBytes);
// Run an operation without signature checks
const runOperationResult = await runOperation(
blockHash.data,
counter.toString(),
operationBytes,
chainId.data
);
// Simulate the validation of an operation
const preapplyOperationResult = await preapplyOperation(
protocol.data.protocol,
blockHash.data,
counter.toString(),
operationBytes
);
/**
Inject an operation in node and broadcast it. Returns the ID of the
operation. The `signedOperationContents` should be constructed using a
contextual RPCs from the latest block and signed by the client.
*/
const injectionResult = await curlOperation(injectionReady);
const transactionHash = injectionResult.substring(
1,
injectionResult.length - 2
);
await curlConfirmation(transactionHash, blockHash.data);
And I got after launching this script a transaction hash just like:
opA4Kf3AttQiZwzeoUzEaFUuvjuoRWJGZ9j1rSg73rkjrkv3uit
But the operation isn't included in any block and I can't find it in the block exlorers and the smart contracts stroage is never changed even after getting a success result when I simulated the transaction with the Preapply endpoint.
As result from confirmation process I got the error:
Fatal error: The operation opA4Kf3AttQiZwzeoUzEaFUuvjuoRWJGZ9j1rSg73rkjrkv3uit is outdated and may never be included in the chain. We recommand to use an external block explorer.
Any help?