Skip to content

Fix CallNative#2144

Merged
erikzhang merged 2 commits intomasterfrom
fixes/native-flag
Dec 12, 2020
Merged

Fix CallNative#2144
erikzhang merged 2 commits intomasterfrom
fixes/native-flag

Conversation

@erikzhang
Copy link
Member

Fix #2142

@erikzhang
Copy link
Member Author

@AnnaShaleva

@roman-khimov
Copy link
Contributor

Don't we actually want to make flags CallFlags.ReadStates | CallFlags.AllowCall in VerifyWitness? Contracts can do calls to other contracts in their verification methods. And security-wise disabling calls (unsetting AllowCall) should disable calls to native contracts too, so we better have AllowCall in System_Contract_CallNative descriptor.

@erikzhang
Copy link
Member Author

And security-wise disabling calls (unsetting AllowCall) should disable calls to native contracts too

Calls to native contracts need to execute System.Contract.Call, which requires AllowCall flag.

@erikzhang erikzhang merged commit eb63d30 into master Dec 12, 2020
@erikzhang erikzhang deleted the fixes/native-flag branch December 12, 2020 12:17
roman-khimov added a commit to nspcc-dev/neo-go that referenced this pull request Dec 13, 2020
Follow neo-project/neo#2144. System.Contract.CallNative already has "None"
flag, so tests work fine.
roman-khimov added a commit to nspcc-dev/neo-go that referenced this pull request Dec 14, 2020
Follow neo-project/neo#2144. System.Contract.CallNative already has "None"
flag, so tests work fine.
roman-khimov added a commit to nspcc-dev/neo-go that referenced this pull request Dec 14, 2020
Follow neo-project/neo#2144. System.Contract.CallNative already has "None"
flag, so tests work fine.
roman-khimov added a commit to nspcc-dev/neo-go that referenced this pull request Dec 14, 2020
Follow neo-project/neo#2144. System.Contract.CallNative already has "None"
flag, so tests work fine.
ShawnYun pushed a commit to ShawnYun/neo that referenced this pull request Jan 8, 2021
cloud8little pushed a commit to cloud8little/neo that referenced this pull request Jan 24, 2021
ixje added a commit to CityOfZion/neo-mamba that referenced this pull request Feb 3, 2021
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.

Add AllowCall call flag to VerifyWitness for native contracts

3 participants