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

[pull] main from frequency-chain:main #24

Open
wants to merge 89 commits into
base: main
Choose a base branch
from

Conversation

pull[bot]
Copy link

@pull pull bot commented Jul 3, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

wilwade and others added 3 commits July 2, 2024 12:14
# Goal
The goal of this PR is to fix a typo of reusing the same funding source
for e2e tests

Also sorts the funding sources for easier reading.
# Goal
The goal of this PR is to enable `pallet_transaction_pallet` to withdraw
tx fee, this is needed as our extrinsic is `unsigned`, thereby does not
gets charged by default

Closes  #2029 
Creates #2051 

# Details
- [x] Refactor some common types from `frequency-tx-payment` to
`common-primitives`
- [x] Add a withdraw fee function to be called from Validate Unsigned to
charge for tx fee
- [x] Add unit test

# Discussion
<!-- List discussion items -->

# Checklist
- [ ] Chain spec updated
- [ ] Custom RPC OR Runtime API added/changed? Updated js/api-augment.
- [ ] Design doc(s) updated
- [x] Tests added
- [ ] Benchmarks added
- [ ] Weights updated
# Goal
The goal of this PR is check p256 Passkey signatures validations.

Closes #2036 


# Checklist
- [X] Chain spec updated
- [X] Tests added
- [X] Benchmarks updated
- [X] Weights updated
@pull pull bot added the ⤵️ pull label Jul 3, 2024
wilwade and others added 26 commits July 8, 2024 10:02
# Goal
The goal of this PR is to remove all references to the old Rococo Testnet.

Closes #1899

## How to test
Search for rococo, and find (almost) nothing! (Cargo lock will still
mention it for now)
… tx payment pallet (#2053)

Go after: #2047 

# Goal
The goal of this PR is to reduce redundancy in pre_dispatch and validate
by calling tx payment pallet underlying implementation

Closes #2051 

# Discussion
<!-- List discussion items -->

# Checklist
- [ ] Chain spec updated
- [ ] Custom RPC OR Runtime API added/changed? Updated js/api-augment.
- [ ] Design doc(s) updated
- [ ] Tests added
- [ ] Benchmarks added
- [ ] Weights updated
# Goal
The goal of this PR is <!-- insert goal here -->

Related to #2032 

# Discussion
- Checks the blocks limits
- The `post_dispatch` is not added to the extrinsic yet due to
constraint complications but it will be done a different PR related
ticket #2063

# Checklist
- [x] Chain spec updated
- [x] Tests added
- [x] Weights updated
# Goal
The goal of this PR is to incorporate more checks for passkey extrinsic
inline with other SignedExtras
- [x] Non Zero Sender Check
- [x] Spec Check
- [x] Tx version check
- [x] Era check
- [x] Genesis check

Closes #2031 

# Discussion
<!-- List discussion items -->

# Checklist
- [ ] Chain spec updated
- [ ] Custom RPC OR Runtime API added/changed? Updated js/api-augment.
- [ ] Design doc(s) updated
- [ ] Tests added
- [ ] Benchmarks added
- [ ] Weights updated
# Goal
The goal of this PR is to clean up tests and use Builder pattern to
setup the test

Related to #2032 


# Checklist
- [x] Tests Updated
# Goal
The goal of this PR is to add the Schemas in at Genesis from Mainnet
when on a development chain

Closes #2041

# Discussion
- Adds a tool `tools/genesis-schemas` that downloads the schemas from
mainnet and stuffs them into a json file
- GenesisConfig for Schemas Pallet that loads from a json file schemas
to start with at genesis

## How to Test
- You can test the pulling yourself with:
- `cd tools/genesis-data && npm i && npm run schemas` or use `make
genesis-schemas`
- Otherwise just run `make start` and see that it has the same schemas
as mainnet with the same names.

# Checklist
- [x] Tests added
- Upgrade Polkadot-sdk to v.1.7.0.
- Update weights to reflect the new version.

Notable Changes:
- [Allow custom error types in
Jsonrpsee](paritytech/polkadot-sdk#1313)

For more details, please refer to:

[Release
Notes](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.7.0)

#1870
# Goal
The goal of this PR is to re order the validations to be as close as
possible to the signed extension order considering the customizations
that we did such as not having post_dispatch implemented.

Related to #2032
# Goal
There was a misunderstanding before that we thought if the fee was
deducted from account in pre_dispatch and after that any failure happens
inside pre_dispatch, only post_dispatch would be able to refund that
amount but that was not a correct assumption and the caller of
pre_dispatch is going to reverse all storage changes in it does not
return with Ok. based on
`/// Changes made to storage *WILL* be persisted if the call returns
`Ok`.`

Knowing this, we could put the signature check as the final validation
since it is the heaviest one.

Related to #2071
# Goal
The goal of this PR is to calculate accurate weights for passkey pallet

Related to #2032

# Checklist
- [x] Weights updated

---------

Co-authored-by: aramikm <[email protected]>
# Goal
The goal of this PR is to add e2e tests for passkey pallet

Details
-  Added 3 Negative tests and One happy path test

Part of #2032 

# Checklist
- [ ] Chain spec updated
- [ ] Custom RPC OR Runtime API added/changed? Updated js/api-augment.
- [ ] Design doc(s) updated
- [x] Tests added
- [ ] Benchmarks added
- [ ] Weights updated

---------

Co-authored-by: Aramik <[email protected]>
…2091)

# Goal
The goal of this PR is to add a missing RPC to the documentation and
update the PR template checklist to be more helpful at catching this.

# Discussion

- Happy to make other changes to the PR template if any are suggested.
# Goal
The goal of this PR is to make various minor improvements to our release
content

Closes #1800

# Discussion
- [x] Add sections for `changes/breaking` and
`changes/storage-migration` labels
- [x] Remove deployment section from RC releases
- [x] Highlight the metadata changes
- [x] Update github actions
- [x] Corrected Polkadot-SDK Version code

Example Release:
https://github.com/frequency-chain/frequency/releases/tag/v0.0.1-rc6

## Test the release summary

- Compare it to mainnet polkadot:
- `docker run jacogr/polkadot-js-tools:0.57.1 metadata
wss://0.rpc.frequency.xyz wss://polkadot-rpc.publicnode.com >>
/tmp/metadata-compare-mainnet.txt`
- Run the summarizer
- `./tools/ci/scripts/extrinsic-ordering-filter.sh
/tmp/metadata-compare-mainnet.txt`
- Upgrade Polkadot-sdk to v.1.9.0.
- Update weights to reflect the new version.

Notable Changes:
- [System
Callbacks](paritytech/polkadot-sdk#1781)
- [Remove of pallet
pallet::getter](paritytech/polkadot-sdk#3456)
- [Add storage_proof_size host
function](paritytech/polkadot-sdk#3002)
- [Rename of storage version
function](https://github.com/paritytech/polkadot-sdk/pull/1554/files#diff-01dc4f43df9baa537f30c6b369525715d596a3068944f38458e9f160d5412d58R306)

For more details, please refer to:

[Release
Notes](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.9.0)
# Goal
The goal of this PR is whitelist Capacity pallet transactions for
passkey.

Closes  #2032

# Discussion
- I checked `TransactionPayment` pallet and there were no extrinsics on
that pallet so there were no reason to whitelist it
- I checked `FrequencyTxPayment` pallet and there were no token based
extrinsics as far as I checked so it was also not included.

# Checklist
- [X] Spec version incremented?
…2 to 5 (#2101)

Bumps
[mikepenz/release-changelog-builder-action](https://github.com/mikepenz/release-changelog-builder-action)
from 4.2.2 to 5.

Also fixes docs build on the release workflow

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wil Wade <[email protected]>
Add a new signed extension that enables the metadata hash verification
feature approved under [RFC
0078](https://polkadot-fellows.github.io/RFCs/approved/0078-merkleized-metadata.html#rfc-0078-merkleized-metadata).
This enhancement will support the new generic ledger hardware wallet app
and future hardware wallets within the Polkadot ecosystem.

[Reference
implementation](paritytech/polkadot-sdk#4580)
# Goal
The goal of this PR is to simplify the extrinsic filter for passkeys

Related to #2032
- Upgrade Polkadot-sdk 1.9.0 to 1.10.0
- Update weights to reflect the new version.

Notable Changes:
- [Remove experimental
flag](https://github.com/paritytech/polkadot-sdk/pull/3654/files)
- [Remove pallet::getter
macro](paritytech/polkadot-sdk#3350)
- [Refactor
APIs](https://github.com/paritytech/polkadot-sdk/pull/3817/files#diff-b02373af4015a8ebdf3a3f5be9ea0ce555b6e45331872e0465fd2f488177d383)
- [Refactor Unified Host
Functions](paritytech/polkadot-sdk#3854)
- [StorageWeightReclaim
SignedExtension](https://github.com/paritytech/polkadot-sdk/pull/3002/files)

For more details, please refer to:

[Release
Notes](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.10.0)

#1928

---------

Co-authored-by: enddynayn <[email protected]>
# Goal
The goal of this PR is to update per regular the js dependencies of Api
Augment and the e2e tests

# Discussion

- Updates to `@polkadot/api` `v12.2.3` (and related packages)
- Moves to eslint 9
- Other basic package updates
# Goal
The goal of this PR is to fix cargo deny config for the changes in v0.16

- Updated two yanked crates
- Updated config patterns, but not altered the results (new defaults and
config setup)
# Goal
The goal of this PR is to remove `getter` function for storage items.

Closes #2105
…0.pre.rc01 to 5 (#2116)

Bumps
[mikepenz/release-changelog-builder-action](https://github.com/mikepenz/release-changelog-builder-action)
from 5.0.0.pre.rc01 to 5.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
wilwade and others added 30 commits October 21, 2024 13:39
# Goal
The goal of this PR is to update API Augment to use the newer metadata
v15 provided with Polkadotjs/api v 14.1.1

Part of #2154 

# Discussion

- Updated the Export Metadata Cmd to use Metadata v15
- Update the fetch:local to use Metadata v15
- Fixed a test that doesn't work under all situations (description is
not always returned on all networks)
- Setup e2e testnet workflow to run on the provided branch instead of
against the release branch so that other test setups can test against
testnet

## Testing

- `make js`
- `/target/debug/frequency export-metadata --tmp
./js/api-augment/metadata.json && cd js/api-augment && npm run build`
# Goal
The goal of this PR is to add a final set of e2e test improvements to
allow e2e tests to run against testnet again post async-backing

Closes #2154 

# Discussion

- Added a way to wait for finalization
- Added errors instead of waiting forever for blocks
- Reduced timeouts thanks to 6s blocktimes on testnet
- Split up more tests for better parallelization

# Testing

-
https://github.com/frequency-chain/frequency/actions/runs/11489493946/job/31978401849
# Goal
The goal of this PR is to enable Passkey pallet features on Mainnet

Closes #2197 

# Discussion


# Checklist
- [x] Spec version incremented?
# Goal
The goal of this PR is to enable benchmark side of the passkey pallet

Related to #2197


# Checklist
- [x] Spec version incremented?

---------

Co-authored-by: aramikm <[email protected]>
# Goal
The goal of this PR is to make sure that Metadata v15 has the correct
Runtime API call data

Closes #2202 

# Discussion

Why? I cannot be 100% sure. See the linked issues in #2202 for more
details.

From what I can tell, the way rust macros work with context means that
this macro is stuck being in the same file as the const that uses it is
`pub const VERSION`

# Specifics

- Updated Polkadot js API
- Fixed issue with the runtime APIs and the call in
`e2e/capacity/capacity_rpc.test.ts`. Issue noted in code comment
- Moved the runtime apis back into the runtime lib.rs
- Removed the manual definitions of runtimeApis 🎉 

## Testing

- `make start` && `subxt metadata --version 15 -f json | jq
.[1].V15.apis` (Before this result would have been empty, now you have
the runtime data!)
# Goal
Implement a Provider Boost feature, whereby token holders may support
the network and a specific Provider by means of a custom staking model.
Token holders lock up a certain amount of token, and receive a return in
Frequency token for this support. The token holder chooses a Provider to
receive some Capacity, which the Provider may use to pay for chain
transactions.

Token holders may still stake for `MaximizedCapacity` and receive no
token return. As before, the entire benefit for staking would go to the
targeted Provider for this type.

#### For more details, please see the [Capacity Staking Rewards
Implementation](designdocs/capacity_staking_rewards_implementation.md)
design doc, which links to the economic model for this feature.
---------

Co-authored-by: Wil Wade <[email protected]>
Co-authored-by: Puneet Saraswat <[email protected]>
Co-authored-by: Aramik <[email protected]>
Co-authored-by: Matthew Orris <[email protected]>
Co-authored-by: Wil Wade <[email protected]>
# Goal
The goal of this PR is regular updates of GitHub Actions and JS
packages.

All GH Actions were checked and added to the allowlist
# Goal
The goal of this PR is to put in the final constant values for Provider Boosting for mainnet
Closes #2201
# Goal
The goal of this PR is fix broken link.

Closes N/A

# Discussion

# Checklist
- [x] Updated Pallet Readme?
- [ ] Updated js/api-augment for Custom RPC APIs?
- [ ] Design doc(s) updated?
- [ ] Unit Tests added?
- [ ] e2e Tests added?
- [ ] Benchmarks added?
- [ ] Spec version incremented?

Co-authored-by: Wil Wade <[email protected]>
# Goal
The goal of this PR is to update JS dependencies

Closes #2220 

# Checklist
- [x] Updated js/api-augment for Custom RPC APIs?
- [X] updated e2e dependencies

# Verification
- ran the e2e tests and everything passed
# Goal
The goal of this PR is to allow sending transactions using ethereum
signatures and ethereum addresses

Closes #2206 

# Changes
- Replaced `MultiSignature` with `UnifiedSignature` in the runtime which
supports ethereum signatures for ecdsa
- Replaced `AccountIdLookup` with `EthereumCompatibleAccountIdLookup` in
runtime which support 20 bytes accounts in MultiAddress
- Showing runtime logs for `start-frequency-instant` mode (this would be
helpful in debugging)

# Warning
- For e2e test we should use `getUnifiedAddress(keyPair)` function
instead of `keypair.address` directly. Thisb would ensure we are using
correct ethereum address for ethereum keys.


# Checklist
- [x] Updated js/api-augment for Custom RPC APIs?
- [x] Unit Tests added?
- [x] e2e Tests added?
- [x] Spec version incremented?
# Goal
The goal of this PR is create a new js package for schema name and ID
mappings

Closes #2176 

# Discussion
- This only generates data for `dsnp` schemas from chain. The issue is
that currently there is no easy way to get all schema names without
providing namespaces. We can get all using raw state but then we would
need to scale decode it.

---------

Co-authored-by: Joe Caputo <[email protected]>
# Goal
The goal of this PR is <!-- insert goal here -->

Closes #2203 

# Discussion
- added e2e tests for more usecase for ethereum keys
- Some clean up and refactoring
- Added eslint rules to enforce correct usage

# Checklist
- [X] e2e Tests added?
# Goal
The goal of this PR is <!-- insert goal here -->

Closes #2227

# Details
- The mainnet will be migrated as all other migrations since it is small
enough that would easily fit into a block via
```rust
pallet_stateful_storage::migration::v1::MigrateToV1<Runtime>
```
- For testnet we will use the same path as block just to mark the
```rust
Pallet::<T>::on_chain_storage_version();
```
but the actual multi-block migration is using `on_initialize` hook and a
new storage item called `MigrationPageIndex` that would store the
progress.

# Verification
- There are issues with try-runtime that doesn't allow me to run it
against mainnet or testnet. Added some tests to verify the changes.

# Checklist
- [x] Unit Tests added?
- [x] Spec version incremented?
# Goal
The goal of this PR is to error out when stake is more than available
stakable balance

Closes  #1994  

# Discussion

- <!-- List discussion items -->

# Checklist
- [ ] Updated Pallet Readme?
- [ ] Updated js/api-augment for Custom RPC APIs?
- [ ] Design doc(s) updated?
- [ ] Unit Tests added?
- [ ] e2e Tests added?
- [ ] Benchmarks added?
- [x] Spec version incremented?
Verify timestamps against relay chain slot numbers via `OnTimestampSet`.

Closes  #2219 

# Discussion

Solution proposed in story above

# Checklist
- [ ] Updated Pallet Readme?
- [ ] Updated js/api-augment for Custom RPC APIs?
- [ ] Design doc(s) updated?
- [ ] Unit Tests added?
- [ ] e2e Tests added?
- [ ] Benchmarks added?
- [x] Spec version incremented?
# Goal

The goal of this PR is regular updates of the `package.json` for
published packages and e2e tests.
# Goal
The goal of this PR is to fix an issue noticed with the v1.15.1 release
around JS packages.

1. The step `is-full-release` wasn't there, but GitHub was happily
resolving the if conditions that tried to use it.
2. NPM changed the tag default, so `latest` was working for
`api-augment` even when it shouldn't have been.

For the v1.15.1 runs see:
-
https://github.com/frequency-chain/frequency/actions/runs/12129502202/job/33851319975
-
https://github.com/frequency-chain/frequency/actions/runs/12129502202/job/33851321973
# Goal
The goal of this PR is to make it easier to run the e2e tests against
testnet

- Use filename based fund sourcing
- e2e Testnet CI runs by fanning out for every test file
# Goal

The muti-block migration did not work as expected. It looks like the
code inside `on_initialize` did not get executed. I'm out of theories
why that would happen but there might be something related to the
feature flags. This is another attempt that replaces feature flag
attempt with the genesis hash.

# Changes
- replaced feature flags with genesis hash checks
- Added tighter checks `on_initialize` (for better readability)

# Discussions
If anyone have a theory why the code inside `on_initialize` didn't get
executed on paseo please contact me.

Closes #2227

# Checklist
- [X] Spec version incremented?
# Goal
The goal of this PR is to remove extra migrations

Related to #2227 

# Discussion
- keeping the `MigrationPageIndex` storage around for future use.
Removing it requires another migration which is not justified currently.

# Checklist
- [x] Spec version incremented?
# Goal
The goal of this PR is to shift the `accountOwnershipProof` out of the
signature payload. For reasons why, see #2241

with @aramikm 


Closes #2241 

# Discussion

- Added `proxy_v2`
- Deprecated `proxy`
- Duplicated tests, as eventually we'll remove v1

---------

Co-authored-by: Aramik <[email protected]>
# Goal
The goal of this PR is to update reference from Rococo to Paseo in the
readme image.
# Goal
The goal of this PR is to remove some undesirable characters from the
handle allowed list and create new RPCs to make testing handles (and the
edge cases) easier

Closes #2237

# Discussion

- Removing some punctuation only characters from the allowed list
- Added a new `check_handle` RPC so that it is easier to check the
canonical value along with validity and if there are suffixes remaining

# Checklist
- [x] Updated js/api-augment for Custom RPC APIs?
- [x] Unit Tests added?
- [x] e2e Tests added?
- [x] Spec version incremented?
…#2246)

# Goal
The goal of this PR is to make the e2e tests for the passkey pallet a
bit more discerning, and more clear to read.
Previously, the tests were determining a successful token transfer by
the absence of an exception and an increased nonce. While this is
technically correct, according to the logic by which the extrinsic call
would complete with no exceptions, it is a bit opaque.

This PR enhances the test conditions to check that:
* The appropriate events are generated in the block, and the event
contents are correct
* The correct reciever's balance is incremented by the transfer amount
* The correct sender's balance is decremented by the transfer amount +
fee
* Failure tests are enhance to check the specific error that caused the
failure

Test conditions for the success cases are also enhanced so that
successful tests are more verbose, as each check is encapsulated in a
separate test block.

Also, the function `Extrinsic.sendUnsigned()` was fixed to properly
parse and return the event stream from the blockchain, in the same
manner that `Extrinsic.signAndSend()` does.

# Checklist
- [ ] Updated Pallet Readme?
- [ ] Updated js/api-augment for Custom RPC APIs?
- [ ] Design doc(s) updated?
- [ ] Unit Tests added?
- [ ] e2e Tests added?
- [ ] Benchmarks added?
- [ ] Spec version incremented?
# Goal
The goal of this PR is to make sure the hash calculation for eip-191 is
compatible with JS libraries.

Closes #2247 

# Discussion
- Changed eip-191 message hash calculation to match js implementation in
popular Ethereum libraries

# Checklist
- [X] Unit Tests added?
- [X] Spec version incremented?
# Goal
The goal of this PR is regular updates to the JS packages

# Discussion

- The metadata comparison has also been broken and the most recent
updates required us to use the dev version instead of the mainnet
version
- Updated:
    - API-Augment
    - Schemas
    - E2E Tests
    - Tools
    - Metadata comparison in release
# Goal
The goal of this PR is to fix metadata comparison in the release
process.

# Discussion

- Had to tweak some of the values to get it all to work. Working here:
- https://github.com/frequency-chain/frequency/actions/runs/12639367825
  - https://github.com/frequency-chain/frequency/releases/tag/v0.0.1-rc6
# Goal
The goal of this PR is update js dependencies (again) and make it easier
to do in the future

# Discussion

- Added a basic script that just does it all
…2 to 5.1.0 (#2254)

Bumps
[mikepenz/release-changelog-builder-action](https://github.com/mikepenz/release-changelog-builder-action)
from 4.2.2 to 5.1.0.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants