> what is the purpose behind counting the number of sig ops after you have > executed the script in ConnectInputs? > Seems like it would be too late then.
The purpose is to comply with the "a block shall not contain more than MAX_BLOCK_SIGOPS (20,000)" rule, under both the old way of counting (look at the scriptPubKeys and count CHECKMULTISIGs as 20 sigops no matter what) and the new way (look at both scriptPubKeys and pay-to-script-hash scripts in the scriptSig, but count CHECKMULTISIGS preceded by OP_1/2/3/... as 1/2/3 operations). RE: too late: Excellent point. I'll refactor ConnectInputs further, and do something like: FetchInputs() AreInputsStandard() <-- reject from memory pool if nonstanard ComputeSigOps() ComputeFees() <-- reject if too little fees per byte / sigop ConnectInputs() Pieter's compressed-public-keys patch (which was just pulled) interacts with pay-to-script-hash to make ECDSA denial-of-service attempts less expensive; I think we need to think hard again about transaction fees before releasing 0.6, and maybe tweak the fee policy so denial-of-service attacks using compressed public keys and 1-of-3 CHECKMULTISIG transactions is expensive enough to deter would-be attackers. -- -- Gavin Andresen ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Bitcoin-development mailing list Bitcoin-development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bitcoin-development