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

[feature] #2161: Handle id and shared FFI fns #2274

Merged
merged 4 commits into from
Jun 1, 2022

Conversation

mversic
Copy link
Contributor

@mversic mversic commented May 26, 2022

Description of the Change

I've extracted some of the work which comprises a full feature:

  • implement Handle for every opaque pointer handle
  • generate implementations of shared FFI functions

Issue

Relates to #2161

Benefits

Possible Drawbacks

Usage Examples or Tests [optional]

Alternate Designs [optional]

@mversic mversic changed the title [feature]: #0000 Handle id and shared FFI fns [feature] #0000: Handle id and shared FFI fns May 26, 2022
@mversic mversic changed the base branch from main to iroha2-dev May 26, 2022 22:15
@mversic mversic changed the title [feature] #0000: Handle id and shared FFI fns [feature] #2161: Handle id and shared FFI fns May 26, 2022
ffi/src/lib.rs Outdated Show resolved Hide resolved
@mversic mversic marked this pull request as ready for review May 26, 2022 22:30
@codecov
Copy link

codecov bot commented May 26, 2022

Codecov Report

Merging #2274 (2f630c3) into iroha2-dev (5ddb17c) will increase coverage by 0.81%.
The diff coverage is 67.17%.

@@              Coverage Diff               @@
##           iroha2-dev    #2274      +/-   ##
==============================================
+ Coverage       64.67%   65.49%   +0.81%     
==============================================
  Files             131      133       +2     
  Lines           24666    24693      +27     
==============================================
+ Hits            15953    16172     +219     
+ Misses           8713     8521     -192     
Impacted Files Coverage Δ
config/src/lib.rs 14.28% <0.00%> (ø)
core/src/smartcontracts/isi/account.rs 12.30% <0.00%> (ø)
core/src/smartcontracts/isi/domain.rs 39.82% <0.00%> (+0.69%) ⬆️
core/src/smartcontracts/isi/triggers.rs 0.00% <ø> (ø)
core/src/smartcontracts/isi/world.rs 9.09% <0.00%> (ø)
data_model/src/asset.rs 51.46% <0.00%> (-0.42%) ⬇️
data_model/src/block_value.rs 57.14% <ø> (+17.14%) ⬆️
data_model/src/domain.rs 77.77% <0.00%> (ø)
data_model/src/trigger/set.rs 33.21% <0.00%> (ø)
ffi/src/lib.rs 2.98% <0.00%> (-63.69%) ⬇️
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3671e02...2f630c3. Read the comment docs.

@mversic mversic force-pushed the handle_id_common_fns branch 2 times, most recently from 6ed472f to 6e2db8f Compare May 27, 2022 08:03
@appetrosyan appetrosyan added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label May 27, 2022
data_model/src/expression.rs Show resolved Hide resolved
data_model/src/lib.rs Show resolved Hide resolved
appetrosyan
appetrosyan previously approved these changes May 31, 2022
ffi/src/lib.rs Outdated Show resolved Hide resolved
ffi/tests/gen_shared_fns.rs Show resolved Hide resolved
appetrosyan
appetrosyan previously approved these changes Jun 1, 2022
@mversic mversic force-pushed the handle_id_common_fns branch 2 times, most recently from 344b192 to d8daf7d Compare June 1, 2022 07:35
@mversic mversic requested a review from ilchu as a code owner June 1, 2022 07:35
@mversic mversic requested a review from appetrosyan June 1, 2022 07:42
appetrosyan
appetrosyan previously approved these changes Jun 1, 2022
…Eq,Ord

Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
data_model/src/lib.rs Show resolved Hide resolved
ffi/src/lib.rs Show resolved Hide resolved
ffi/derive/src/bindgen.rs Show resolved Hide resolved
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
@mversic mversic merged commit efa9a35 into hyperledger:iroha2-dev Jun 1, 2022
BAStos525 pushed a commit to BAStos525/soramitsu-iroha that referenced this pull request Jul 8, 2022
…#2274)

* add handle id and implement FFI equivalents of shared traits - Clone,Eq,Ord

Signed-off-by: Marin Veršić <marin.versic101@gmail.com>

* add tests for generated shared ffi functions

Signed-off-by: Marin Veršić <marin.versic101@gmail.com>

* move Handle trait definition from ffi into crate deriving handles!

Signed-off-by: Marin Veršić <marin.versic101@gmail.com>

* remove Ord noise

Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: BAStos525 <jungle.vas@yandex.ru>
@mversic mversic deleted the handle_id_common_fns branch December 27, 2022 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants