Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

feat(service)!: add authorization service for mempool #320

Merged
merged 18 commits into from
Jun 24, 2020

Conversation

KaoImin
Copy link

@KaoImin KaoImin commented Jun 22, 2020

What type of PR is this?
feature

What this PR does / why we need it:
Add authorization service.
After adding the multi-signature service, the mempool will not be able to verify the signature of the transaction. Besides, there are some checking items that should be checked before inserting a transaction such as check the block list, check the account balance. This PR adds a service named authorization. Every check item except verification signature should be registered in genesis. The content in genesis is the name string of the service and the name string of the method. To be noticed that the payload type of the method must be protocol::types::SignedTransaction.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@muta-bot
Copy link

muta-bot bot commented Jun 22, 2020

Accept request.

@KaoImin KaoImin requested a review from LycrusHamster June 22, 2020 02:51
@LycrusHamster
Copy link
Contributor

register multisig in DefaultServiceMapping

@muta-bot
Copy link

muta-bot bot commented Jun 23, 2020

Accept request.

@muta-bot
Copy link

muta-bot bot commented Jun 23, 2020

Accept request.

@muta-bot
Copy link

muta-bot bot commented Jun 23, 2020

Accept request.

@muta-bot
Copy link

muta-bot bot commented Jun 23, 2020

Accept request.

homura pushed a commit to nervosnetwork/muta-sdk-js that referenced this pull request Jun 23, 2020
homura and others added 2 commits June 23, 2020 16:19
test: update muta sdk version for checking multi sig with mempool cha…
@muta-bot
Copy link

muta-bot bot commented Jun 23, 2020

Accept request.

@muta-bot
Copy link

muta-bot bot commented Jun 23, 2020

Accept request.

@muta-bot
Copy link

muta-bot bot commented Jun 23, 2020

Accept request.

@muta-bot
Copy link

muta-bot bot commented Jun 23, 2020

Accept request.

@muta-bot
Copy link

muta-bot bot commented Jun 24, 2020

Accept request.

@muta-bot
Copy link

muta-bot bot commented Jun 24, 2020

Accept request.

LycrusHamster
LycrusHamster previously approved these changes Jun 24, 2020
@LycrusHamster LycrusHamster dismissed their stale review June 24, 2020 07:37

find a spelling error

#[cycles(210_00)]
#[read]
fn check_authorization(&self, ctx: ServiceContext, payload: String) -> ServiceResponse<()> {
for (service_name, mathod_name) in self.verified_map.iter() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spelling error mathod -> method

@yejiayu yejiayu merged commit a3c3433 into nervosnetwork:master Jun 24, 2020
homura added a commit to nervosnetwork/muta-benchmark that referenced this pull request Jun 25, 2020
@KaoImin KaoImin deleted the mempool branch July 8, 2020 03:31
homura added a commit to nervosnetwork/muta-benchmark that referenced this pull request Sep 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants