I have some simple Solidity code to test contract deployment and invocation. It has methods to write a value to storage, and a method to read it. This worked perfectly well with a private chain with a geth client.
After switching over to Parity client and a Proof-of-Authority chain, the contract is not getting deployed because the transaction to deploy it does not get mined. I have tried increasing the gas to 600 mil and gasPrice offered to 10 Gwei. Simple transfers of Ether do go through. Also, the Solidity code compiled successfully. Tried with sending account unlocked, and also by entering account password in confirmation window in browser UI.
Contract code:
pragma solidity ^0.4.7;
contract owned {
address owner;
function owned() {
owner = msg.sender;
}
}
contract mortal is owned {
function kill() {
if (msg.sender == owner) selfdestruct(owner);
}
}
contract IdMgmt is mortal {
struct acl {
string dataType;
string permissions;
}
mapping (address => acl) public aclOf;
function IdMgmt() { }
function createId(address _user, string _dataType, string _permissions) {
aclOf[_user].dataType = _dataType;
aclOf[_user].permissions = _permissions;
}
function getPermissions(address _user, string _dataType) constant
returns (string userPermissions) {
if (stringsEqual(aclOf[_user].dataType, _dataType)) {
userPermissions = aclOf[_user].permissions;
}
else {
userPermissions = "NO DATA";
}
}
function stringsEqual(string _a, string _b) internal returns (bool) {
bytes memory a = bytes(_a);
bytes memory b = bytes(_b);
if (a.length != b.length) {
return false;
}
for (uint i = 0; i < a.length; i ++) {
if (a[i] != b[i]) return false;
}
return true;
}
}
What other information would help in getting to the root cause?