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

build: partial revert dash#4311 (add libgmp detection, make immer a package) #4911

Merged
merged 5 commits into from
Dec 5, 2022

Conversation

kwvg
Copy link
Collaborator

@kwvg kwvg commented Jul 8, 2022

Additional Notes

Dash's build system currently possesses a limitation where you cannot build it without the in-tree depends directory. Back when that pull request was made, we were exclusively using the build system used by Bitcoin (GNU Autotools) and were fine with the additional constraint as there was only a singular build system and a sole direction for support.

Unfortunately, if we need to support systems like CMake (for better IDE support) and MSVC (downstreaming from Core for native builds instead of cross-compiles), we need to remove the depends lock-in as maintaining the particular -isms of those respective build systems within depends will prove to be more taxing than beneficial, hence necessitating the move to the source tree

@knst
Copy link
Collaborator

knst commented Jul 12, 2022

I think you need to add a comment to doc/developer-notes.md about current address of repo immer and the current version to make further upgrades of library easier.

@kwvg kwvg requested review from UdjinM6 and PastaPastaPasta July 18, 2022 09:04
@kwvg
Copy link
Collaborator Author

kwvg commented Jul 28, 2022

@PastaPastaPasta @UdjinM6

@kwvg
Copy link
Collaborator Author

kwvg commented Aug 2, 2022

@PastaPastaPasta

dash@24fd31a8d0d6:/dash-src$ find src/immer -name "*.c*" -o -name "*.h*" -exec sha256sum {} \;
4b259e1f6dd0e1c9fdf6dd1a2387570fe51c1fbc022340a50c72f50a04ee1dff  src/immer/algorithm.hpp
a68b08e7f113a5629bcb2941a80721ad54953e217531afa857697f9c0d58e6cf  src/immer/array.hpp
50f13f2af97efacec6a186d68e94a64b4e670db12493995701ff01c6e8e742d1  src/immer/array_transient.hpp
22ef9ca159b28aed2e51d5bebcf9fc3495f3502f37d9a9cbdb40fb8e006260c3  src/immer/atom.hpp
0e8c1fb4455a7cb9bdc003b71b65fa60c51d7330d89ec5d03519923ed5f6cbe2  src/immer/box.hpp
cd314c4aec25a0827f01570e8200839e68da79e41baf1c84f651aad22440df74  src/immer/config.hpp
e6f523cfae5f981a25ef8ace8ce6ad8bf6b138ff2c8be6febcd800ca669769dc  src/immer/detail/arrays/node.hpp
fb76eee555bb326f8cb52ac7a9f85aa4d0a34dbe6a195327277735128abcc84d  src/immer/detail/arrays/no_capacity.hpp
827ebcc6da9fe78f123a108cb408b3ca2eeccb73c6567413778e30956237a0c6  src/immer/detail/arrays/with_capacity.hpp
6eb47deb82cdbdc88c7c849629ad413519aea5bb7955fcce1afb9394fde14308  src/immer/detail/combine_standard_layout.hpp
eab892057d18e5070b9c4a4fdc8cd7ead9f3921a32e6c87616c96da46d0581ab  src/immer/detail/hamts/bits.hpp
6e7df0206900f44eb314061d8c0b65d1e4aea6199b950b9d9f30e9c561b71df5  src/immer/detail/hamts/champ.hpp
4b80585f8caa9ed5aa31f72df15bc2f48b4e4e650f91d50ece98b7a7bcaba4a6  src/immer/detail/hamts/champ_iterator.hpp
5680965de5de89200633f8370bf9cd9d344385454b91aff154e1ef319336b05e  src/immer/detail/hamts/node.hpp
c5d39472ea5c0b7303b5b49346678ec4e7c170872e0dfba85870159c551eb302  src/immer/detail/iterator_facade.hpp
b9fb30bf30692158d4d29468e79c1600c8f2a7ac1b14c987b86edbcceec860c7  src/immer/detail/rbts/bits.hpp
c04cd0d2b3b44746c4629232b73e56f1e4404c047ead143bcb4f3862967f92f0  src/immer/detail/rbts/node.hpp
8bed5108caf9c6e492304dd09dadaab19ce40304c1563479cc71ddee302acb7d  src/immer/detail/rbts/operations.hpp
42e2f3c4e4f591c602a7509b994270e0b5c9bb36bf0d10a45c7fd00e7b8ddc16  src/immer/detail/rbts/position.hpp
b5323a73e8fae0f66ebdfdb0284b2b5479194690d33285b64993ad00227ed87a  src/immer/detail/rbts/rbtree.hpp
2871f890d23d86605cefeab840216b1fae1dcfa39f0dedfc69fc1bf9e1f60236  src/immer/detail/rbts/rbtree_iterator.hpp
5b0226fe46a9f8e3d0fe44bc70319241721fc0a2b1b52ff92e1ea11fc96a2f89  src/immer/detail/rbts/rrbtree.hpp
e7e350585386d236d1e4153463aec8ee2340ba18d7607785c120534248829f55  src/immer/detail/rbts/rrbtree_iterator.hpp
d7a0c15e3b06e3f0acba8f8ff8337d248f8ef25063f4a6ceb3017ef3c156b2fe  src/immer/detail/rbts/visitor.hpp
a51025dc8467c66febe422d6e842f5a2ae9358cafe705d9c78ec5c8472fa9933  src/immer/detail/ref_count_base.hpp
410f5e51a1691904f078be255d71b833b273b773f19c705a1e98c455a0d04310  src/immer/detail/type_traits.hpp
bc2034230051f692d6957cf90465658a858fb3a00d6bb2059a61d959b12c7377  src/immer/detail/util.hpp
53ea21ded87d1c81e732fbf1446eddd21a80477222adbeb34f312f603c2e1279  src/immer/experimental/detail/dvektor_impl.hpp
789188e87be676afd606f696c0f8ad34b253e232087d4eab707d1ed425cbd81a  src/immer/experimental/dvektor.hpp
e7f3710a5248d97352f3087b4e4cc3ea90aa54724a9ec3350da979819099be02  src/immer/flex_vector.hpp
c1703719485d74628af99715d8eb469b8b003039454c540347ab0e2cea95a92f  src/immer/flex_vector_transient.hpp
b66c1ef64f2126f2904f6ee6d7dbcf82877cdbad683ecd044b39e5e74b493f06  src/immer/heap/cpp_heap.hpp
ef27f7befb448e80f4dbe78c60ae838b9204bb7c1da2e4748db9d2f3acbe6f2c  src/immer/heap/debug_size_heap.hpp
27249ad74149841220fc86ab70fbd4aeb7ccf9c0e37f35f5a3b00f83ec94102c  src/immer/heap/free_list_heap.hpp
148270a3e26cb5dbdb050658b87ea14149ac89a6fcbda05824bb49022c509820  src/immer/heap/free_list_node.hpp
b922de99b33fa79bce7c086f0e5bc95512f1673fa5b7b5a0eb033b15c5d81874  src/immer/heap/gc_heap.hpp
f0d492eaa4df758a9614f9da4690c1ee1616f1645d4cfb81d9d9eec1d71204b2  src/immer/heap/heap_policy.hpp
47f2629f5ec2905cb843d348a1401624a0b5a59f71bfecbb7e0d10c161c00de6  src/immer/heap/identity_heap.hpp
2a01970d223be94dc218bc44a4f55d5745ea6139db2524c4fb38eab517223110  src/immer/heap/malloc_heap.hpp
c9d761333412dca3398dca1a4e9eb0e8781c609fde51f1420cc81b848ec9e395  src/immer/heap/split_heap.hpp
2d94f4781c759fd26f8e0482c4cb721338bc6959adf5e6a89933eb6dba4e0f51  src/immer/heap/tags.hpp
633ffca793924d8473cdcdcdedd59733836f6ba805237c72a204225108229913  src/immer/heap/thread_local_free_list_heap.hpp
ad0dcba4d629c724d4d7f04edb36d7563de5ef9441c170fdd009d8588547a381  src/immer/heap/unsafe_free_list_heap.hpp
f038ea93fec901da1b4de6dedd2a853a5d15e032ce824e2b2455018f67681100  src/immer/heap/with_data.hpp
9a8eaa33efeb9edfe33519ea4ebb1967b9938c79d8a2e35c2b1d7e0cd5d9c74a  src/immer/lock/no_lock_policy.hpp
ffd02f6563598c21d8b5be657c00d5ba00247880456228860cbf705b4a91b05d  src/immer/lock/spinlock_policy.hpp
ee78f141ae07f3d98d60e64aab7559fc69f00fafc0312c1c141879cd49c0d739  src/immer/map.hpp
ff67eaed1b2dad9177493c8116ec6e90ec59b90f8b40cb82748b261c5cbcdf32  src/immer/map_transient.hpp
22b13e7ca64d6306cf6c00ea8fa177eccf5afa0e7edd9cd693eed36a6c18696a  src/immer/memory_policy.hpp
c4db2947410fc56c3bb86cc43fc31a893ee214d4aa46605993d66597ac5507b5  src/immer/refcount/enable_intrusive_ptr.hpp
723c6fd4fe03510ef537c095c7d5f8bc2eefc1d4cf40a899ef26b81e97f49c7a  src/immer/refcount/no_refcount_policy.hpp
5376e881d25534d605685ba10e3bad32b9f026712e19b335c608948cb1e41951  src/immer/refcount/refcount_policy.hpp
6baf41519c4b4cc11b19273add5f57c8b6bf702ce2db9fd7f8d5c524450bb0d2  src/immer/refcount/unsafe_refcount_policy.hpp
420dac1757eace6cca5b8984036d8c65e2b8bc2ef01763b7f3b4c88b42e967f9  src/immer/set.hpp
61f87fb0c437922e52d112321b324edffbbf0257eb72819c5519c1be6217d48e  src/immer/set_transient.hpp
04eeadd6b3c9a4e5a1e98e3f2ba3378139d67687270ba784c3da29a95ea6254b  src/immer/transience/gc_transience_policy.hpp
de16e94676523a7515aec0688cb953cd431435071a4f1bf80c5788a2fc05ed3f  src/immer/transience/no_transience_policy.hpp
a222117cccb29cfd51a79c7696935cbd8ca7e0d0c93936bf807e02b30ba8f5b1  src/immer/vector.hpp
98773bf3aaf6f85de8b802de855b2c3b1fe2088dbe3d296071d2ed99c072cc76  src/immer/vector_transient.hpp

@UdjinM6
Copy link

UdjinM6 commented Aug 3, 2022

we need to remove the depends lock-in

Why start with immer though? I think the main obstacle here is bls-dash+relic and it's not as trivial as for immer I think so it should be done first. (if we won't be able to move bls-dash out of depends moving everything else is just a noise imo)

@kwvg kwvg marked this pull request as draft August 8, 2022 14:41
@kwvg
Copy link
Collaborator Author

kwvg commented Aug 8, 2022

Marked as draft until libblsdash and relic has been moved to source tree

@kwvg kwvg changed the title partial revert dash#4311: add libgmp detection, make immer a package build: partial revert dash#4311 (add libgmp detection, make immer a package) Nov 8, 2022
@github-actions
Copy link

This pull request has conflicts, please rebase.

kwvg added 2 commits November 23, 2022 10:01
git-subtree-dir: src/immer
git-subtree-split: 9cb6a5a845df766a4cb3526d8a4584bf99bac8d5
@kwvg kwvg marked this pull request as ready for review November 29, 2022 18:06
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

one suggestion, LGTM otherwise

src/Makefile.am Outdated Show resolved Hide resolved
src/Makefile.am Outdated Show resolved Hide resolved
@UdjinM6 UdjinM6 added this to the 19 milestone Nov 30, 2022
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

LGTM, immer source matches, PR compiles locally

ACK

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK for merging via merge commit

@PastaPastaPasta PastaPastaPasta merged commit 5339d33 into dashpay:develop Dec 5, 2022
PastaPastaPasta added a commit that referenced this pull request Nov 4, 2024
…as c0b716f2

f18e839 build: drop symlinks in immer subtree (Kittywhiskers Van Gogh)
d761111 build: fix gitian builds (Kittywhiskers Van Gogh)
a9f46b3 Squashed 'src/immer/' changes from 9cb6a5a845..5875f7739a (Kittywhiskers Van Gogh)
e4ee302 revert: fix gitian builds (Kittywhiskers Van Gogh)
fb00300 revert: drop symlinks in immer subtree (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Dependency for #6380

  #6380 will be using `std::ranges` as a replacement for [dash#4622](#4622) and currently, it will fail to compile due to the current version of `immer` (last updated two years ago in #4911) not meeting constraints ([source](https://en.cppreference.com/w/cpp/language/constraints)) set by `std::ranges` (see below).

  ```
  ./evo/deterministicmns.h:243:16: error: no matching function for call to object of type 'const __count_if_fn'
          return ranges::count_if(mnMap, [](const auto& p) { return IsMNValid(*p.second); });
                 ^~~~~~~~~~~~~~~~
  /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/ranges_algo.h:331:7: note: candidate template ignored: substitution failure [with _Range = const MnMap &, _Proj = identity, _Pred = (lambda at ./evo/deterministicmns.h:243:40)]: constraints not satisfied for alias template 'range_difference_t' [with _Range = const immer::map<uint256, std::shared_ptr<const CDeterministicMN>, CDeterministicMNList::ImmerHasher> &]
        operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const
        ^
  /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/ranges_algo.h:316:7: note: candidate function template not viable: requires at least 3 arguments, but 2 were provided
        operator()(_Iter __first, _Sent __last,
        ^
  ```

  This has been resolved by updating `immer` to the latest available release, [v0.8.1](https://github.com/arximboldi/immer/releases/tag/v0.8.1).

  Expected subtree hash **without changes** are `a5ded361aec714bc74149909c5e1984c10ab132c4c539c63fe57362dccd95556` (see [here](#6323 (review)) for verification instructions).

  ## Breaking Changes

  None expected.

  ## Checklist

  - [x] I have performed a self-review of my own code **(note: N/A)**
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)**
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    utACK f18e839
  UdjinM6:
    utACK f18e839

Tree-SHA512: 99d1b577eb4cf3fcc3ebfd28f19006700f085d23ccdabe802a2aa5844e4b39314347b0c0e49a352c5fc034d6584a0109edf08fa3c0846514967f1fb16e7f127a
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.

4 participants