How are nodes supposed to update their inclusion proofs with Utreexo?

With Utreexo, full nodes can build and verify blocks without storing the UTXO set. This is done by using proofs that the UTXOs in a transaction are included in the Utreexo accumulator. These proofs are broadcast with the transaction. To update the Utreexo accumulator, the only thing required are the UTXOs to be added, and the inclusion proofs of the now-used outputs to be removed.

However, I don’t see anywhere in the paper that describes how unused inclusion proofs are updated in this process. It only mentions that “maintaining and updating proofs of every element in the set incurs no additional computational cost above computing the roots”. I would guess that in the process of adding or deleting leaves, every UTXO who’s proof changes will be touched, and could therefore be easily extracted simultaneously. Does anyone know more in depth how that process would happen?

Also, bonus question: do other kinds of accumulators (eg RSA accumulators) have a way of keeping proofs up to date like this?

8 – How can I make a slider block with nodes grouped by letter?

I need to make a block that list all nodes of a content type grouped by the first letter of the title. This block should be a slider so the user can iterate by letter. Also, it should have an alphabet filter so the user can filter by letter.

Something like that:
This is an example of what I want1

I can make a block with nodes grouped by the first letter of the title.

But how can I convert this to a slider block? And also, how can I make an alphabet filter?

forms – If I have 2 same name taxonomy term which is used with nodes. how to set only one instead of both?

I have 2 taxonomy terms with the same name (knight(2) and knight(6)) in my Drupal 8 Project; both terms have been used with nodes.

I want to replace knight(6) with knight(2) in all the nodes. I created the following custom form.

screenshot

The submission handler code is the following one.

  public function submitForm(array &$form, FormStateInterface $form_state) {
  
  $values =  $form_state->getValues();
  $old_term = $values('old_taxonomy_term');
  $new_term = $values('new_taxonomy_term');
  $query = Drupal::entityQuery('node')
    ->condition('type','a')
    ->condition('field_taxonomy_', $old_term, '=');
  $results = $query->execute();

  foreach ($results as $nid) {
    $node = DrupalnodeEntityNode::load($nid);
    $abc = $node->get('field_taxonomy_')->referencedEntities(); 
    foreach ($abc as $key => $value) {
      $value = reset($value);
      if ($key('tid') == $old_term) {
        $node->set('field_taxonomy_',$new_term);
        $node->save();
      }
    }
  }   
}

The code doesn’t work.

nodes – How to apply filtration upon 2 same name taxonomy terms. for set original term instead of duplicate term?

I have 2 taxonomy terms with the same name (knight(2) and knight(6)) in my Drupal 8 Project. I used both terms with nodes. Now I want to override knight(6) with knight(2) in all the nodes. I applied my logic, but it isn’t working. Please suggest any correct solution.

I have a form that asks for the taxonomy term to replace and the taxonomy term that replace it. Clicking on the submission button should replace the old taxonomy term with the new one.

screenshot

8 – How can I programmatically insert/update thousands of nodes?

I have to insert 2k nodes with my custom module but it takes forever.
I know there is a way to delete a lot of nodes with only one operation:

$storage_handler = Drupal::entityTypeManager()->getStorage("node");
$result = Drupal::entityQuery("node")
->condition('type', 'node_type' )
->execute();
$fc = $storage_handler->loadMultiple($result);
$storage_handler->delete($fc);

I guess there is also a way to insert them with only one operation (and also a way to update them). How can I achieve that?

I get datas from API and for each set of data, i have to create a node. for the moment, this is what i do

foreach($datas as $data)
{
    $node = Node::create(('type'=>'node_type')); 
    $node->set('my_field', $data); 
    $node->save()
}

And here’s an exemple of how I deactivate thousands of nodes

$storage_handler = Drupal::entityTypeManager()->getStorage("node");
$result = Drupal::entityQuery("node")
    ->condition('type', 'node_type' )
    ->condition('status', true)
    ->execute()
;
$nodes = $storage_handler->loadMultiple($result);
foreach($nodes as $node)
{
    $node->setPublished(false);
    $node->save();
}

it takes way too long for a simple update query

architecture – Why to use MetalLB for kubernetes Ingress when by default we need to reserve dedicated Ingress nodes?

I am new to kubernetes and I have created a HA cluster from scratch using kubeadm and ansible on offline premises.

Although that I can understand / read most of the components online I recently started experimenting with Ingress. It took me some time to understand that all traffic does not go through the master nodes and then distributed in the cluster. I was impressed when I realized that Ingress acting as gate to the cluster.

I have been reading online about the restrictions that we are facing when a user decides to launch a cluster on Bare Metal (Bare-metal considerations).

To be honest I am still not sure as to why we need MetalLB and not dedicated Ingress nodes? Maybe I am not able to understand exactly as to how the traffic is flowing through the cluster when using dedicated nodes in comparison to MetalLB.

In more detail. From my point of view when a user decides to to reserve node A and node B as Ingress nodes it is because those two nodes are registered for DNS lookups. If a user decides to use MetalLB again the user needs to assign dedicated Ingress nodes (where DNS lookups will result).

As a second step the ingress node will connect to the Master node and the master node will route the request based on the rules. If this is true why we need MetalLB?

What is the difference if the user uses directly the dedicated nodes? We will assume that the user will not be launching other pods on the Ingress nodes in order to achieve maximum throughput etc etc.

nodes – Why doesnt my migration plugin run?

I made a plugin to add the alias to my node migration, using the instructions here https://www.calebthorne.com/blog/drupal/2016/07/16/drupal-8-migrate-pathauto

but i tried to put a drush break point and it never runs . How do i get this plugin to run during the migration? this is the plugin code below . and the yml is as follows:

id: migd8_node_blog
label: Custom node migration from Drupal 7
migration_group: cncs
dependencies:
  enforced:
    module:
      - migd8_node_blog
source:
 plugin: d7_node
 node_type: blog_entry
destination:
  plugin: entity:node
  bundle: blog_entry
process:
  type: 
    plugin: default_value
    default_value: blog_entry
  'path/alias': alias



<?php
     
    /**
     * @file
     * Contains Drupalmigd8_node_blogPluginmigratesourceNode.
     */
     
    namespace Drupalmigd8_node_blogPluginmigratesource;
     
    use DrupalmigrateRow;
    use DrupalnodePluginmigratesourced7Node as D7Node;
    
    /**
     * Custom node source including url aliases.
     *
     * @MigrateSource(
     *   id = "migd8_node_blog"
     * )
     */
    class Node extends D7Node {
    
      /**
       * {@inheritdoc}
       */
      public function fields() {
        return ('alias' => $this->t('Path alias')) + parent::fields();
      }
    
    /**
     * {@inheritdoc}
     */
    public function prepareRow(Row $row) {
      // Include path alias.
      $nid = $row->getSourceProperty('nid');
      drush_print_r($nid);
      $query = $this->select('url_alias', 'ua')
        ->fields('ua', ('alias'));
      $query->condition('ua.source', 'node/' . $nid);
      $alias = $query->execute()->fetchField();
      if (!empty($alias)) {
        $row->setSourceProperty('alias', '/' . $alias);
      }
      return parent::prepareRow($row);
    }
    }

sql server – Inserting XML Multiple Nested Nodes into SQL Tables

I have an XML file with the following structure:

 <NIACList>
    <NIAC>
            <Number></Number>
            <SubmissionDate></SubmissionDate>
            <ExpirationDate  />
            <IssuerIDNO></IssuerIDNO>
            <IssuerName></IssuerName>
            <SuspensionPeriod/>
            <Cessation>
              <Basis  />
              <Date  />
            </Cessation>
            <Merchant>
              <IDNx></IDNx>
              <Name></Name>
              <Address>
                <Region></Region>
                <Locality></Locality>
                <Street></Street>
                <House></House>
                <Block  />
                <Flat  />
                <Phone  />
                <Fax  />
                <Email  />
              </Address>
            </Merchant>
            <CommercialUnit>
              <IDNx  />
              <Name  />
              <Type></Type>
              <Area></Area>
              <Location></Location>
              <Address>
                <Region></Region>
                <Locality></Locality>
                <Street></Street>
                <House></House>
                <Block  />
                <Flat  />
              </Address>
              <Activities>
                <Activity>
                  <Code></Code>
                  <Name></Name>
                </Activity>
              </Activities>
              <Goods>
                <Good>
                  <Name></Name>
                </Good>
              </Goods>
              <WorkProgram  />
              <PublicSupplyUnit>
                <Capacity  />
                <TerraceCapacity  />
              </PublicSupplyUnit>
              <TradingAlcohol  />
              <TradingBeer  />
              <TradingTobaccoProducts  />
              <AmbulatoryTrading  />
              <MobileUnitTrading></MobileUnitTrading>
              <MobileUnit>
                <Type  />
                <Length  />
                <Width  />
                <Height  />
              </MobileUnit>
              <CommercialApparatusTrading></CommercialApparatusTrading>
              <CommercialApparatus>
                <Count  />
                <Length  />
                <Width  />
                <Height  />
              </CommercialApparatus>
            </CommercialUnit>
            <Modifications  />
          </NIAC>
    </NIACList>

Based on this XML structure I’ve created in MS SQL a DB with the following script for tables:

create table NIAC (
IDNIAC int identity primary key,
Number nvarchar(80) null,
SubmissionDate datetime2 null,
ExpirationDate datetime2 null,
IssuerIDNO  nvarchar(max) null,
IssuerName  nvarchar(60) null,
SuspensionPeriod datetime2 null,
Modifications nvarchar(60) null
);

create table Cessation (
IdCessation int identity primary key,
Basis nvarchar(60) null,
Date date null,
IDNIAC int 
);


create table Merchant (
IdMerchant int identity  primary key,
IDNX nvarchar(max) null,
Name nvarchar(max) null,
WorkProgram datetime2 null,
IdAddress int 
);

create table Address (
IdAddress int identity  primary key,
Region nvarchar(60) null,
Locality nvarchar(50) null,
Street nvarchar (60) null,
House nvarchar (10) null,
Block nvarchar (10) null,
Flat nvarchar(10) null,
Phone nvarchar(30) null,
Fax nvarchar(60) null,
Email nvarchar(60) null

);

create table CommercialUnit (
IDCommercialUt int identity primary key,
IDNx nvarchar(90) null,
Name nvarchar(90) null,
Type nvarchar(90) null,
Area int null,
Location nvarchar(max) null,
TerraceCapacity float null,
TradingAlcohol bit null,
TradingBeer bit null,
TradingTobaccoProducts bit null,
AmbulatoryTrading bit null,
MobileUnitTrading bit null,
CommercialApparatusTrading bit null,
IdAddress int,
IDActivities int ,
IDGoods int ,
IDMobileUnit int ,
IDCommercial int ,
IDPSU int 
);


create table Activities (
IDActivities int identity  primary key,
Code nvarchar (90) null,
Name nvarchar (90) null
);

create table Goods(
IDGoods int identity  primary key,
Name nvarchar(60) null
);

create table MobileUnit(
IDMobileUnit int identity  primary key,
Type numeric null,
Length numeric null,
Width numeric null,
Height numeric null
);

create table CommercialApparatus(
IDCommercial int identity primary key,
Count float null,
Length numeric null,
Width numeric null,
Height numeric null
);


create table PublicSupplyUnit(
IDPSU int identity  primary key,
Capacity float,
TerraceCapacity float 
);


create table NIACList(
ID int identity primary key,
IDNIAC int not null,
IDNIACList int 
);


create table NIACToComponents(
IDNIACToComponents int identity primary key,
IDNIAC int,
IDAddressMerchant int,
IDAddressCU int,
IdCessation int,
IdMerchant int,
IDCommercialUt int,
IDActivities int,
IDGoods int,
IDMobileUnit int,
IDCommercial int,
IDPSU int,

);




drop table if exists NIAC;

drop table if exists NIACList;

drop table if exists Cessation;

drop table if exists Merchant;

drop table if exists Address;

drop table if exists CommercialApparatus;

drop table if exists CommercialUnit;

drop table if exists Goods;

drop table if exists MobileUnit;

drop table if exists  PublicSupplyUnit;

drop table if exists  Activities;

drop table if exists NIACToComponents;



alter table dbo.NIACList
add constraint FK_ID_NIAC 
foreign key (IDNIAC) references dbo.NIAC(IDNIAC)
on delete cascade
on update cascade;

alter table dbo.Cessation
Add constraint FK_IDNIAC
foreign key(IDNIAC) references dbo.NIAC(IDNIAC)
on delete cascade
on update cascade;

alter table dbo.Merchant
add constraint FK_IdAdress
foreign key(IdAddress) references dbo.Address(IdAddress)
on delete cascade
on update cascade;

alter table dbo.CommercialUnit
add constraint FK_IdAddress
foreign key(IdAddress) references dbo.Address(IdAddress)
on delete cascade
on update cascade;


alter table dbo.CommercialUnit
add constraint FK_Activities
foreign key(IDActivities) references dbo.Activities(IDActivities)
on delete cascade
on update cascade;

alter table dbo.CommercialUnit
add constraint FK_IDGoods
foreign key(IDGoods) references dbo.Goods(IDGoods)
on delete cascade
on update cascade;

alter table dbo.CommercialUnit
add constraint FK_IDMobileUnit
foreign key(IDMobileUnit) references dbo.MobileUnit(IDMobileUnit)
on delete cascade
on update cascade;

alter table dbo.CommercialUnit
add constraint FK_IDCommercial 
foreign key(IDCommercial) references dbo.CommercialApparatus(IDCommercial)
on delete cascade
on update cascade;

alter table dbo.CommercialUnit
add constraint FK_IDPSU
foreign key(IDPSU) references dbo.PublicSupplyUnit(IDPSU)
on delete cascade
on update cascade;

Suppose there are lots of NIAC into NIACList(50-100 nodes), and i want to insert into them data from my XML File.
I’ve did the INSERT operation for just one NIAC, using 3 procedures(2 for inserting into tables, and 1 to call both procedures and to insert into another table all the ID’s of the tables where data was inserted, so all the data would be linked to a NIAC).

The script for inserting data into table is bellow:
1 procedure:

ALTER procedure (dbo).(InsertXMLMultipleTables)
(
@idAddress1 int out,
@idAddress2 int out,
@idactivities int out,
@idgoods int out,
@idmobileunit int out,
@idcommercial int out,
@idcommercialut int out,
@idpsu int out,
@idmerchant int out,
@xml xml
)
as 
set @xml = *


begin 
set nocount on

INSERT INTO Activities(Code,Name)
        SELECT  
    
Code=c.value('Code(1)','nvarchar(90)') ,
Name=c.value('Name(1)','nvarchar(90)') 
FROM @xml.nodes('/NIACList/NIAC/CommercialUnit/Activities/Activity') Activities(c)
set @IDActivities=SCOPE_IDENTITY();
end;




begin
INSERT INTO Address(Region,Locality,Street,House,Block,Flat,Phone,Fax,Email)
        SELECT 
        Region=c.value('Region(1),','nvarchar(60)'),
        Locality=c.value('Locality(1),','nvarchar(50)') ,
        Street=c.value('Street(1),','nvarchar(60)') ,
        House=c.value('House(1),','nvarchar(10)') ,
        Block=c.value('Block(1),','nvarchar(10)') ,
        Flat=c.value('Flat(1),','nvarchar(10)') ,
        Phone=c.value('Phone(1),','nvarchar(30)') ,
        Fax=c.value('Fax(1),','nvarchar(60)') ,
        Email=c.value('Email(1),','nvarchar(60)') 
    FROM @xml.nodes('NIACList/NIAC/Merchant/Address') Address(c)
    set @idAddress1=SCOPE_IDENTITY();
    end;

    begin
    INSERT INTO Merchant(IDNX,Name,WorkProgram,IdAddress)
        SELECT 
        Region=c.value('IDNx(1),','nvarchar(max)'),
        Locality=c.value('Name(1),','nvarchar(max)') ,
        Street=c.value('WorkProgram(1),','datetime2') ,
        @idAddress1
    FROM @xml.nodes('NIACList/NIAC/Merchant') Merchant(c)
    set @idmerchant=SCOPE_IDENTITY();
    end;

    
begin
INSERT INTO Address(Region,Locality,Street,House,Block,Flat,Phone,Fax,Email)
        SELECT 
        Region=c.value('Region(1),','nvarchar(60)'),
        Locality=c.value('Locality(1),','nvarchar(50)') ,
        Street=c.value('Street(1),','nvarchar(60)') ,
        House=c.value('House(1),','nvarchar(10)') ,
        Block=c.value('Block(1),','nvarchar(10)') ,
        Flat=c.value('Flat(1),','nvarchar(10)') ,
        Phone=c.value('Phone(1),','nvarchar(30)') ,
        Fax=c.value('Fax(1),','nvarchar(60)') ,
        Email=c.value('Email(1),','nvarchar(60)')   
    FROM @xml.nodes('NIACList/NIAC/CommercialUnit/Address') Address(c)
    set @idAddress2=SCOPE_IDENTITY();
    set @idcommercialut=SCOPE_IDENTITY();

    end;


    begin
    INSERT INTO CommercialApparatus(Count,Length,Width,Height )
        SELECT      
    Count =c.value('Type(1)','int') ,
        Length=c.value('Length(1)','int') ,
         Width=c.value('Width(1)','int') ,
         Height=c.value('Height(1)','int') 
    FROM @xml.nodes('/NIACList/NIAC/CommercialUnit/CommercialApparatus') CommercialApparatus(c)
    set @idcommercial=SCOPE_IDENTITY();
    end;




    begin
    INSERT INTO Goods(Name)
        SELECT 
        Name=c.value('Name(1)','nvarchar(60)') 
    FROM @xml.nodes('/NIACList/NIAC/CommercialUnit/Goods/Good') Goods(c)
    set @idgoods=SCOPE_IDENTITY();
    end;

    begin
    INSERT INTO MobileUnit(Type,Length,Width,Height )
        SELECT  
    Type =c.value('Type(1)','int') ,
        Length=c.value('Length(1)','int') ,
         Width=c.value('Width(1)','int') ,
         Height=c.value('Height(1)','int') 
    FROM @xml.nodes('/NIACList/NIAC/CommercialUnit/MobileUnit') MobileUnit(c)
         set @idmobileunit=SCOPE_IDENTITY();
    end;



    begin
    INSERT INTO PublicSupplyUnit(Capacity,TerraceCapacity)
        SELECT 
        Capacity=c.value('Capacity(1)','int') ,
        TerraceCapacity=c.value('TerraceCapacity(1)','int')
    FROM @xml.nodes('/NIACList/NIAC/CommercialUnit/PublicSupplyUnit') PublicSupplyUnit(c)
    set @idpsu=SCOPE_IDENTITY();
    end;



    begin
    INSERT INTO CommercialUnit(IDNX,Name,Type,Area,Location,TerraceCapacity,TradingAlcohol,TradingBeer,TradingTobaccoProducts,AmbulatoryTrading,MobileUnitTrading,CommercialApparatusTrading,IDActivities,IdAddress,IDCommercial,IDGoods,IDMobileUnit,IDPSU)
        SELECT 
        IDNx=c.value('IDNx(1),','nvarchar(90)'),
        Name=c.value('Name(1),','nvarchar(90)') ,
        Type=c.value('Type(1),','nvarchar(90)') ,
        Area=c.value('Area(1),','int') ,
        Location=c.value('Location(1),','nvarchar(max)'),
        TerraceCapacity=c.value('TerraceCapacity(1),','float') ,
        TradingAlcohol=c.value('TradingAlcohol(1),','bit') ,
        TradingBeer=c.value('TradingBeer(1),','bit') ,
        TradingTobaccoProducts=c.value('TradingTobaccoProducts(1),','bit'),
        AmbulatoryTrading=c.value('AmbulatoryTrading(1),','bit') ,
        MobileUnitTrading=c.value('MobileUnitTrading(1),','bit') ,
        CommercialApparatusTrading=c.value('CommercialApparatusTrading(1),','bit') ,
        @idactivities,@idAddress2,@idcommercial,@idgoods,@idmobileunit,@idpsu
    FROM @xml.nodes('NIACList/NIAC/CommercialUnit') CommercialUnit(c)
    end;

2 procedure:

ALTER procedure (dbo).(InsertXMLNIAC)
(
@xml xml,
@idNIAC int output,
@idCessation int output
)
as 
set @xml=*

begin 
set nocount on


INSERT INTO NIAC(Number,SubmissionDate,ExpirationDate,IssuerIDNO,IssuerName,SuspensionPeriod,Modifications)
        SELECT 
        Number=c.value('Number(1),','nvarchar(80)'),
        SubmissionDate=c.value('SubmissionDate(1),','datetime2') ,
        ExpirationDate=c.value('ExpirationDate(1),','datetime2') ,
        IssuerIDNO=c.value('IssuerIDNO(1),','nvarchar(max)') ,
        IssuerName=c.value('IssuerName(1),','nvarchar(60)') ,
        SuspensionPeriod=c.value('SuspensionPeriod(1),','datetime2') ,
        Modifications=c.value('Modifications(1),','nvarchar(60)') 
    FROM @xml.nodes('NIACList/NIAC') NIAC(c)
    set @idNIAC=SCOPE_IDENTITY();
    end;

    begin
    INSERT INTO Cessation(Basis,Date,IDNIAC)
        SELECT 
        Basis=c.value('Basis(1),','nvarchar(60)'),
        Date=c.value('Date(1),','date') ,      
        @idNIAC
    FROM @xml.nodes('NIACList/NIAC/Cessation') Cessation(c)
    set @idCessation=SCOPE_IDENTITY();
    end;

3 procedure:

ALTER PROCEDURE (dbo).(NIACFORCOMPONENTS)
@xml1 xml
AS
BEGIN
DECLARE 
        @idAddress1 int,
        @idAddress2 int,
        @idactivities int,
        @idgoods int,
        @idmobileunit int,
        @idcommercial int,
        @idcommercialut int,
        @idpsu int,
        @idmerchant int,
        @idNIAC int,
        @idCessation int


    SET NOCOUNT ON;
    
    declare @trancount int;
    set @trancount=@@TRANCOUNT;
    BEGIN TRANSACTION

    EXEC (dbo).(InsertXMLMultipleTables)
        @idAddress1 = @idAddress1 OUTPUT,
        @idAddress2 = @idAddress2 OUTPUT,
        @IDActivities = @idactivities OUTPUT,
        @idgoods = @idgoods OUTPUT,
        @idmobileunit = @idmobileunit OUTPUT,
        @idcommercial = @idcommercial OUTPUT,
        @idcommercialut = @idcommercialut OUTPUT,
        @idpsu = @idpsu OUTPUT,
        @idmerchant = @idmerchant OUTPUT,
        @xml = @xml1


        EXEC (dbo).(InsertXMLNIAC)
        
        @idNIAC = @idNIAC OUTPUT,
        @idCessation = @idCessation OUTPUT,
        @xml=@xml1

     
        


         begin try
        if @trancount = 0
            begin transaction
        else
            save transaction NIACFORCOMPONENTS;

        

lbexit:
        if @trancount = 0   
            commit;
    end try
    begin catch
        declare @error int, @message varchar(4000), @xstate int;
        select @error = ERROR_NUMBER(),
                 @message = ERROR_MESSAGE(), @xstate = XACT_STATE();
        if @xstate = -1
            rollback;
        if @xstate = 1 and @trancount = 0
            rollback
        if @xstate = 1 and @trancount > 0
            rollback transaction NIACFORCOMPONENTS;

        raiserror ('NIACFORCOMPONENTS: %d: %s', 16, 1, @error, @message) ;
        return;
    end catch   
    
    Begin
                              
        INSERT INTO NIACToComponents(IDNIAC,IdCessation,IdMerchant,IDAddressMerchant,IDAddressCU,IDCommercialUt,IDActivities,IDGoods,IDMobileUnit,IDCommercial,IDPSU)
        SELECT 
        @idNIAC as N'@idNIAC',
        @idCessation as N'@idCessation',
        @idmerchant as N'@idmerchant',
        @idAddress1 as N'@idAddress1',
        @idAddress2 as N'@idAddress2',
        @idcommercialut as N'@idcommercialut',
        @idactivities as N'@idactivities',
        @idgoods as N'@idgoods',
        @idmobileunit as N'@idmobileunit',
        @idcommercial as N'@idcommercial',
        @idpsu as N'@idpsu'
        
        
    
    COMMIT
        END             
END

Based on these scripts, the insert works perfectly for one NIAC, every ID from the table is linked to it, but i want to do such insert to all the NIAC nodes inside the NIACList, knowing the position to each of them.

nodes – DumpMempool() and LoadMempool() in src/validation.cpp

My understanding is that DumpMempool() saves the memory pool state (unconfirmed txs received from other peers and if any txs broadcasted from this node) to disk and LoadMempool() is used if this state is required. Is this correct or how does this work and what should be my approach if I am testing Dandelion (right now trying to solve conflicts)?

https://github.com/bitcoin/bitcoin/blob/3caee16946575e71e90ead9ac531f5a3a1259307/src/validation.cpp#L5139

This is what I see in mempool.dat file:

mempool.dat

What exactly is happening in src/validation.cpp and what is saved in mempool.dat, when is this data required, what happens if there is an issue saving or loading data from the file?

seed – Confused about LND derivation of node’s payee pubkeys

Okay. A short summary of the problem: I’m trying to derive the root key from LND from the aezeed, but I can’t get it right.

Assume the following seed (aezeed):

ability quality bulb clap quality piano focus ivory trust essence improve book antique analyst double equip reason venue jazz zoo host potato harvest divorce

For which the following root keys result:

tprv8ZgxMBicQKsPct7CvypLfrMHfanE3cmTwZuy8QTGNgzFZKSqFeXXinsuKvkyMe6DbqdGMu8Xp1fon8E3mgW62RiorqMv6qLV2dqPFX3pETp
xprv9s21ZrQH143K24sgGQxqWCjJMTN1p6jTc1zrFz2otiVmmihkGHBnD3WTQkbKMGhuEQ6VMoWmef61KGgJeUA9DNTDLC9cSUcS7Y5xos3tfBr

To check if these are correct, we derive the node’s payee key (identity pubkey), which is m/1017'/0'/6'/0/0

results in 03bb9f9f7734ca9da4ec06543d32456384f878303305a72979e7316825e00749ad

the problem is; the above seed results in 039e625ffe5325224e6273fc5e0afe59f7ec82cb90add45e76f34cfff9efdcac60
(as per LND’s getinfo)

Anyone who can spot my mistake?