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

feat: relayer function call keys #792

Merged
merged 10 commits into from
Jul 18, 2023
Merged

Conversation

aleksuss
Copy link
Member

Description

The PR adds new types of transactions for adding and removing functional keys used by our relayer.

High-level requirements:

  • The keys could be added/removed by a specific account with access granted by the owner.
  • The list of allowing functions to invoke: submit, submit_with_args, call.
  • The added key can call the contract via which the key has been added ( receiver_id == io.current_id() on step 1 ).
  • The key has allowance equals attached NEAR on the adding stage.
  • The key should be verified at the removal stage to correspond to the 2 and 3 requirements.

Performance / NEAR gas cost considerations

There are no changes in performance.

Testing

Added integration tests.

Additional information

!!! The base branch should be changed to develop after merging #777 !!!

Also, these changes along with changes from #779 require updating borealis-engine.
cc @mandreyel.

Base automatically changed from chore/aleksuss/tests_refactoring to develop July 17, 2023 12:18
# Conflicts:
#	Cargo.lock
#	engine-tests/src/utils/standalone/mod.rs
#	engine-workspace/src/account.rs
#	engine-workspace/src/contract.rs
#	engine-workspace/src/lib.rs
#	engine-workspace/src/node.rs
#	engine-workspace/src/operation.rs
#	etc/xcc-router/Cargo.lock
engine-tests/src/tests/sanity.rs Show resolved Hide resolved
engine-sdk/src/near_runtime.rs Show resolved Hide resolved
engine-types/src/parameters/engine.rs Show resolved Hide resolved
engine-types/src/public_key.rs Show resolved Hide resolved
engine/src/engine.rs Outdated Show resolved Hide resolved
engine/src/errors.rs Outdated Show resolved Hide resolved
engine/src/lib.rs Show resolved Hide resolved
engine-types/src/parameters/engine.rs Show resolved Hide resolved
engine-workspace/src/account.rs Show resolved Hide resolved
@joshuajbouw joshuajbouw added this pull request to the merge queue Jul 18, 2023
Merged via the queue into develop with commit e24556a Jul 18, 2023
20 checks passed
@joshuajbouw joshuajbouw deleted the feat/aleksuss/key_manager branch July 18, 2023 21:04
joshuajbouw added a commit that referenced this pull request Jul 21, 2023
The PR adds new types of transactions for adding and removing functional
keys used by our relayer.

High-level requirements:

- The keys could be added/removed by a specific account with access
granted by the owner.
- The list of allowing functions to invoke: `submit`,
`submit_with_args`, `call`.
- The added key can call the contract via which the key has been added (
receiver_id == io.current_id() on step 1 ).
- The key has allowance equals attached NEAR on the adding stage.
- The key should be verified at the removal stage to correspond to the 2
and 3 requirements.

There are no changes in performance.

Added integration tests.

!!! **The base branch should be changed to `develop` after merging

Also, these changes along with changes from #779 require updating
borealis-engine.
cc @mandreyel.
@joshuajbouw joshuajbouw mentioned this pull request Jul 21, 2023
joshuajbouw added a commit that referenced this pull request Jul 21, 2023
The PR adds new types of transactions for adding and removing functional
keys used by our relayer.

High-level requirements:

- The keys could be added/removed by a specific account with access
granted by the owner.
- The list of allowing functions to invoke: `submit`,
`submit_with_args`, `call`.
- The added key can call the contract via which the key has been added (
receiver_id == io.current_id() on step 1 ).
- The key has allowance equals attached NEAR on the adding stage.
- The key should be verified at the removal stage to correspond to the 2
and 3 requirements.

There are no changes in performance.

Added integration tests.

!!! **The base branch should be changed to `develop` after merging

Also, these changes along with changes from #779 require updating
borealis-engine.
cc @mandreyel.
joshuajbouw added a commit that referenced this pull request Jul 21, 2023
The PR adds new types of transactions for adding and removing functional
keys used by our relayer.

High-level requirements:

- The keys could be added/removed by a specific account with access
granted by the owner.
- The list of allowing functions to invoke: `submit`,
`submit_with_args`, `call`.
- The added key can call the contract via which the key has been added (
receiver_id == io.current_id() on step 1 ).
- The key has allowance equals attached NEAR on the adding stage.
- The key should be verified at the removal stage to correspond to the 2
and 3 requirements.

There are no changes in performance.

Added integration tests.

!!! **The base branch should be changed to `develop` after merging

Also, these changes along with changes from #779 require updating
borealis-engine.
cc @mandreyel.
joshuajbouw pushed a commit that referenced this pull request Jul 24, 2023
joshuajbouw added a commit that referenced this pull request Jul 24, 2023
### Changes

- Enabled Shanghai Ethereum hard fork support by @mandreyel. #773
- Added ability to pause and resume the core functionality of the
contract by @Casuso. #779
- Added function call keys to be used with relayers by @aleksuss. #792

---------

Co-authored-by: mandreyel <mandreyel@aurora.dev>
Co-authored-by: Oleksandr Anyshchenko <oleksandr.anyshchenko@aurora.dev>
Co-authored-by: Leandro Casuso Montero <leandro.montero@aurora.dev>
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.

None yet

4 participants