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

Update node to latest version #4

Merged
merged 18 commits into from
Jan 9, 2024
Merged

Conversation

xermicus
Copy link
Contributor

@xermicus xermicus commented Jan 8, 2024

No description provided.

ascjones and others added 18 commits July 26, 2023 14:53
Updates lockfile to point to `polkadot-1.0.0` HEAD, to include the
enabling of `sign_ext`
Sync with `polkadot-v1.0.0` in order to include
paritytech/substrate#14642.

Fixes #200
Use all substrate/polkadot-sdk dependencies from crates.io, remove
`pallet-asset-chain-extension` so we can release this to crates.io. See
#203
Closes #203. This will be the first release to crates.io:

- Use crates.io dependencies, remove chain extension #204
Using a workflow to trigger mirroring instead of a webhook allows us to
reuse "Approving workflow runs from public forks" GitHub feature to
somewhat protect us from malicious PRs
This PR update the current code to use the parachain-template-code.
The template code has been modified to allow continued use of a solo
node, preserving existing behaviors by default.

when launched using the --chain "contracts-parachain-local", it will now
starts a parachain instead.
The first attept to use a workflow to protect GitLab CI from untrusted
contributors failed, because GitHub doesn't pass secrets to workflows
for PRs that originate from forks.
 
This uses a different approach: instead of triggerring gitspiegel API
directly from the workflow, we're just spawning an empty workflow with a
specific path, and gitspiegel listens for `workflow_run` event to start
mirroring.

The idea is the same: for the first-time contributors, running workflows
would require manual aciton and that would block mirroring. But this
time, we don't need any secrets to make it work.
Add back the version here this is required for deployment
It has been reported an issue
(use-ink/ink#1985) that weight_to_fee
always returns zero in end-to-end tests.
This pull request adds `type FeeMultiplierUpdate =
SlowAdjustingFeeUpdate<Self>` to make it work.
Adds `--finalize-delay-sec` cli argument, based on the great work by
@shunsukew at inkdevhub/swanky-node#61.

Manual testing by starting node with/without option, along with example
contract upload:
```shell
# build example contract
cargo contract build --manifest-path=../ink-examples/erc20/Cargo.toml

# start node
cargo run

# upload contract
cargo contract upload --suri //Alice --execute --manifest-path=../ink-examples/erc20/Cargo.toml
# check finalized head remains at genesis
sleep 1
test $(curl -sH "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "chainHead_unstable_genesisHash", "params":[]}' http://localhost:9944 | jq .result) \
  = $(curl -sH "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "chain_getFinalizedHead", "params":[]}' http://localhost:9944 | jq .result) && echo PASS || echo FAIL


# start node (with delayed finalization)
cargo run -- --finalize-delay-sec 1

# upload contract
cargo contract upload --suri //Alice --execute --manifest-path=../ink-examples/erc20/Cargo.toml
# check finalized head matches chain head
sleep 1
test $(curl -sH "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "chain_getHead", "params":[]}' http://localhost:9944 | jq .result) \
  = $(curl -sH "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "chain_getFinalizedHead", "params":[]}' http://localhost:9944 | jq .result) && echo PASS || echo FAIL

```

Closes #160
Signed-off-by: Cyrill Leutwiler <[email protected]>
@xermicus xermicus merged commit 735f840 into substrate-integration Jan 9, 2024
1 of 2 checks passed
@xermicus xermicus deleted the update-node branch March 26, 2024 16:30
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.

7 participants