-
Notifications
You must be signed in to change notification settings - Fork 1.7k
transactionPermissionContract takes effect before transactionPermissionContractTransition block #9897
Comments
pinging @andresilva ? |
@YuMingHe the contract is deployed to 0x...012, but |
my bad, that was a copy paste error when creating the issue. The problem persists. |
Can you confirm that your transactions are mined if you remove |
@andresilva Yes. You could verifying using the provided chain spec. Tx are mined if you remove |
Tested with the latest beta (2.1.4) and it seems to be fixed there. I changed your chainspec to activate the transaction permission contract at block #3.
|
Thanks for digging into this! Could you link the code change for the fix? Curious as to what the issue was. |
I think it was only implemented in 2.1 🤦♂️ (#9275). |
With 2.1.4 i'm getting |
Are you sure you have keys for the engine signer you configured? AFAIK there were no breaking changes wrt to validator set contracts. Using your chainspec here's what it shows when starting:
So it's getting the initial validator set from the contract. |
I am using the exact chain spec as above. Works on 2.0.6, but does not on 2.1.4. I am running the nodes via parity official docker images. |
The docker file changed with 2.1. now parity runs with a other user than root. So also the keys are now in a separate location. You have to move the keys |
@S3bb1 That resolved the docker issue. For anyone who has the same problem, the workaround is to set @andresilva Confirmed the permission contract transition issue is resolved on 2.1.4. However, were you ever able to get the actual permission contract to work? Following the interface stated in the doc (https://wiki.parity.io/Permissioning.html#transaction-type), even the simplest implementation that allows all transactions does not work for me. All tx types (basic, call, create, etc) are pending forever. Note tx works before transition block. Here is the complete permission contract code I'm using for my test. `contract AllowedTxType {
} |
@andresilva @joshua-mir any insight on this issue? |
@YuMingHe that doesn't match the ABI 😅 |
@joshua-mir Ahh, that resolved the issue. Thanks for the catching this! |
Before filing a new issue, please provide the following information.
Issue appeared when trying integrate a tx permission contract (https://wiki.parity.io/Permissioning.html#transaction-type) into parity chain spec file. Current chain spec file:
{ "name": "gaia", "engine": { "authorityRound": { "params": { "stepDuration": "1", "maximumUncleCountTransition": 0, "maximumUncleCount": 0, "validators": { "multi": { "0": { "safeContract": "0x0000000000000000000000000000000000000010" } } } } } }, "params": { "accountStartNonce": "0x0", "maxCodeSize": "0x60000", "maxCodeSizeTransition": "0x0", "gasLimitBoundDivisor": "0x400", "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", "networkID": "0xE0DC7", "eip140Transition": "0x0", "eip150Transition": "0x0", "eip160Transition": "0x0", "eip161abcTransition": "0x0", "eip161dTransition": "0x0", "eip211Transition": "0x0", "eip214Transition": "0x0", "eip658Transition": "0x0", "transactionPermissionContract": "0x0000000000000000000000000000000000000012", "transactionPermissionContractTransition": "0xC8" }, "genesis": { "seal": { "authorityRound": { "step": "0x00", "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" } }, "difficulty": "0x20000", "gasLimit": "0x663BE0" }, "accounts": { "0x0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } }, "0x0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } }, "0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, "0x0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x0", "pricing": { "modexp": { "divisor": 20 } } } }, "0x0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x0", "pricing": { "linear": { "base": 500, "word": 0 } } } }, "0x0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x0", "pricing": { "linear": { "base": 40000, "word": 0 } } } }, "0x0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x0", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "0x0000000000000000000000000000000000000009": { "balance": "1", "constructor" : "0x608060405260008054600160a060020a0319163317905560146001553480156200002857600080fd5b5060405162000ff938038062000ff9833981016040908152815160208084015192840151929093018051919390929183916000916200006e91600391908501906200015b565b50600090505b81518110156200010e5760016004600084848151811015156200009357fe5b602090810291909101810151600160a060020a031682528101919091526040016000908120805460ff19169215159290921790915582518291600491859084908110620000dc57fe5b6020908102909101810151600160a060020a031682528101919091526040016000206001908101919091550162000074565b600380546200012091600291620001c5565b505060058054600160a060020a03958616600160a060020a031991821617909155600080549390951692169190911790925550620002329050565b828054828255906000526020600020908101928215620001b3579160200282015b82811115620001b35782518254600160a060020a031916600160a060020a039091161782556020909201916001909101906200017c565b50620001c192915062000208565b5090565b828054828255906000526020600020908101928215620001b35760005260206000209182015b82811115620001b3578254825591600101919060010190620001eb565b6200022f91905b80821115620001c1578054600160a060020a03191681556001016200020f565b90565b610db780620002426000396000f3006080604052600436106100cf5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630c85780581146100d457806311ae9ed2146100fb57806313af40351461016057806340a141ff146101835780634d238c8e146101a45780635518edf8146101c557806375286211146101fe5780638c90ac07146102135780638da5cb5b1461022b578063a6940b071461025c578063b3f05b9714610271578063b7ab4db51461029a578063c805f68b146102af578063f981dfca146102d0575b600080fd5b3480156100e057600080fd5b506100e96102fa565b60408051918252519081900360200190f35b34801561010757600080fd5b50610110610300565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561014c578181015183820152602001610134565b505050509050019250505060405180910390f35b34801561016c57600080fd5b50610181600160a060020a0360043516610363565b005b34801561018f57600080fd5b50610181600160a060020a03600435166103e2565b3480156101b057600080fd5b50610181600160a060020a03600435166105b1565b3480156101d157600080fd5b50610181600160a060020a0360048035821691602480359091169160443591606435908101910135610673565b34801561020a57600080fd5b506101816106c6565b34801561021f57600080fd5b506101816004356106e7565b34801561023757600080fd5b50610240610703565b60408051600160a060020a039092168252519081900360200190f35b34801561026857600080fd5b50610240610712565b34801561027d57600080fd5b50610286610721565b604080519115158252519081900360200190f35b3480156102a657600080fd5b50610110610742565b3480156102bb57600080fd5b50610181600160a060020a03600435166107a2565b3480156102dc57600080fd5b50610181600160a060020a03600435811690602435166044356107e8565b60015481565b6060600380548060200260200160405190810160405280929190818152602001828054801561035857602002820191906000526020600020905b8154600160a060020a0316815260019091019060200180831161033a575b505050505090505b90565b600054600160a060020a0316331461037a57600080fd5b60008054604051600160a060020a03808516939216917f70aea8d848e8a90fb7661b227dc522eb6395c3dac71b63cb59edd5c9899b236491a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008054600160a060020a031633146103fa57600080fd5b600160a060020a03821660009081526004602052604090208054600190910154839160ff169081801561042e575060025481105b8015610465575082600160a060020a031660028281548110151561044e57fe5b600091825260209091200154600160a060020a0316145b151561047057600080fd5b600160a060020a038516600090815260046020526040902060010154600380549195509060001981019081106104a257fe5b60009182526020909120015460038054600160a060020a0390921691869081106104c857fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550836004600060038781548110151561050a57fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190206001015560038054600019810190811061054457fe5b6000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19169055600380549061057d906000198301610ccc565b50600160a060020a0385166000908152600460205260408120805460ff19168155600101556105aa61080f565b5050505050565b600054600160a060020a031633146105c857600080fd5b600160a060020a038116600090815260046020526040902054819060ff16156105f057600080fd5b600160a060020a0382166000818152600460205260408120805460ff1916600190811782556003805492820183905590820181559091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff1916909117905561066f61080f565b5050565b600554600160a060020a0316331461068a57600080fd5b6105aa85858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284375061085e945050505050565b600554600160a060020a031633146106dd57600080fd5b6106e56109b2565b565b600054600160a060020a031633146106fe57600080fd5b600155565b600054600160a060020a031681565b600554600160a060020a031681565b60005474010000000000000000000000000000000000000000900460ff1681565b6060600280548060200260200160405190810160405280929190818152602001828054801561035857602002820191906000526020600020908154600160a060020a0316815260019091019060200180831161033a575050505050905090565b600054600160a060020a031633146107b957600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600554600160a060020a031633146107ff57600080fd5b61080a838383610aa4565b505050565b60005474010000000000000000000000000000000000000000900460ff16151561083857600080fd5b6000805474ff0000000000000000000000000000000000000000191690556106e5610bf6565b600160a060020a03841660009081526004602052604090208054600190910154859160ff1690818015610892575060025481105b80156108c9575082600160a060020a03166002828154811015156108b257fe5b600091825260209091200154600160a060020a0316145b15156108d457600080fd5b600160a060020a03861660009081526004602052604090208054600190910154879160ff1690818015610908575060025481105b801561093f575082600160a060020a031660028281548110151561092857fe5b600091825260209091200154600160a060020a0316145b151561094a57600080fd5b876001548101431115801561095e57504381105b151561096957600080fd5b604051600190600160a060020a03808d1691908e16907f32c78b6140c46745a46e88cd883707d70dbd2f06d13dd76fe5f499c01290da4f90600090a45050505050505050505050565b60005474010000000000000000000000000000000000000000900460ff16156109da57600080fd5b600380546109ea91600291610cf0565b506000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055604080516020808252600280549183018290527f8564cd629b15f47dc310d45bcbfc9bcf5420b0d51bf0659a16c67f91d276325393909291829182019084908015610a9457602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610a76575b50509250505060405180910390a1565b600160a060020a03831660009081526004602052604090208054600190910154849160ff1690818015610ad8575060025481105b8015610b0f575082600160a060020a0316600282815481101515610af857fe5b600091825260209091200154600160a060020a0316145b1515610b1a57600080fd5b600160a060020a03851660009081526004602052604090208054600190910154869160ff1690818015610b4e575060025481105b8015610b85575082600160a060020a0316600282815481101515610b6e57fe5b600091825260209091200154600160a060020a0316145b1515610b9057600080fd5b8660015481014311158015610ba457504381105b1515610baf57600080fd5b604051600090600160a060020a03808c1691908d16907f32c78b6140c46745a46e88cd883707d70dbd2f06d13dd76fe5f499c01290da4f908490a450505050505050505050565b600554604080517fa0285c0100000000000000000000000000000000000000000000000000000000815260001943014060048201818152602483019384526003805460448501819052600160a060020a039096169563a0285c019593949193916064019084908015610c9157602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610c73575b50509350505050600060405180830381600087803b158015610cb257600080fd5b505af1158015610cc6573d6000803e3d6000fd5b50505050565b81548183558181111561080a5760008381526020902061080a918101908301610d40565b828054828255906000526020600020908101928215610d305760005260206000209182015b82811115610d30578254825591600101919060010190610d15565b50610d3c929150610d5a565b5090565b61036091905b80821115610d3c5760008155600101610d46565b61036091905b80821115610d3c57805473ffffffffffffffffffffffffffffffffffffffff19168155600101610d605600a165627a7a723058204462d03cf4bee1530265eb86c95d218eeb7104f965c51225ebba0422ae787c510029000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000600000000000000000000000005e9632d39ae9f0bfa4430fbe9b2ac4994729152b000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000bd138abd70e2f00903268f3db08f2d25677c9e00000000000000000000000000aa39d30f0d20ff03a22ccfc30b7efbfca597c2000000000000000000000000002e28950558fbede1a9675cb113f0bd20912019" }, "0x0000000000000000000000000000000000000010": { "balance": "1", "constructor" : "0x608060405260008054600160a060020a0319163317905534801561002257600080fd5b5060405160408061076683398101604052805160209091015160018054600160a060020a0319908116600260a060020a031790915560028054600160a060020a03948516908316179055600080549390921692169190911790556106db8061008b6000396000f3006080604052600436106100a35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166313af403581146100a857806375286211146100cb5780638da5cb5b146100e0578063a0285c0114610111578063ae3783d614610135578063b7ab4db51461014a578063bd965677146101af578063c476dd40146101d0578063d3e848f114610201578063d69f13bb14610216575b600080fd5b3480156100b457600080fd5b506100c9600160a060020a036004351661023a565b005b3480156100d757600080fd5b506100c96102b9565b3480156100ec57600080fd5b506100f5610356565b60408051600160a060020a039092168252519081900360200190f35b34801561011d57600080fd5b506100c9600480359060248035908101910135610365565b34801561014157600080fd5b506100f56103d9565b34801561015657600080fd5b5061015f6103e8565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561019b578181015183820152602001610183565b505050509050019250505060405180910390f35b3480156101bb57600080fd5b506100c9600160a060020a03600435166104d7565b3480156101dc57600080fd5b506100c960048035600160a060020a0316906024803591604435918201910135610557565b34801561020d57600080fd5b506100f5610610565b34801561022257600080fd5b506100c9600160a060020a036004351660243561061f565b600054600160a060020a0316331461025157600080fd5b60008054604051600160a060020a03808516939216917f70aea8d848e8a90fb7661b227dc522eb6395c3dac71b63cb59edd5c9899b236491a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600154600160a060020a031633146102d057600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663752862116040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b15801561033c57600080fd5b505af1158015610350573d6000803e3d6000fd5b50505050565b600054600160a060020a031681565b600254600160a060020a0316331461037c57600080fd5b82600019167f55252fa6eee4741b4e24a74a70e9c11fd2c2281df8d6ea13126ff845f7825c8983836040518080602001828103825284848281815260200192506020028082843760405192018290039550909350505050a2505050565b600254600160a060020a031681565b600254604080517fb7ab4db50000000000000000000000000000000000000000000000000000000081529051606092600160a060020a03169163b7ab4db591600480830192600092919082900301818387803b15801561044757600080fd5b505af115801561045b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561048457600080fd5b81019080805164010000000081111561049c57600080fd5b820160208101848111156104af57600080fd5b81518560208202830111640100000000821117156104cc57600080fd5b509094505050505090565b600054600160a060020a031633146104ee57600080fd5b600254604051600160a060020a038084169216907f4fea88aaf04c303804bb211ecc32a00ac8e5f0656bb854cad8a4a2e438256b7490600090a36002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6002546040517f5518edf80000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a0388811660248501526044840188905260806064850190815260848501879052941693635518edf8938992899289928992919060a40184848082843782019150509650505050505050600060405180830381600087803b1580156105f257600080fd5b505af1158015610606573d6000803e3d6000fd5b5050505050505050565b600154600160a060020a031681565b600254604080517ff981dfca000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a038581166024830152604482018590529151919092169163f981dfca91606480830192600092919082900301818387803b15801561069357600080fd5b505af11580156106a7573d6000803e3d6000fd5b5050505050505600a165627a7a7230582001ce67f12846fb88b74ae6d979154c0d89428f913240df85414dc622364b70e0002900000000000000000000000000000000000000000000000000000000000000090000000000000000000000005e9632d39ae9f0bfa4430fbe9b2ac4994729152b" }, "0x0000000000000000000000000000000000000011": { "balance": "1", "constructor" : "0x608060405260008054600160a060020a0319163317905534801561002257600080fd5b506040516020806103e2833981016040525160008054600160a060020a03909216600160a060020a031990921691909117905561037e806100646000396000f30060806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166313af403581146100715780633b577f20146100945780638da5cb5b146100ba578063ad641aec146100eb578063da26f8f614610111575b600080fd5b34801561007d57600080fd5b50610092600160a060020a036004351661014b565b005b3480156100a057600080fd5b50610092600160a060020a036004351660243515156101ca565b3480156100c657600080fd5b506100cf610245565b60408051600160a060020a039092168252519081900360200190f35b3480156100f757600080fd5b50610092600160a060020a03600435166024351515610254565b34801561011d57600080fd5b50610132600160a060020a03600435166102cf565b6040805163ffffffff9092168252519081900360200190f35b600054600160a060020a0316331461016257600080fd5b60008054604051600160a060020a03808516939216917f70aea8d848e8a90fb7661b227dc522eb6395c3dac71b63cb59edd5c9899b236491a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a031633146101e157600080fd5b600160a060020a038216600081815260016020908152604091829020805460ff191685151590811790915582519384529083015280517fe478cc9f0515032e91e75124f7cd07e0ebe332df4bc48ddd032eb236afb921949281900390910190a15050565b600054600160a060020a031681565b600054600160a060020a0316331461026b57600080fd5b600160a060020a038216600081815260026020908152604091829020805460ff191685151590811790915582519384529083015280517f91f355cae72a38cb90a4e1c048c965d974f94744e96bcab50e0ccbf714a8b1b29281900390910190a15050565b600160a060020a03811660009081526001602052604081205460039060ff16806103065750600054600160a060020a038481169116145b1561030f576004175b600160a060020a03831660009081526002602052604090205460ff16806103435750600054600160a060020a038481169116145b1561034c576008175b929150505600a165627a7a723058202d6b529dc8f80177d6766d001130402018131446c9712204e0dad947ddb5241d00290000000000000000000000005e9632d39ae9f0bfa4430fbe9b2ac4994729152b" }, "0x0000000000000000000000000000000000000012": { "balance": "1", "constructor" : "0x608060405260008054600160a060020a0319163317905534801561002257600080fd5b5060405160208061037d833981016040525160018054600160a060020a031916600160a060020a0390921691909117905561031b806100626000396000f30060806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166313af403581146100715780636924e5b2146100945780638da5cb5b146100c5578063bd965677146100da578063da26f8f6146100fb575b600080fd5b34801561007d57600080fd5b50610092600160a060020a0360043516610135565b005b3480156100a057600080fd5b506100a96101b4565b60408051600160a060020a039092168252519081900360200190f35b3480156100d157600080fd5b506100a96101c3565b3480156100e657600080fd5b50610092600160a060020a03600435166101d2565b34801561010757600080fd5b5061011c600160a060020a0360043516610252565b6040805163ffffffff9092168252519081900360200190f35b600054600160a060020a0316331461014c57600080fd5b60008054604051600160a060020a03808516939216917f70aea8d848e8a90fb7661b227dc522eb6395c3dac71b63cb59edd5c9899b236491a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600154600160a060020a031681565b600054600160a060020a031681565b600054600160a060020a031633146101e957600080fd5b600154604051600160a060020a038084169216907f4fea88aaf04c303804bb211ecc32a00ac8e5f0656bb854cad8a4a2e438256b7490600090a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600154604080517fda26f8f6000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301529151600093929092169163da26f8f69160248082019260209290919082900301818787803b1580156102bd57600080fd5b505af11580156102d1573d6000803e3d6000fd5b505050506040513d60208110156102e757600080fd5b5051929150505600a165627a7a723058209818ddf254a2bd8ec6d1a92895b18224b1aacfb4416d8e25e71b19dc17b71d4e00290000000000000000000000000000000000000000000000000000000000000009" }, "0x5e9632D39ae9F0BFA4430fbe9B2Ac4994729152B": { "balance": "10000000000000000000000000000" } } }
The permission contract is deployed in genesis at address 0x0000000000000000000000000000000000000012. Transition is configured to happen at block 100.
Expected Behavior
Chain started using this chain spec should permit all transactions until block 100. At block 100, tx permission should follow permission contract rules.
Actual Behavior
All tx are pending forever start at block 0.
The text was updated successfully, but these errors were encountered: