Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Parity maxing out CPU on large contract deploy. #2910

Closed
ethernomad opened this issue Oct 27, 2016 · 5 comments
Closed

Parity maxing out CPU on large contract deploy. #2910

ethernomad opened this issue Oct 27, 2016 · 5 comments
Labels
M4-core ⛓ Core client code / Rust. Z0-unconfirmed 🤔 Issue might be valid, but it’s not yet known.

Comments

@ethernomad
Copy link
Contributor

The following js file loaded through geth attach into Parity causes Parity to max out a CPU. The command does not return.

var registry = "0xffe7a16dcc96b0ba121803720b7a5824d3c22cb1";
var blobstoreContract = web3.eth.contract([{"constant":true,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"getFlags","outputs":[{"name":"flags","type":"bytes4"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"getExists","outputs":[{"name":"exists","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"transferEnable","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"getAllRevisionBlockNumbers","outputs":[{"name":"blockNumbers","type":"uint256[]"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"flags","type":"bytes4"},{"name":"contents","type":"bytes"}],"name":"create","outputs":[{"name":"blobId","type":"bytes20"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"getRetractable","outputs":[{"name":"retractable","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"getUpdatable","outputs":[{"name":"updatable","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"getRevisionCount","outputs":[{"name":"revisionCount","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getContractId","outputs":[{"name":"","type":"bytes12"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"transferDisable","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"flagsNonce","type":"bytes32"},{"name":"contents","type":"bytes"}],"name":"createWithNonce","outputs":[{"name":"blobId","type":"bytes20"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"blobId","type":"bytes20"},{"name":"revisionId","type":"uint256"}],"name":"getRevisionBlockNumber","outputs":[{"name":"blockNumber","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"setEnforceRevisions","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"setNotRetractable","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"blobId","type":"bytes20"},{"name":"contents","type":"bytes"}],"name":"updateLatestRevision","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"retractLatestRevision","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"blobId","type":"bytes20"},{"name":"contents","type":"bytes"}],"name":"createNewRevision","outputs":[{"name":"revisionId","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"getTransferable","outputs":[{"name":"transferable","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"blobId","type":"bytes20"},{"name":"recipient","type":"address"}],"name":"transfer","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"setNotTransferable","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"getInfo","outputs":[{"name":"flags","type":"bytes4"},{"name":"owner","type":"address"},{"name":"revisionCount","type":"uint256"},{"name":"blockNumbers","type":"uint256[]"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"retract","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"setNotUpdatable","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"disown","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"getEnforceRevisions","outputs":[{"name":"enforceRevisions","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"blobId","type":"bytes20"},{"name":"contents","type":"bytes"}],"name":"restart","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"blobId","type":"bytes20"}],"name":"getOwner","outputs":[{"name":"owner","type":"address"}],"payable":false,"type":"function"},{"inputs":[{"name":"registry","type":"address"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"blobId","type":"bytes20"},{"indexed":true,"name":"revisionId","type":"uint256"},{"indexed":false,"name":"contents","type":"bytes"}],"name":"Store","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"blobId","type":"bytes20"},{"indexed":false,"name":"revisionId","type":"uint256"}],"name":"RetractRevision","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"blobId","type":"bytes20"}],"name":"Retract","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"blobId","type":"bytes20"},{"indexed":false,"name":"recipient","type":"address"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"blobId","type":"bytes20"}],"name":"Disown","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"blobId","type":"bytes20"}],"name":"SetNotUpdatable","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"blobId","type":"bytes20"}],"name":"SetEnforceRevisions","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"blobId","type":"bytes20"}],"name":"SetNotRetractable","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"blobId","type":"bytes20"}],"name":"SetNotTransferable","type":"event"}]);
var blobstore = blobstoreContract.new(
   registry,
   {
     from: web3.eth.accounts[3], 
     data: '0x60606040526040516020806119fc83395060806040819052905130600160a060020a039081166c0100000000000000000000000002835243600019014060945260348320600380546001606060020a031916740100000000000000000000000000000000000000009283900417908190557fc5f310c000000000000000000000000000000000000000000000000000000000855202600160a060020a03191660845290919082169063c5f310c09060a4906000906024818387803b1560025760325a03f11560025750505050611923806100d96000396000f36060604052361561013d5760e060020a600035046301fd89a4811461014257806308b7c13b1461019d57806312511c14146101f557806322057bc71461023357806330a24abd1461029a5780633c335b0e1461032b5780633df91162146103865780633ef87414146103e15780634788cabf1461043c57806347bdb7f4146104855780636d1da953146104d157806374f8d96e146105425780639243e08814610588578063976b01c0146105d05780639e65c7e514610618578063a7e93e871461066e578063a84c5330146106b6578063aa5d47191461070a578063b06df18e14610765578063b971b4e5146107b0578063ba15e52e146107f8578063cf7315c614610865578063d0c24e93146108ad578063d6ca8ccb146108f5578063dba1ac3d1461093d578063e0a7081114610998578063e487eb58146109ec575b610002565b3461000257610a476004356001606060020a031981166000908152602081905260408120805483919063ffffffff604060020a90910416158061019357508054604060020a900463ffffffff908116145b15610bae57610002565b3461000257610a7c6004356001606060020a031981166000908152602081905260408120805463ffffffff604060020a90910416158015906101ee57508054604060020a900463ffffffff90811614155b9392505050565b3461000257610a906004356001606060020a03198116600090815260208190526040902054819060e060020a0260e360020a161515610bd857610002565b3461000257610a92600435604080516020818101835260008083526001606060020a0319851681529081905291909120805483919063ffffffff604060020a90910416158061029057508054604060020a900463ffffffff908116145b15610c1457610002565b3461000257610adc60048035906024803590810191013560408051606060020a600160a060020a033316028152600019430140601482015290519081900360340190205b6001606060020a03198116600090815260208190526040902054604060020a900463ffffffff1615610c9657604080516001606060020a03199092168252519081900360140190206102de565b3461000257610a7c6004356001606060020a031981166000908152602081905260408120805483919063ffffffff604060020a90910416158061037c57508054604060020a900463ffffffff908116145b15610d9d57610002565b3461000257610a7c6004356001606060020a031981166000908152602081905260408120805483919063ffffffff604060020a9091041615806103d757508054604060020a900463ffffffff908116145b15610dca57610002565b3461000257610af96004356001606060020a031981166000908152602081905260408120805483919063ffffffff604060020a90910416158061043257508054604060020a900463ffffffff908116145b15610df457610002565b346100025760035474010000000000000000000000000000000000000000026040805173ffffffffffffffffffffffffffffffffffffffff199092168252519081900360200190f35b3461000257610a906004356001606060020a031981166000908152600260209081526040808320600160a060020a0333908116855292529091205482919060ff161515610e2157610002565b3461000257610adc60048035906024803590810191013560408051606060020a600160a060020a0333160281526014810185905281519081900360340190206001606060020a0319811660009081526020819052919091205463ffffffff604060020a9091041615610c9657610002565b3461000257610af96004356024356001606060020a031982166000908152602081905260408120548390839063ffffffff640100000000909104168110610e5c57610002565b3461000257610a906004356001606060020a031981166000908152602081905260409020548190606060020a9004600160a060020a03908116339190911614610ea357610002565b3461000257610a906004356001606060020a031981166000908152602081905260409020548190606060020a9004600160a060020a03908116339190911614610f0357610002565b3461000257610a906004803590602480359081019101356001606060020a0319831660009081526020819052604081205481908590606060020a9004600160a060020a03908116339190911614610f6457610002565b3461000257610a906004356001606060020a031981166000908152602081905260408120548290606060020a9004600160a060020a039081163391909116146110c757610002565b3461000257610af96004803590602480359081019101356001606060020a031983166000908152602081905260408120548490606060020a9004600160a060020a0390811633919091161461122757610002565b3461000257610a7c6004356001606060020a031981166000908152602081905260408120805483919063ffffffff604060020a90910416158061075b57508054604060020a900463ffffffff908116145b156112fd57610002565b3461000257610a906004356024356001606060020a031982166000908152602081905260409020548290606060020a9004600160a060020a0390811633919091161461132a57610002565b3461000257610a906004356001606060020a031981166000908152602081905260409020548190606060020a9004600160a060020a0390811633919091161461142757610002565b3461000257610b0b600435604080516020818101835260008083526001606060020a0319851681529081905291822080548392839290918391879163ffffffff604060020a90910416158061085b57508054604060020a900463ffffffff908116145b1561148857610002565b3461000257610a906004356001606060020a031981166000908152602081905260409020548190606060020a9004600160a060020a039081163391909116146114e557610002565b3461000257610a906004356001606060020a031981166000908152602081905260409020548190606060020a9004600160a060020a0390811633919091161461165657610002565b3461000257610a906004356001606060020a031981166000908152602081905260409020548190606060020a9004600160a060020a039081163391909116146116b757610002565b3461000257610a7c6004356001606060020a031981166000908152602081905260408120805483919063ffffffff604060020a90910416158061098e57508054604060020a900463ffffffff908116145b1561173b57610002565b3461000257610a906004803590602480359081019101356001606060020a031983166000908152602081905260408120548490606060020a9004600160a060020a0390811633919091161461176857610002565b3461000257610b926004356001606060020a031981166000908152602081905260408120805483919063ffffffff604060020a909104161580610a3d57508054604060020a900463ffffffff908116145b1561186657610002565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b604080519115158252519081900360200190f35b005b60405180806020018281038252838181518152602001915080519060200190602002808383829060006004602084601f0104600302600f01f1509050019250505060405180910390f35b604080516001606060020a03199092168252519081900360200190f35b60408051918252519081900360200190f35b60405180857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200184600160a060020a03168152602001838152602001806020018281038252838181518152602001915080519060200190602002808383829060006004602084601f0104600302600f01f1509050019550505050505060405180910390f35b60408051600160a060020a039092168252519081900360200190f35b6001606060020a0319841660009081526020819052604090205460e060020a0292505b5050919050565b6001606060020a031982166000908152600260209081526040808320600160a060020a03331684529091529020805460ff191660011790555050565b610c8e845b604080516020808201835260008083526001606060020a031985168152908190528281205492519192640100000000900463ffffffff16918290805910610c5d5750595b908082528060200260200182016040528015610c74575b509250600090505b81811015610bd1576118958482610e62565b949350505050565b604080516080810182528581526001602082015243918101919091526060810160e460020a86161515610cc95733610ccc565b60005b90526001606060020a03198216600081815260208181526040808320855181548785015188850151606090990151606060020a02604060020a9099026bffffffff00000000000000001964010000000090920267ffffffff000000001960e060020a90950463ffffffff1990941693909317939093169190911716176001606060020a03169590951790945583518181529081018690529092600080516020611903833981519152918791879190819081018484808284378201915050935050505060405180910390a39392505050565b5050506001606060020a03191660009081526020819052604090205460e060020a0260e260020a16151590565b5050506001606060020a03191660009081526020819052604090205460e060020a90810216151590565b5050506001606060020a031916600090815260208190526040902054640100000000900463ffffffff1690565b6001606060020a031983166000908152600260209081526040808320600160a060020a03331684529091529020805460ff191690555b505050565b610e9a85855b6000808215156118b2576001606060020a03198416600090815260208190526040902054604060020a900463ffffffff1691506118fc565b95945050505050565b6001606060020a03198216600081815260208190526040808220805460e060020a81810260e160020a170463ffffffff19909116179055517fb86f3c3a73ad38c55d90fac30de3dc575b3d9d6ee6930f3866da94ee94f721ce9190a25050565b6001606060020a03198216600081815260208190526040808220805460e060020a81810260e260020a19160463ffffffff19909116179055517f75daba3f198749e3660cfc2295394233aa2920ce7f8a2a008ce2e94f8f14cc3f9190a25050565b6001606060020a03198616600090815260208190526040902054869060e060020a908102161515610f9457610002565b6001606060020a03198716600090815260208190526040902054879060e060020a0260e160020a1615610fc657610002565b6001606060020a031988166000908152602081905260409020805490955060001963ffffffff6401000000009092048216011693508315156110735784546bffffffff0000000000000000191643604060020a021785555b83886001606060020a0319166000805160206119038339815191528989604051808060200182810382528484828181526020019250808284378201915050935050505060405180910390a35050505050505050565b61101e88600186035b6001606060020a03199190911660009081526001602090815260408083206008808604855290835292208054929093060260020a63ffffffff81810219909216439290921602179055565b6001606060020a03198316600090815260208190526040902054839060e060020a9081021615156110f757610002565b6001606060020a03198416600090815260208190526040902054849060e060020a0260e160020a161561112957610002565b6001606060020a031985166000908152602081905260409020548590640100000000900463ffffffff166001141561116057610002565b6001606060020a031986166000908152602081905260409020805467ffffffff000000001981166401000000009182900463ffffffff908116600019019283029190911790925516945060088506600114156111df576001606060020a0319861660009081526001602090815260408083206008890484529091528120555b6040805186815290516001606060020a03198816917fc9e765161ce3c4b3def6d0f1936e76be80474d7ccb93b2b5bafa18dcc5d7ef30919081900360200190a2505050505050565b6001606060020a03198516600090815260208190526040902054859060e060020a90810216151561125757610002565b6001606060020a031986166000908152602081905260409020805467ffffffff000000001981166401000000009182900463ffffffff16600181019092021790915592506112a986600019850161107c565b82866001606060020a0319166000805160206119038339815191528787604051808060200182810382528484828181526020019250808284378201915050935050505060405180910390a350509392505050565b5050506001606060020a03191660009081526020819052604090205460e060020a0260e360020a16151590565b6001606060020a03198316600090815260208190526040902054839060e060020a0260e360020a16151561135d57610002565b6001606060020a031984166000908152600260209081526040808320600160a060020a03871684529091529020548490849060ff16151561139d57610002565b6001606060020a0319861660008181526020818152604080832080546001606060020a0316606060020a8b0217905560028252808320600160a060020a038a1680855290835292819020805460ff191690558051928352517f661029d752ba5756a7f7474ebd1a755a69f22224377d6df2601d8a2970db69519281900390910190a2505050505050565b6001606060020a03198216600081815260208190526040808220805460e060020a81810260e360020a19160463ffffffff19909116179055517f7feed1ac047dce5dacc30cefbb67bb39dbe47941914d1f70927617563e56d5d19190a25050565b6001606060020a031988166000908152602081905260409020805460e060020a81029850606060020a8104600160a060020a03169750640100000000900463ffffffff16955092506114d988610c19565b93505050509193509193565b6001606060020a03198216600090815260208190526040902054829060e060020a0260e260020a16151561151857610002565b611587835b6001606060020a031981166000908152602081905260408120546008600663ffffffff64010000000090930483160182160416905b81811015610e57576001606060020a031983166000908152600160209081526040808320848452909152812055600101611552565b6040805160808101825260008082526020808301828152600019848601908152606085018481526001606060020a03198a1680865293859052868520955186549351925191516001606060020a0363ffffffff1990951660e060020a9092049190911767ffffffff000000001916640100000000909302929092176bffffffff00000000000000001916604060020a9091021791909116606060020a90910217909255915190917f933ca7e37d98c72876c6aa12637e56585fba7503129068eb87c3e5f3ad8400f191a2505050565b6001606060020a03198216600081815260208190526040808220805460e060020a81810260e060020a19160463ffffffff19909116179055517f67641472fabfcf1f4b48a4926c9a4f4ee8037f171a36b6b4765a611f777643b99190a25050565b6001606060020a03198216600090815260208190526040902054829060e060020a0260e360020a1615156116ea57610002565b6001606060020a0319831660008181526020819052604080822080546001606060020a03169055517f6b5718f98d9cab0cf1ea68d7685a5567c2e161a958e68943ada417581c73b2829190a2505050565b5050506001606060020a03191660009081526020819052604090205460e060020a0260e160020a16151590565b6001606060020a03198516600090815260208190526040902054859060e060020a90810216151561179857610002565b6001606060020a03198616600090815260208190526040902054869060e060020a0260e160020a16156117ca57610002565b6117d38761151d565b6001606060020a03198716600081815260208181526040808320805464010000000067ffffffff0000000019909116176bffffffff0000000000000000191643604060020a0217815581518381529283018a90529750919291600080516020611903833981519152918a918a9190819081018484808284378201915050935050505060405180910390a350505050505050565b5050506001606060020a031916600090815260208190526040902054606060020a9004600160a060020a031690565b838281518110156100025760209081029091010152600101610c7c565b506001606060020a031983166000908152600160209081526040808320600860001987018181048652918452919093205492060260020a818115610002570463ffffffff16915081505b509291505056fd5eeef8919c5473de9558a49bf3a5b19bcf59ec0d36e420586d7c3bbaf17d01', 
     gas: 4700000,
     gasPrice: 22873777766
   }, function (e, contract){
    console.log(e, contract);
    if (typeof contract.address !== 'undefined') {
         console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash);
    }
 })
@tomusdrw
Copy link
Collaborator

I believe an issue with IPC has been fixed recently: #2870

Are you running on latest master? Could you try if it works for you on 1.4?

@tomusdrw tomusdrw added Z0-unconfirmed 🤔 Issue might be valid, but it’s not yet known. M4-core ⛓ Core client code / Rust. labels Oct 27, 2016
@ethernomad
Copy link
Contributor Author

Running the latest from get.parity.io

@tomusdrw
Copy link
Collaborator

Right, so this is 1.3.9-beta release. Could you try compiling master or downloading the binary from here:
https://gitlab.ethcore.io/Mirrors/ethcore-parity/pipelines/2924

If you are not ok with running latest version, you need to wait for 1.3.10 release. I will backport the fix.

@ethernomad
Copy link
Contributor Author

I just used Geth instead ;-)

I'll test again either on master or 1.3.10 and update this issue.

@gavofyork
Copy link
Contributor

we'll assume it is fixed by #2870 - if it is still reproducible in 1.3.10 or 1.4.0, please reopen.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
M4-core ⛓ Core client code / Rust. Z0-unconfirmed 🤔 Issue might be valid, but it’s not yet known.
Projects
None yet
Development

No branches or pull requests

3 participants