Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moonsama polkadot v1.1.0 (botched) #4

Closed
wants to merge 90 commits into from

Conversation

gogosama-dev
Copy link

Merge Parity polkadot v1.1.0 branch

tgmichel and others added 30 commits June 22, 2023 00:33
* wip `record_extarnal_cost`

* Add support for external cost recording from the EVM

* Add refund external cost support

* Separate dispatchables with weight limit

* introduce tbd EthereumWeigher

* Validate gas to weight conversion

* Add static opcode recording with temp costs

* Add optional `transaction_len` parameter to `GasWeightMapping`

* Account for pallet and call indexes

* Rollback `transaction_len` param, use MAX_POV_SIZE ratio instead

* wip tests

* Add `uncached_account_code_proof_size_accounting_works` test

* wip tests

* Temp remove static external cost accounting

* fix build

* Temp remove static external cost accounting 2

* warning cleanup

* fmt

* clippy

* taplo

* Add `evm-with-weight-limit` to ci

* Temp set evm fork + update Cargo.lock

* handle `code_hash`

* taplo

* fmt

* Handle `transact_with_weight_limit` as self contained

* fix ts tests

* suggestion

* remove precompile test

* some suggestions

* remove `transact_with_weight_limit`

* configurable `MaxPovSize`

* test pov size constants

* accessed storage overlayed cache

* `new_from_weight_limit` suggestion

* remove unnecessary check

* warnings cleanup

* set constant gas limit max pov size ratio

* check state version for suicide

* just completely remove suicide accounting

* - `code` must be able to oog
- refund based on effective used gas

* `is_empty` accounting

* fix build

* `SSTORE` must record account storage proof size

* suggestion: move weight_limit checks

* editorconfig

* fmt

* rename `transaction_len` to `proof_size_base_cost` in runner

* move `proof_size_base_cost` to validation primitive

* gas limit saturated conversion

* remove transaction proof size check outside validation

* pin evm

* pin evm+

* fix todos

* fix build

* scope of already recorded codes and storages must be per transaction

* pin evm + implement new `record_external_operation`

* fix runtime api versioning + legacy `ExecutionInfo` handling

* editorconfig

* cargo fmt

* clippy

* suggestion remove `evm-with-weight-limit` feature

* fmt

* update comment

* update tests for additional `AccountBasicRead` in the evm

* update evm pin
…t-evm#1079)

* `eth_getLogs` return expected error/message for unknown hash

* prettier
* Move record_external_operation to StackState trait

* Fix lints

* Update evm pin
Bumps [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) from 4.8.3 to 4.9.2.
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases)
- [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.2/CHANGELOG.md)
- [Commits](OpenZeppelin/openzeppelin-contracts@v4.8.3...v4.9.2)

---
updated-dependencies:
- dependency-name: "@openzeppelin/contracts"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Seems like import notifications is sending the block hash multiple times and everytime its called, even the same hash gets written to DB event though the DB has already seen it. This change should ensure we only write unique fork hashes
…olkadot-evm#1077)

* add tests, remove restriction for normal sync

* refactor test name
* Add `pending` support for `eth_getBlockByNumber`

* header not needed

* cleanup

* prettier

* update some fields to be optional on pending

* update test

* cleanup
Since `sc-cli` and `sc-service` brings rocksdb as default, workspace was adjusted to not use default features. Rest of the changes are ensuring necessary code is made optional.
…evm#1073)

* Add new filter type

* Add txpool client side

* Fix node compile

* Fix rpc

* Dev filter_changes

* Add feature and format

* Use sp_core::hashing

* Fix clippy

* Format code

* Add pending transaction polling ts tests

* Add txpool ts-test

* Fix clippy CI

* Fix review

* Remove `TxPoolRuntimeApi`

* Clean trait bound

* Clean trait bound

* Remove feature `txpool`
Making SQL optional would be great and does not brings unwanted dependencies when SQL is not used. Here is an example: polkadot-evm#1086
* Improve `EthereumSigner`

* Add `RuntimeDebug`

* Typo

* Update primitives/account/src/lib.rs

---------

Co-authored-by: Wei Tang <[email protected]>
* deps: update substrate to polkadot-v0.9.42

- update substrate to 16b2e644487f7f767eeefd4debf11a7948bfa4db
- update rust toolchain to 1.68.2

* Enable `insecure_zero_ed` feature of `pallet-balances` to fix tests of `pallet-evm`,
since `ExistentialDeposit: u64 = 0` is configured in the mock impl of `pallet-evm`.

* fix precompile tests

* update some deps

* update evm to 0.39.1

* make clippy happy

* some trivials

* Update client/db/src/kv/upgrade.rs

---------

Co-authored-by: Wei Tang <[email protected]>
* deps: update substrate to polkadot-v0.9.42

- update substrate to 16b2e644487f7f767eeefd4debf11a7948bfa4db
- update rust toolchain to 1.68.2

* Enable `insecure_zero_ed` feature of `pallet-balances` to fix tests of `pallet-evm`,
since `ExistentialDeposit: u64 = 0` is configured in the mock impl of `pallet-evm`.

* fix precompile tests

* update some deps

* update evm to 0.39.1

* make clippy happy

* update substrate to polkadot-v0.9.43

* update rust-toolchain to 1.69.0 and update some deps

* format

* update ACCOUNT_BASIC_PROOF_SIZE constant

* improve db feature

* improve db features

* typo

* fix tests

* improve some trait bound

---------

Co-authored-by: tgmichel <[email protected]>
)

* Fix estimate used gas and estimation for WeightV2

* fmt

* suggestion

* add ts tests

* try to fix ts tests with bigger txns
…equest` (polkadot-evm#1096)

* Update deserializing data and input fields in TransactionRequest

* Custom deserializing for data and input in CallRequest

* Manually implement Deserialize for TransactionRequest and CallRequest

* Add some unit test for the custom deserialization

* add functional tests

* fix formatting

* deserializer for aliased fields

* custom deserializer for data and input fields in TransactionRequest

* fix formatting

* update functional test

* refactor code and fix formatting

---------

Co-authored-by: tgmichel <[email protected]>
…()` as `base_fee` floor value. (polkadot-evm#1115)

* [polkadot-evm#1107] Using DefaultBaseFeePerGas as base_fee floor value.

* [polkadot-evm#1107] Fix tests + if-else

* [polkadot-evm#1107] lowest_base_fee = default_base_fee * Threshold::ideal()

* [polkadot-evm#1107] fmt
…dot-evm#1117)

* [pallet_transaction_payment] Mirroring substrate node-template

* [pallet_transaction_payment] Restoring ts-tests/package-lock.json
* deps: update substrate to polkadot-v1.0.0

* Fix lints

* fix

---------

Co-authored-by: Wei Tang <[email protected]>
* Handle `u64` conversion

* suggestion switch to saturated conversion
…olkadot-evm#1121)

* Move `proof_size_base_cost` out to reuse it

* Add field

* Reuse `transaction_weight`

* Code clean

* Fix clippy
Bumps [semver](https://github.com/npm/node-semver) to 7.5.2 and updates ancestor dependency [truffle](https://github.com/trufflesuite/truffle/tree/HEAD/packages/truffle). These dependencies need to be updated together.


Updates `semver` from 7.3.7 to 7.5.2
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.3.7...v7.5.2)

Updates `truffle` from 5.8.4 to 5.10.2
- [Release notes](https://github.com/trufflesuite/truffle/releases)
- [Commits](https://github.com/trufflesuite/truffle/commits/[email protected]/packages/truffle)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
- dependency-name: truffle
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…olkadot-evm#1110)

Bumps [semver](https://github.com/npm/node-semver) to 7.5.2 and updates ancestor dependency [truffle](https://github.com/trufflesuite/truffle/tree/HEAD/packages/truffle). These dependencies need to be updated together.


Updates `semver` from 7.3.7 to 7.5.2
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.3.7...v7.5.2)

Updates `truffle` from 5.6.7 to 5.10.2
- [Release notes](https://github.com/trufflesuite/truffle/releases)
- [Commits](https://github.com/trufflesuite/truffle/commits/[email protected]/packages/truffle)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
- dependency-name: truffle
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](npm/node-semver@v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Removes [tough-cookie](https://github.com/salesforce/tough-cookie). It's no longer used after updating ancestor dependency [web3](https://github.com/ChainSafe/web3.js). These dependencies need to be updated together.


Removes `tough-cookie`

Updates `web3` from 1.8.0 to 4.0.2
- [Release notes](https://github.com/ChainSafe/web3.js/releases)
- [Changelog](https://github.com/web3/web3.js/blob/4.x/CHANGELOG.md)
- [Commits](web3/web3.js@v1.8.0...v4.0.2)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
- dependency-name: web3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…adot-evm#1102)

Removes [tough-cookie](https://github.com/salesforce/tough-cookie). It's no longer used after updating ancestor dependency [web3](https://github.com/ChainSafe/web3.js). These dependencies need to be updated together.


Removes `tough-cookie`

Updates `web3` from 1.8.0 to 4.0.2
- [Release notes](https://github.com/ChainSafe/web3.js/releases)
- [Changelog](https://github.com/web3/web3.js/blob/4.x/CHANGELOG.md)
- [Commits](web3/web3.js@v1.8.0...v4.0.2)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
- dependency-name: web3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* check EIP-3607 at transaction validation

* fix rust compilation

* clippy
yjhmelody and others added 28 commits September 11, 2023 05:02
* fix: eth_syncing rpc

* impl

* fmt

* clippy
* Update eip-3026 gas meter

* Add mappint operation

* Remove TODOs

* Fix compile
* Rename

* Rename function param
* chore: enable clippy check for tests

* remove useless

* fix CI
…olkadot-evm#1165)

* deps: update substrate to c446786a498dee7b413de101efc3c339d3eddf44

* fix precompiles-utils-tests-external

* disable integration tests about pending api
…dot-evm#1195)

* fix: pending runtime api for pending state (polkadot-evm#1160)

* enable integration tests about pending api
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.104 to 1.0.106.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](serde-rs/json@v1.0.104...v1.0.106)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.183 to 1.0.188.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.183...v1.0.188)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.44 to 1.0.48.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.44...1.0.48)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…evm#1179)

Bumps [apollo-server-core](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server-core) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Commits](https://github.com/apollographql/apollo-server/commits/[email protected]/packages/apollo-server-core)

---
updated-dependencies:
- dependency-name: apollo-server-core
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [jsonrpsee](https://github.com/paritytech/jsonrpsee) from 0.16.2 to 0.16.3.
- [Release notes](https://github.com/paritytech/jsonrpsee/releases)
- [Changelog](https://github.com/paritytech/jsonrpsee/blob/v0.16.3/CHANGELOG.md)
- [Commits](paritytech/jsonrpsee@v0.16.2...v0.16.3)

---
updated-dependencies:
- dependency-name: jsonrpsee
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix: map_fp2_to_g2 input length check

* Add clear_cofactor to mapping operation
@gogosama-dev gogosama-dev changed the title Moonsama polkadot v1.1.0 Moonsama polkadot v1.1.0 (botched) Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.