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

Validate native token transfer raw tx and signature #788

Merged
merged 9 commits into from
Sep 1, 2022
Merged

Validate native token transfer raw tx and signature #788

merged 9 commits into from
Sep 1, 2022

Conversation

magicalne
Copy link
Contributor

@magicalne magicalne commented Aug 24, 2022

godwokenrises/godwoken-polyjuice#173

  • check to_id == polyjuice_creator_id
  • update verify_tx for native token transfer

@gw-bot

This comment was marked as outdated.

@magicalne magicalne requested review from jjyr, zeroqn and keroro520 August 24, 2022 07:11
@Flouse Flouse changed the title Validate native token transfer raw tx and signature. Validate native token transfer raw tx and signature Aug 24, 2022
@Flouse Flouse added the enhancement New feature or request label Aug 24, 2022
keroro520
keroro520 previously approved these changes Aug 25, 2022
crates/utils/src/polyjuice_parser.rs Show resolved Hide resolved
zeroqn
zeroqn previously approved these changes Aug 26, 2022
crates/generator/src/generator.rs Show resolved Hide resolved
crates/generator/src/verification/transaction.rs Outdated Show resolved Hide resolved
crates/generator/src/verification/transaction.rs Outdated Show resolved Hide resolved
@magicalne magicalne dismissed stale reviews from zeroqn and keroro520 via 6e6d0b2 August 29, 2022 09:32
@gw-bot
Copy link

gw-bot bot commented Aug 29, 2022

Running integration test

Workflow Run Id: 2947452850

Components:

Manually running integration test

Post a comment contains

/itest
[prebuilds: tag]
[godwoken: branch/ref]
[scripts: branch/ref]
[polyjuice: branch/ref]
[web3: branch/ref]
[kicker: branch/ref]
[tests: branch/ref]

Note: [] means optional, for example

/itest
prebuilds: dev-202203280240
godwoken: develop
scripts: 81676d9d53ffdf5bbaa60483928d07da16eb4a88
polyjuice: e37553b9

Run Result

failure

@gw-bot
Copy link

gw-bot bot commented Aug 29, 2022

Running integration test

Workflow Run Id: 2948110177

Components:

Manually running integration test

Post a comment contains

/itest
[prebuilds: tag]
[godwoken: branch/ref]
[scripts: branch/ref]
[polyjuice: branch/ref]
[web3: branch/ref]
[kicker: branch/ref]
[tests: branch/ref]

Note: [] means optional, for example

/itest
prebuilds: dev-202203280240
godwoken: develop
scripts: 81676d9d53ffdf5bbaa60483928d07da16eb4a88
polyjuice: e37553b9

Run Result

failure

@gw-bot
Copy link

gw-bot bot commented Aug 29, 2022

Running integration test

Workflow Run Id: 2948956547

Components:

Manually running integration test

Post a comment contains

/itest
[prebuilds: tag]
[godwoken: branch/ref]
[scripts: branch/ref]
[polyjuice: branch/ref]
[web3: branch/ref]
[kicker: branch/ref]
[tests: branch/ref]

Note: [] means optional, for example

/itest
prebuilds: dev-202203280240
godwoken: develop
scripts: 81676d9d53ffdf5bbaa60483928d07da16eb4a88
polyjuice: e37553b9

Run Result

failure

@gw-bot
Copy link

gw-bot bot commented Aug 29, 2022

Running integration test

Workflow Run Id: 2949507200

Components:

Manually running integration test

Post a comment contains

/itest
[prebuilds: tag]
[godwoken: branch/ref]
[scripts: branch/ref]
[polyjuice: branch/ref]
[web3: branch/ref]
[kicker: branch/ref]
[tests: branch/ref]

Note: [] means optional, for example

/itest
prebuilds: dev-202203280240
godwoken: develop
scripts: 81676d9d53ffdf5bbaa60483928d07da16eb4a88
polyjuice: e37553b9

Run Result

failure

@magicalne magicalne requested review from jjyr and keroro520 August 29, 2022 21:38
jjyr
jjyr previously approved these changes Aug 30, 2022
@jjyr
Copy link
Collaborator

jjyr commented Aug 30, 2022

/itest

@gw-bot
Copy link

gw-bot bot commented Aug 30, 2022

Running integration test

Workflow Run Id: 2953256642

Components:

Manually running integration test

Post a comment contains

/itest
[prebuilds: tag]
[godwoken: branch/ref]
[scripts: branch/ref]
[polyjuice: branch/ref]
[web3: branch/ref]
[kicker: branch/ref]
[tests: branch/ref]

Note: [] means optional, for example

/itest
prebuilds: dev-202203280240
godwoken: develop
scripts: 81676d9d53ffdf5bbaa60483928d07da16eb4a88
polyjuice: e37553b9

Run Result

failure

@gw-bot
Copy link

gw-bot bot commented Aug 30, 2022

Running integration test

Workflow Run Id: 2953676985

Components:

Manually running integration test

Post a comment contains

/itest
[prebuilds: tag]
[godwoken: branch/ref]
[scripts: branch/ref]
[polyjuice: branch/ref]
[web3: branch/ref]
[kicker: branch/ref]
[tests: branch/ref]

Note: [] means optional, for example

/itest
prebuilds: dev-202203280240
godwoken: develop
scripts: 81676d9d53ffdf5bbaa60483928d07da16eb4a88
polyjuice: e37553b9

Run Result

failure

@gw-bot
Copy link

gw-bot bot commented Aug 30, 2022

Running integration test

Workflow Run Id: 2955122287

Components:

Manually running integration test

Post a comment contains

/itest
[prebuilds: tag]
[godwoken: branch/ref]
[scripts: branch/ref]
[polyjuice: branch/ref]
[web3: branch/ref]
[kicker: branch/ref]
[tests: branch/ref]

Note: [] means optional, for example

/itest
prebuilds: dev-202203280240
godwoken: develop
scripts: 81676d9d53ffdf5bbaa60483928d07da16eb4a88
polyjuice: e37553b9

Run Result

failure

@gw-bot
Copy link

gw-bot bot commented Aug 30, 2022

Running integration test

Workflow Run Id: 2955495326

Components:

Manually running integration test

Post a comment contains

/itest
[prebuilds: tag]
[godwoken: branch/ref]
[scripts: branch/ref]
[polyjuice: branch/ref]
[web3: branch/ref]
[kicker: branch/ref]
[tests: branch/ref]

Note: [] means optional, for example

/itest
prebuilds: dev-202203280240
godwoken: develop
scripts: 81676d9d53ffdf5bbaa60483928d07da16eb4a88
polyjuice: e37553b9

Run Result

success

@magicalne magicalne requested a review from jjyr August 30, 2022 11:47
if p.is_native_transfer() {
// Verify to_id is CREATOR_ID
let to_id = raw_tx.to_id().unpack();
if Some(to_id) != self.polyjuice_creator_id && self.polyjuice_creator_id.is_some() {
Copy link
Contributor

Choose a reason for hiding this comment

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

if polyjuice_creator_id is None, this check will pass? Caller must ensure polyjuice_creator_id is Some?
Maybe pass beckend_manage and call utils::get_polyjuice_creator_id if polyjuice_creator_id is None?

crates/mem-pool/src/pool.rs Outdated Show resolved Hide resolved
@gw-bot
Copy link

gw-bot bot commented Aug 31, 2022

Running integration test

Workflow Run Id: 2962045709

Components:

Manually running integration test

Post a comment contains

/itest
[prebuilds: tag]
[godwoken: branch/ref]
[scripts: branch/ref]
[polyjuice: branch/ref]
[web3: branch/ref]
[kicker: branch/ref]
[tests: branch/ref]

Note: [] means optional, for example

/itest
prebuilds: dev-202203280240
godwoken: develop
scripts: 81676d9d53ffdf5bbaa60483928d07da16eb4a88
polyjuice: e37553b9

Run Result

failure

@gw-bot
Copy link

gw-bot bot commented Aug 31, 2022

Running integration test

Workflow Run Id: 2962338898

Components:

Manually running integration test

Post a comment contains

/itest
[prebuilds: tag]
[godwoken: branch/ref]
[scripts: branch/ref]
[polyjuice: branch/ref]
[web3: branch/ref]
[kicker: branch/ref]
[tests: branch/ref]

Note: [] means optional, for example

/itest
prebuilds: dev-202203280240
godwoken: develop
scripts: 81676d9d53ffdf5bbaa60483928d07da16eb4a88
polyjuice: e37553b9

Run Result

success

@gw-bot
Copy link

gw-bot bot commented Aug 31, 2022

Running integration test

Workflow Run Id: 2962477193

Components:

Manually running integration test

Post a comment contains

/itest
[prebuilds: tag]
[godwoken: branch/ref]
[scripts: branch/ref]
[polyjuice: branch/ref]
[web3: branch/ref]
[kicker: branch/ref]
[tests: branch/ref]

Note: [] means optional, for example

/itest
prebuilds: dev-202203280240
godwoken: develop
scripts: 81676d9d53ffdf5bbaa60483928d07da16eb4a88
polyjuice: e37553b9

Run Result

failure

@gw-bot
Copy link

gw-bot bot commented Aug 31, 2022

Running integration test

Workflow Run Id: 2962789508

Components:

Manually running integration test

Post a comment contains

/itest
[prebuilds: tag]
[godwoken: branch/ref]
[scripts: branch/ref]
[polyjuice: branch/ref]
[web3: branch/ref]
[kicker: branch/ref]
[tests: branch/ref]

Note: [] means optional, for example

/itest
prebuilds: dev-202203280240
godwoken: develop
scripts: 81676d9d53ffdf5bbaa60483928d07da16eb4a88
polyjuice: e37553b9

Run Result

success

@magicalne magicalne requested review from zeroqn and jjyr August 31, 2022 10:49
@gw-bot
Copy link

gw-bot bot commented Aug 31, 2022

Running integration test

Workflow Run Id: 2963297789

Components:

Manually running integration test

Post a comment contains

/itest
[prebuilds: tag]
[godwoken: branch/ref]
[scripts: branch/ref]
[polyjuice: branch/ref]
[web3: branch/ref]
[kicker: branch/ref]
[tests: branch/ref]

Note: [] means optional, for example

/itest
prebuilds: dev-202203280240
godwoken: develop
scripts: 81676d9d53ffdf5bbaa60483928d07da16eb4a88
polyjuice: e37553b9

Run Result

success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants