bitcoin core – Multisig wallet issue – pair nodes (daemons) wallet.dat and pvt keys

Intro:
I am having an issue of accessing multisig wallet.
due to previous situation I have mixed up private keys and wallet.dat files

Multisig is 2 out of 3
Multisig works this way:
Synchronize multisig addresses between two running bitcoinds
Connects to both bitcoinds, figures out which one knows all the public keys for the mulitisig address, then tells the other about the address.

I have both seeds/sigs

First seed (sig) is a wallet.dat files (got 3 of those not sure which one I have to use)
Second seend (sig) are 6000 pvt keys (all mixed up)

Problem:

I want to pair first and second sig/seed – to pair wallet.dat on one daemon and pvt keys on other so it could generate access to a wallet where bitcoins are.

This would also generate public keys (3 of those) which will also gain me an access to wallet.

Has anyone had experience with this sort of issue?

nodes – The Leaflet Map displays in maintenance mode, but when this mode is turned off, the map does not render

Leaflet map displays correctly in node view while in maintenance mode, but when maintenance mode is turned off, the map does not render.

This is not an issue in other views. It only happens in node view.

Thanks for your guidance.

8 – Drush script to save multiple nodes of different types

I wrote a function that updates fields of an “Intervention” content type and saves it, then saves the “Request” node that contains it, and then saves the “Dossier” node that contains that request.

Running that code in a Devel PHP form work fine.

Now I’m trying to convert that function into a drush script that I could schedule to run everyday. But running that script gives me a couple of errors that I don’t understand.

In Renderer.php line 243:

(LogicException)
Render context is empty, because render() was called outside of a renderRoot() or renderPlain() call. Use renderPla
in()/renderRoot() or #lazy_builder/#pre_render instead.

In SqlContentEntityStorage.php line 846:

(DrupalCoreEntityEntityStorageException)
Render context is empty, because render() was called outside of a renderRoot() or renderPlain() call. Use renderPla
in()/renderRoot() or #lazy_builder/#pre_render instead.

Looking at the stack trace, it looks like a save() call on an entity is triggering these errors … does anybody know what needs to be done to correct them?

Thank you!

Function code … comments are in french, sorry

$query = Drupal::entityQuery('node')
->condition('type', 'intervention')
->condition('field_type_intervention', '318')
->sort('changed', 'ASC');

$nids = $query->execute();
$node_storage = Drupal::entityTypeManager()->getStorage('node');
$nodes = $node_storage->loadMultiple($nids);
$i = 0;

// pour tous ces hébergements
foreach ($nodes as $n) {
  echo $n->title->value . "<br>";

  $dateDebutVal = $n->field_date_debut_intervention_1->value;
  $dateFinVal = $n->field_date_fin_intervention_1->value;

  $nbChambres = $n->field_nombre_chambres->value;
  $tarifNuitee = $n->field_tarif_nuitee->value;

  echo  'dateDebut='.$dateDebutVal. '<br>';
  echo  'dateFin='.$dateFinVal. '<br>';
  $dateDebut = strtotime($dateDebutVal);

  if ($dateFinVal != "") {
    $dateFin = strtotime($dateFinVal);
  }
  else {
    $dateFin = time();
  }

  $datediff = $dateFin - $dateDebut;
  $nbJours = floor($datediff / (60 * 60 * 24));

  if ($nbJours == 0) {
    $nbJours++;
  }

  echo 'nbJours = '.$nbJours. '<br>';
  $n->set('field_nombre_nuitee', $nbJours);

  // si le nombre de chambre et le tarif nuitée sont settés, calculer le montant estimé
  if ($nbChambres != "" && $tarifNuitee != "") {
    echo 'estimation = '.number_format($tarifNuitee * $nbChambres * $nbJours, 2, '.', ''). '<br>';
    $n->set('field_cout_estime', number_format($tarifNuitee * $nbChambres * $nbJours, 2, '.', ''));
  }

  // sauvegarder l'hébergement
  $n->save();

  // aller chercher la requête de cet hébergement et la sauvegarder
  $queryRequete = Drupal::entityQuery('node')
    ->condition('type', 'requete')
    ->condition('field_intervention_service', $n->id())
    ->sort('changed', 'ASC');

  $nidsRequete = $queryRequete->execute();
  $requetes = $node_storage->loadMultiple($nidsRequete);

  foreach ($requetes as $r) {
    echo $r->title->value . '<br>';
    $r->save();

    $queryDossier = Drupal::entityQuery('node')
      ->condition('type', 'dossier')
      ->condition('field_requete_menage', $r->id())
      ->sort('changed', 'ASC');

    $nidsDossier = $queryDossier->execute();
    $dossiers = $node_storage->loadMultiple($nidsDossier);

    foreach ($dossiers as $d) {
      echo $d->title->value . '<br>';
      $d->save();
    }
  }

  // aller chercher le dossier lié à cette requête et le sauvegarder
  $i++;
}

echo 'i = '.$i. '<br>';

Stack trace for LogicException

Exception trace:
at C:xampphtdocsgosrcorelibDrupalCoreRenderRenderer.php:243
DrupalCoreRenderRenderer->doRender() at C:xampphtdocsgosrcorelibDrupalCoreRenderRenderer.php:200
DrupalCoreRenderRenderer->render() at C:xampphtdocsgosrmodulescontribserialsrcPluginFieldFieldFormatterSerialDefaultFormatter.php:33
DrupalserialPluginFieldFieldFormatterSerialDefaultFormatter->viewElements() at C:xampphtdocsgosrcorelibDrupalCoreFieldFormatterBase.php:89
DrupalCoreFieldFormatterBase->view() at C:xampphtdocsgosrcorelibDrupalCoreEntityEntityEntityViewDisplay.php:263
DrupalCoreEntityEntityEntityViewDisplay->buildMultiple() at C:xampphtdocsgosrcorelibDrupalCoreEntityEntityEntityViewDisplay.php:221
DrupalCoreEntityEntityEntityViewDisplay->build() at C:xampphtdocsgosrcorelibDrupalCoreEntityEntityViewBuilder.php:472
DrupalCoreEntityEntityViewBuilder->viewField() at C:xampphtdocsgosrcorelibDrupalCoreFieldFieldItemList.php:243
DrupalCoreFieldFieldItemList->view() at C:xampphtdocsgosrmodulescontribtokentoken.tokens.inc:1630
field_tokens() at n/a:n/a
call_user_func_array() at C:xampphtdocsgosrcorelibDrupalCoreExtensionModuleHandler.php:403
DrupalCoreExtensionModuleHandler->invokeAll() at C:xampphtdocsgosrcorelibDrupalCoreUtilityToken.php:304
DrupalCoreUtilityToken->generate() at C:xampphtdocsgosrmodulescontribtokentoken.tokens.inc:937
token_tokens() at n/a:n/a
call_user_func_array() at C:xampphtdocsgosrcorelibDrupalCoreExtensionModuleHandler.php:403
DrupalCoreExtensionModuleHandler->invokeAll() at C:xampphtdocsgosrcorelibDrupalCoreUtilityToken.php:304
DrupalCoreUtilityToken->generate() at C:xampphtdocsgosrcorelibDrupalCoreUtilityToken.php:196
DrupalCoreUtilityToken->replace() at C:xampphtdocsgosrmodulescontribauto_entitylabelsrcAutoEntityLabelManager.php:264
Drupalauto_entitylabelAutoEntityLabelManager->generateLabel() at C:xampphtdocsgosrmodulescontribauto_entitylabelsrcAutoEntityLabelManager.php:145
Drupalauto_entitylabelAutoEntityLabelManager->setLabel() at C:xampphtdocsgosrmodulescontribauto_entitylabelauto_entitylabel.module:170
auto_entitylabel_entity_presave() at n/a:n/a
call_user_func_array() at C:xampphtdocsgosrcorelibDrupalCoreExtensionModuleHandler.php:403
DrupalCoreExtensionModuleHandler->invokeAll() at C:xampphtdocsgosrcorelibDrupalCoreEntityEntityStorageBase.php:206
DrupalCoreEntityEntityStorageBase->invokeHook() at C:xampphtdocsgosrcorelibDrupalCoreEntityContentEntityStorageBase.php:843
DrupalCoreEntityContentEntityStorageBase->invokeHook() at C:xampphtdocsgosrcorelibDrupalCoreEntityEntityStorageBase.php:500
DrupalCoreEntityEntityStorageBase->doPreSave() at C:xampphtdocsgosrcorelibDrupalCoreEntityContentEntityStorageBase.php:700
DrupalCoreEntityContentEntityStorageBase->doPreSave() at C:xampphtdocsgosrcorelibDrupalCoreEntityEntityStorageBase.php:454
DrupalCoreEntityEntityStorageBase->save() at C:xampphtdocsgosrcorelibDrupalCoreEntitySqlSqlContentEntityStorage.php:837
DrupalCoreEntitySqlSqlContentEntityStorage->save() at C:xampphtdocsgosrcorelibDrupalCoreEntityEntityBase.php:395
DrupalCoreEntityEntityBase->save() at C:xampphtdocsgosrmodulescustomgosr_modscript_update_nb_nuitees.php:75
include() at C:xampphtdocsgosrvendordrushdrushsrcCommandscorePhpCommands.php:111
DrushCommandscorePhpCommands->script() at n/a:n/a
call_user_func_array() at C:xampphtdocsgosrvendorconsolidationannotated-commandsrcCommandProcessor.php:257
ConsolidationAnnotatedCommandCommandProcessor->runCommandCallback() at C:xampphtdocsgosrvendorconsolidationannotated-commandsrcCommandProcessor.php:212
ConsolidationAnnotatedCommandCommandProcessor->validateRunAndAlter() at C:xampphtdocsgosrvendorconsolidationannotated-commandsrcCommandProcessor.php:176
ConsolidationAnnotatedCommandCommandProcessor->process() at C:xampphtdocsgosrvendorconsolidationannotated-commandsrcAnnotatedCommand.php:302
ConsolidationAnnotatedCommandAnnotatedCommand->execute() at C:xampphtdocsgosrvendorsymfonyconsoleCommandCommand.php:255
SymfonyComponentConsoleCommandCommand->run() at C:xampphtdocsgosrvendorsymfonyconsoleApplication.php:1005
SymfonyComponentConsoleApplication->doRunCommand() at C:xampphtdocsgosrvendorsymfonyconsoleApplication.php:255
SymfonyComponentConsoleApplication->doRun() at C:xampphtdocsgosrvendorsymfonyconsoleApplication.php:148
SymfonyComponentConsoleApplication->run() at C:xampphtdocsgosrvendordrushdrushsrcRuntimeRuntime.php:118
DrushRuntimeRuntime->doRun() at C:xampphtdocsgosrvendordrushdrushsrcRuntimeRuntime.php:49
DrushRuntimeRuntime->run() at C:xampphtdocsgosrvendordrushdrushdrush.php:72
require() at C:xampphtdocsgosrvendordrushdrushdrush:4

Stack trace for EntityStorageException

Exception trace:
at C:xampphtdocsgosrcorelibDrupalCoreEntitySqlSqlContentEntityStorage.php:846
DrupalCoreEntitySqlSqlContentEntityStorage->save() at C:xampphtdocsgosrcorelibDrupalCoreEntityEntityBase.php:395
DrupalCoreEntityEntityBase->save() at C:xampphtdocsgosrmodulescustomgosr_modscript_update_nb_nuitees.php:75
include() at C:xampphtdocsgosrvendordrushdrushsrcCommandscorePhpCommands.php:111
DrushCommandscorePhpCommands->script() at n/a:n/a
call_user_func_array() at C:xampphtdocsgosrvendorconsolidationannotated-commandsrcCommandProcessor.php:257
ConsolidationAnnotatedCommandCommandProcessor->runCommandCallback() at C:xampphtdocsgosrvendorconsolidationannotated-commandsrcCommandProcessor.php:212
ConsolidationAnnotatedCommandCommandProcessor->validateRunAndAlter() at C:xampphtdocsgosrvendorconsolidationannotated-commandsrcCommandProcessor.php:176
ConsolidationAnnotatedCommandCommandProcessor->process() at C:xampphtdocsgosrvendorconsolidationannotated-commandsrcAnnotatedCommand.php:302
ConsolidationAnnotatedCommandAnnotatedCommand->execute() at C:xampphtdocsgosrvendorsymfonyconsoleCommandCommand.php:255
SymfonyComponentConsoleCommandCommand->run() at C:xampphtdocsgosrvendorsymfonyconsoleApplication.php:1005
SymfonyComponentConsoleApplication->doRunCommand() at C:xampphtdocsgosrvendorsymfonyconsoleApplication.php:255
SymfonyComponentConsoleApplication->doRun() at C:xampphtdocsgosrvendorsymfonyconsoleApplication.php:148
SymfonyComponentConsoleApplication->run() at C:xampphtdocsgosrvendordrushdrushsrcRuntimeRuntime.php:118
DrushRuntimeRuntime->doRun() at C:xampphtdocsgosrvendordrushdrushsrcRuntimeRuntime.php:49
DrushRuntimeRuntime->run() at C:xampphtdocsgosrvendordrushdrushdrush.php:72
require() at C:xampphtdocsgosrvendordrushdrushdrush:4

deployment – Does Ansible offer a way to build/compile on the control node, and then deploy to managed nodes?

For Ansible, to run a thing on a different set of hosts, try starting a new play.

- name: Build thing
  # localhost is the node running Ansible
  # By default, this already is connection local
  #   exec instead of ssh
  hosts: localhost
  
  tasks:
  # Assuming make based build scripts
  # make module reports not changed if nothing to do
  - make: 
      chdir: /home/builduser/source/thing/
    
    
- name: Install thing
  hosts: various
  
  tasks:
  - copy:
      # copy is an action plugin that handles the copy from localhost to remote for yoy
      src: /home/builduser/source/thing/output/thing.rpm
      dest: /tmp/thing.rpm

  # TODO Use custom repo for content management rather than copying one-off packages

  - package:
      name: /tmp/thing.rpm

Although you can run Ansible in CI/CD pipelines or whatever, and it can run whatever you like, Ansible is not amazing at being a build system. It is not artifact oriented.

amazon web services – Kops cluster creates more nodes than expected on aws

I new to kubernetes and kobs and are starting to create a cluster using

kops create cluster --zones eu-central-1a,eu-central-1b  ${NAME}  

After I have created I can see that the following

> kops get instancegroups --name=${NAME}
NAME                    ROLE    MACHINETYPE     MIN     MAX     ZONES
master-eu-central-1a    Master  t3.medium       1       1       eu-central-1a
nodes-eu-central-1a     Node    t3.medium       1       1       eu-central-1a
nodes-eu-central-1b     Node    t3.medium       1       1       eu-central-1b

Where I would expect the output to look more like this following the tutorial.

NAME                    ROLE    MACHINETYPE     MIN     MAX     ZONES
master-eu-central-1a    Master                  1       1       eu-central-1a
nodes                   Node    t2.medium       2       2

I can of course configure both the nodes in each subnet but it seems wrong. Am I on the wrong track?

performance tuning – Find all non-isomorphic trees with $n$ nodes

I would like to compute all non-isomorphic trees with n nodes efficiently. I use the following approach: I create all possible trees ( Visualizing Cayley’s Formula in Mathematica) and filter the list of all possible trees.

fun(code_) := 
 Module({v = Range(Length(code) + 2), cd = code, e = {}, c},
  While(
   Length(v) != 2,
   c = Sort(Complement(v, cd));
   AppendTo(e, {cd((1)), c((1))});
   v = DeleteCases(v, c((1)));
   cd = Drop(cd, 1););
  Graph(UndirectedEdge @@@ AppendTo(e, v), VertexSize -> 0.3, 
   VertexLabels -> 
    Table(i -> Placed(Style(i, White, Bold), {1/2, 1/2}), {i, 
      v((-1))}), 
   VertexStyle -> 
    Table(i -> ColorData("Rainbow")(i/v((-1))), {i, v((-1))})))

checkIsomorph(start_ : {}) := Module({outList, check}, outList = start;
  Function({seedling}, 
   If((check = FreeQ(outList, _?(IsomorphicGraphQ(seedling, #) &))), 
    AppendTo(outList, seedling));
   check))

n = 5;
graphs = fun(#) & /@ Tuples(Range(n), n - 2);
selected = checkIsomorph() /@ graphs;

Any suggestion on how to do it faster?

graph – creating nodes and building relationships dynamically by Importing data from json files

I have 3 JSON files namely Network, DataStore and VM. I want to extract the data from JSON files and create nodes and relationships dynamically.I have used the below mentioned query

CALL apoc.load.json("file:///DataStore.json") YIELD value AS data
MERGE (d:DataStore{DataStore: data.DataStore})
SET d.Name = data.Name,
d.Type = data.Type,
d.Capacity = data.Capacity,
d.Free = data.Free
WITH data as data
CALL apoc.load.json("file:///Network.json")YIELD value AS net
MERGE(n:Network{Network:net.Network})
SET n.Name =net.Name
WITH net AS nw
CALL apoc.load.json("file:///VmDetails.json") YIELD value AS vm
MERGE(n:Network{Name:vm.Network})
MERGE(d:DataStore{Datastore:vm.DataStore})
MERGE(v:UserV{vmName:vm.vmName})
SET v.CPU= vm.CPU,
v.ConnectionState = vm.ConnectionState,
v.DataStore = vm.DataStore,
v.Hostname = vm.Hostname,
v.InstanceUuid = vm.InstanceUuid,
v.IpAddress = vm.IpAddress,
v.Network = vm.Network,
v.NumEthernetCards = vm.NumEthernetCards,
v.NumVirtualDisks = vm.NumVirtualDisks,
v.OverallStatus = vm.OverallStatus,
v.PowerState = vm.PowerState,
v.RAM = vm.RAM,
v.Uuid = vm.Uuid
MERGE (n)-(:connected)->(v)
MERGE (v)-(:related)->(d)

Here I can create nodes as desired but while creating relationships only network and VM are creating relationship correctly but when it comes to datastore it creates some unwanted new nodes and creates a relationship.Realtionship created between VM and DataStore

Count of nodes filter in views for a taxonomy with depth

sorry for my English.

In views, Drupal 8/9, is it possible to have the count of nodes for a taxonomy-term with depth?
I would like to have it for the filters in views.

I can’t find any modules to get this information.
Maybe I don’t know how to look or a complex module gives this possibility but I couldn’t find it.

Aggregation doesn’t really help me. Performance is not a problem.

View List with distinct term listing of multiple nodes

I have a map where multiple nodes are shown as marker (filtered by terms). Now I would like to add a caption (block) which explains the (filtered) marker. The map may contain several results with the same marker.

So the map shows filtered by TERM 1 and TERM 2 shows following results:
NODE 1 (as it uses TERM 1)
NODE 2 (as it uses TERM 1)
NODE 3 (as it uses TERM 1)
NODE 4 (as it uses TERM 2)
NODE 5 (as it uses TERM 2)

In the caption (block) I would only like to show the distinct result:
TERM 1 (the marker image + name)
TERM 2 (the marker image + name)

FILTER > TERM 1
The desired result would be ONE result:
TERM 1 (image of that term)

But it does not matter what I tried (for 2 days), the result is always:
TERM 1 (of NODE 1)
TERM 1 (of NODE 2)
TERM 1 (of NODE 3)
TERM 2 (of NODE 4)
TERM 2 (of NODE 5)

Please give me a hint to understand why I cannot manage it.

Kind regards,
Benjamin