-
Notifications
You must be signed in to change notification settings - Fork 1.7k
EIP 1108: Reduce alt_bn128 precompile gas costs #11008
Conversation
b045765
to
7bf1f51
Compare
Box::new(AltBn128ConstOperations { | ||
price: pricer.price, | ||
eip1108_transition_price: pricer.eip1108_transition_price, | ||
eip1108_transition_at: b.eip1108_transition.map_or(u64::max_value(), Into::into) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deny-by-default
base: pricer.base, | ||
pair: pricer.pair, | ||
}, | ||
eip1108_transition_at: b.eip1108_transition.map_or(u64::max_value(), Into::into), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deny-by-default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments&feedback
Can you elaborate on this? What further changes to the chainspec do we need? As for "good enough" I'm interested in hearing if Wei has a better idea. I think juggling these transitions is always a bit inelegant but maybe he has a better approach. @niklasad1 how would you refactor the |
@dvdplm A better approach I can think of maybe something like this: we define a new type
However, this will probably take some time to refactor, and given our time constraints, I think @niklasad1's approach should be good enough! |
We need to update all other chain specs with the
Yes, it is not pretty I agree
I think it should be possible to revert it completely if we could handle it within |
Right, of course. Ok, overall lgtm. Holler when you're done with this and I'll give it a once-over again. :) |
I'm done 👍 |
ethcore/builtin/src/lib.rs
Outdated
@@ -38,9 +38,11 @@ trait Implementation: Send + Sync { | |||
} | |||
|
|||
/// A gas pricing scheme for built-in contracts. | |||
// NOTE(niklasad1): maybe refactor this trait because only `bn128_operations` are using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an issue and include a link here.
@sorpaas looks good to you? Let's merge this! :) |
* master: EIP 1108: Reduce alt_bn128 precompile gas costs (openethereum#11008) Fix deadlock in `network-devp2p` (openethereum#11013)
…he-right-place * master: Extract snapshot to own crate (#11010) Edit publish-onchain.sh to use https (#11016) EIP 1108: Reduce alt_bn128 precompile gas costs (#11008) Fix deadlock in `network-devp2p` (#11013) Implement EIP-1283 reenable transition, EIP-1706 and EIP-2200 (#10191) EIP 1884 Re-pricing of trie-size dependent operations (#10992)
Wow, nice job on the PR number; 11008 for 1108! |
Glad someone finally noticed! ;) |
* feat: implement eip1108 * doc nit: price per point pair Co-Authored-By: David <dvdplm@gmail.com> * fix: test-build * fix: update chain specs * fix: basic_authority.json chain spec * fix: change `eip_transition == 0x7fffffffffffff` * add issue link to `TODO`
* feat: implement eip1108 * doc nit: price per point pair Co-Authored-By: David <dvdplm@gmail.com> * fix: test-build * fix: update chain specs * fix: basic_authority.json chain spec * fix: change `eip_transition == 0x7fffffffffffff` * add issue link to `TODO`
* add more tx tests (#11038) * Fix parallel transactions race-condition (#10995) * Add blake2_f precompile (#11017) * [trace] introduce trace failed to Ext (#11019) * Edit publish-onchain.sh to use https (#11016) * Fix deadlock in network-devp2p (#11013) * EIP 1108: Reduce alt_bn128 precompile gas costs (#11008) * xDai chain support and nodes list update (#10989) * EIP 2028: transaction gas lowered from 68 to 16 (#10987) * EIP-1344 Add CHAINID op-code (#10983) * manual publish jobs for releases, no changes for nightlies (#10977) * [blooms-db] Fix benchmarks (#10974) * Verify transaction against its block during import (#10954) * Better error message for rpc gas price errors (#10931) * Fix fork choice (#10837) * Fix compilation on recent nightlies (#10991)
* add more tx tests (#11038) * Fix parallel transactions race-condition (#10995) * Add blake2_f precompile (#11017) * [trace] introduce trace failed to Ext (#11019) * Edit publish-onchain.sh to use https (#11016) * Fix deadlock in network-devp2p (#11013) * EIP 1108: Reduce alt_bn128 precompile gas costs (#11008) * xDai chain support and nodes list update (#10989) * EIP 2028: transaction gas lowered from 68 to 16 (#10987) * EIP-1344 Add CHAINID op-code (#10983) * manual publish jobs for releases, no changes for nightlies (#10977) * [blooms-db] Fix benchmarks (#10974) * Verify transaction against its block during import (#10954) * Better error message for rpc gas price errors (#10931) * tx-pool: accept local tx with higher gas price when pool full (#10901) * Fix fork choice (#10837) * Cleanup unused vm dependencies (#10787) * Fix compilation on recent nightlies (#10991)
In future releases it might be a good idea to provide instructions about required updates in chainspec or other breaking changes in Changelog, for those who run custom networks |
@phahulin I agree, we did not handle that optimally. Apologies. OTOH it's non-trivial to keep track of exactly what changes affect which (advanced) users; do you have any concrete suggestions for us, other than writing more detailed changelogs? |
Attempt to close #10998 and implement https://eips.ethereum.org/EIPS/eip-1108
Warning, this is not an elegant PR because
ethcore/builtins
reads the values directly from JSON and I tried to implement it as best effort.If this is good enough, I will update the
chain spec
accordingly