gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated (0d77fac87 -> 23618e560)


From: gnunet
Subject: [gnunet] branch master updated (0d77fac87 -> 23618e560)
Date: Sat, 02 Dec 2023 15:32:22 +0100

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a change to branch master
in repository gnunet.

    from 0d77fac87 fix: BOX at @ not working
     new 663b6fe49 NAMESTORE: Remove TX API again. Add new edit records API 
with advisory locking.
     new 8c5694232 NAMESTORE: Also implement cancel API for advisory lock 
clearing. Update PQ plugin to new API
     new 23618e560 NAMESTORE: Fix postgres plugin with new advisory lock API

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 po/POTFILES.in                                     |   5 +-
 src/cli/namestore/gnunet-namestore-zonefile.c      |  40 +-
 src/cli/namestore/gnunet-namestore.c               |  99 ++--
 src/cli/namestore/gnunet-zoneimport.c              |  17 +-
 src/cli/reclaim/gnunet-did.c                       |   4 +-
 src/include/gnunet_namestore_plugin.h              |  58 ++-
 src/include/gnunet_namestore_service.h             | 146 +++---
 src/include/gnunet_protocols.h                     |  15 +-
 src/lib/util/gnunet_error_codes.c                  |   1 +
 src/plugin/namestore/meson.build                   |  12 +
 src/plugin/namestore/namestore-0001.sql            |   1 +
 src/plugin/namestore/plugin_namestore_flat.c       |   1 -
 src/plugin/namestore/plugin_namestore_postgres.c   | 191 ++++----
 src/plugin/namestore/plugin_namestore_sqlite.c     | 300 +++++++-----
 src/plugin/namestore/test_plugin_namestore.c       |   2 +-
 src/service/core/meson.build                       |   1 +
 src/service/namestore/.gitignore                   |   3 +
 src/service/namestore/Makefile.am                  |  30 +-
 src/service/namestore/gnunet-namestore-fcfsd.c     |  18 +-
 src/service/namestore/gnunet-service-namestore.c   | 527 ++++++++++++---------
 src/service/namestore/meson.build                  |  10 +-
 src/service/namestore/namestore.h                  | 120 ++++-
 src/service/namestore/namestore_api.c              | 338 ++++++++-----
 src/service/namestore/perf_namestore_api_import.c  | 108 ++---
 .../namestore/perf_namestore_api_zone_iteration.c  |  14 +-
 .../namestore/test_namestore_api_edit_records.c    | 246 ++--------
 .../namestore/test_namestore_api_lookup_nick.c     |  27 +-
 .../namestore/test_namestore_api_monitoring.c      |  44 +-
 .../test_namestore_api_monitoring_existing.c       |  44 +-
 src/service/namestore/test_namestore_api_remove.c  |  26 +-
 ...test_namestore_api_remove_not_existing_record.c |  10 +-
 src/service/namestore/test_namestore_api_store.c   |  16 +-
 .../namestore/test_namestore_api_store_update.c    |  32 +-
 .../namestore/test_namestore_api_tx_rollback.c     | 264 -----------
 .../namestore/test_namestore_api_zone_iteration.c  |  38 +-
 .../test_namestore_api_zone_iteration_nick.c       |  45 +-
 ...st_namestore_api_zone_iteration_specific_zone.c |  41 +-
 .../test_namestore_api_zone_iteration_stop.c       |  31 +-
 .../namestore/test_namestore_api_zone_to_name.c    |  18 +-
 src/service/reclaim/did_core.c                     |  25 +-
 src/service/reclaim/gnunet-service-reclaim.c       | 137 +++---
 .../reclaim/gnunet-service-reclaim_tickets.c       |  77 ++-
 src/service/rest/namestore_plugin.c                | 110 ++---
 src/service/transport/meson.build                  |   2 +
 44 files changed, 1566 insertions(+), 1728 deletions(-)
 delete mode 100644 src/service/namestore/test_namestore_api_tx_rollback.c

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8f6b8b46d..689864e1a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -102,7 +102,6 @@ src/contrib/service/set/ibf_sim.c
 src/contrib/service/set/plugin_block_set_test.c
 src/contrib/service/set/set_api.c
 src/contrib/service/template/gnunet-service-template.c
-src/gana/gnunet-error-codes/gnunet_error_codes.c
 src/lib/block/bg_bf.c
 src/lib/block/block.c
 src/lib/curl/curl.c
@@ -461,8 +460,6 @@ 
src/service/testing/testing_api_cmd_netjail_start_cmds_helper.c
 src/service/testing/testing_api_cmd_netjail_stop.c
 src/service/testing/testing_api_cmd_netjail_stop_cmds_helper.c
 src/service/testing/testing_api_cmd_send_peer_ready.c
-src/service/testing/testing_api_cmd_start_peer.c
-src/service/testing/testing_api_cmd_stop_peer.c
 src/service/testing/testing_api_cmd_system_create.c
 src/service/testing/testing_api_cmd_system_destroy.c
 src/service/testing/testing_api_loop.c
@@ -474,6 +471,8 @@ src/service/transport/gnunet-communicator-udp.c
 src/service/transport/gnunet-communicator-unix.c
 src/service/transport/gnunet-service-transport.c
 src/service/transport/gnunet-transport.c
+src/service/transport/testing_api_cmd_start_peer.c
+src/service/transport/testing_api_cmd_stop_peer.c
 src/service/transport/transport-testing-communicator.c
 src/service/transport/transport-testing-filenames2.c
 src/service/transport/transport-testing-loggers2.c
diff --git a/src/cli/namestore/gnunet-namestore-zonefile.c 
b/src/cli/namestore/gnunet-namestore-zonefile.c
index dfd438e94..d43e88006 100644
--- a/src/cli/namestore/gnunet-namestore-zonefile.c
+++ b/src/cli/namestore/gnunet-namestore-zonefile.c
@@ -183,21 +183,6 @@ do_shutdown (void *cls)
     GNUNET_SCHEDULER_cancel (parse_task);
 }
 
-static void
-tx_end (void *cls, enum GNUNET_ErrorCode ec)
-{
-  ns_qe = NULL;
-  if (GNUNET_EC_NONE != ec)
-  {
-    fprintf (stderr,
-             _ ("Ego `%s' not known to identity service\n"),
-             ego_name);
-    GNUNET_SCHEDULER_shutdown ();
-    ret = -1;
-  }
-  GNUNET_SCHEDULER_shutdown ();
-}
-
 static void
 parse (void *cls);
 
@@ -602,7 +587,7 @@ parse (void *cls)
   }
   if (rd_count > 0)
   {
-    ns_qe = GNUNET_NAMESTORE_records_store (ns,
+    ns_qe = GNUNET_NAMESTORE_record_set_store (ns,
                                             &zone_pkey,
                                             lastname,
                                             rd_count,
@@ -642,26 +627,9 @@ parse (void *cls)
   }
   printf ("Published %u records sets with total %u records\n",
           published_sets, published_records);
-  ns_qe = GNUNET_NAMESTORE_transaction_commit (ns,
-                                               &tx_end,
-                                               NULL);
+  GNUNET_SCHEDULER_shutdown ();
 }
 
-static void
-tx_start (void *cls, enum GNUNET_ErrorCode ec)
-{
-  ns_qe = NULL;
-  if (GNUNET_EC_NONE != ec)
-  {
-    fprintf (stderr,
-             _ ("Ego `%s' not known to identity service\n"),
-             ego_name);
-    GNUNET_SCHEDULER_shutdown ();
-    ret = -1;
-    return;
-  }
-  parse_task = GNUNET_SCHEDULER_add_now (&parse, NULL);
-}
 
 static void
 identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
@@ -684,9 +652,7 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
   zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego);
   sprintf (origin, "%s.", ego_name);
   state = ZS_ORIGIN_SET;
-  ns_qe = GNUNET_NAMESTORE_transaction_begin (ns,
-                                              &tx_start,
-                                              NULL);
+  parse_task = GNUNET_SCHEDULER_add_now (&parse, NULL);
 }
 
 
diff --git a/src/cli/namestore/gnunet-namestore.c 
b/src/cli/namestore/gnunet-namestore.c
index 00eacfcfd..ec834cc01 100644
--- a/src/cli/namestore/gnunet-namestore.c
+++ b/src/cli/namestore/gnunet-namestore.c
@@ -38,7 +38,7 @@
  * (per record).
  */
 #define WARN_RELATIVE_EXPIRATION_LIMIT GNUNET_TIME_relative_multiply ( \
-    GNUNET_TIME_UNIT_MINUTES, 15)
+          GNUNET_TIME_UNIT_MINUTES, 15)
 
 /**
  * Entry in record set for bulk processing.
@@ -479,6 +479,7 @@ parse_recordline (const char *line)
   return GNUNET_OK;
 }
 
+
 static void
 reset_handles (void)
 {
@@ -588,7 +589,6 @@ reset_handles (void)
 }
 
 
-
 /**
  * Task run on shutdown.  Cleans up everything.
  *
@@ -626,18 +626,6 @@ do_shutdown (void *cls)
   }
 }
 
-static void
-commit_cb (void *cls, enum GNUNET_ErrorCode ec)
-{
-  ns_qe = NULL;
-  if (GNUNET_EC_NONE != ec)
-  {
-    fprintf (stderr, "Failed to commit to namestore: `%s'\n",
-             GNUNET_ErrorCode_get_hint (ec));
-    ret = 1;
-  }
-  GNUNET_SCHEDULER_shutdown ();
-}
 
 static void
 process_command_stdin ();
@@ -652,7 +640,7 @@ finish_command (void)
     process_command_stdin ();
     return;
   }
-  ns_qe = GNUNET_NAMESTORE_transaction_commit (ns, &commit_cb, NULL);
+  GNUNET_SCHEDULER_shutdown ();
 }
 
 
@@ -689,6 +677,7 @@ del_continuation (void *cls, enum GNUNET_ErrorCode ec)
   finish_command ();
 }
 
+
 static void
 purge_next_record (void *cls);
 
@@ -722,16 +711,17 @@ purge_next_record (void *cls)
   GNUNET_CONTAINER_DLL_remove (marked_head,
                                marked_tail,
                                mrec);
-  del_qe = GNUNET_NAMESTORE_records_store (ns,
-                                           &mrec->key,
-                                           mrec->name,
-                                           0, NULL,
-                                           &marked_deleted,
-                                           NULL);
+  del_qe = GNUNET_NAMESTORE_record_set_store (ns,
+                                              &mrec->key,
+                                              mrec->name,
+                                              0, NULL,
+                                              &marked_deleted,
+                                              NULL);
   GNUNET_free (mrec->name);
   GNUNET_free (mrec);
 }
 
+
 /**
  * Function called when we are done with a zone iteration.
  */
@@ -763,6 +753,7 @@ zone_iteration_error_cb (void *cls)
   finish_command ();
 }
 
+
 static void
 collect_zone_records_to_purge (const struct
                                GNUNET_CRYPTO_PrivateKey *zone_key,
@@ -812,6 +803,7 @@ collect_orphans (const struct GNUNET_CRYPTO_PrivateKey 
*zone_key,
   }
 }
 
+
 /**
  * Process a record that was stored in the namestore.
  *
@@ -929,6 +921,7 @@ display_record (const struct GNUNET_CRYPTO_PrivateKey 
*zone_key,
   // fprintf (stdout, "%s", "\n");
 }
 
+
 static void
 purge_zone_iterator (void *cls,
                      const struct GNUNET_CRYPTO_PrivateKey *zone_key,
@@ -1160,13 +1153,13 @@ get_existing_record (void *cls,
   else if (GNUNET_NO != etime_is_rel)
     rde->expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
   GNUNET_assert (NULL != name);
-  add_qe = GNUNET_NAMESTORE_records_store (ns,
-                                           &zone_pkey,
-                                           name,
-                                           rd_count + 1,
-                                           rde,
-                                           &add_continuation,
-                                           &add_qe);
+  add_qe = GNUNET_NAMESTORE_record_set_store (ns,
+                                              &zone_pkey,
+                                              name,
+                                              rd_count + 1,
+                                              rde,
+                                              &add_continuation,
+                                              &add_qe);
 }
 
 
@@ -1265,7 +1258,7 @@ del_monitor (void *cls,
   if ((NULL == value) && (NULL == typestring))
   {
     /* delete everything */
-    del_qe = GNUNET_NAMESTORE_records_store (ns,
+    del_qe = GNUNET_NAMESTORE_record_set_store (ns,
                                              &zone_pkey,
                                              name,
                                              0,
@@ -1305,7 +1298,7 @@ del_monitor (void *cls,
     return;
   }
   /* delete everything but what we copied to 'rdx' */
-  del_qe = GNUNET_NAMESTORE_records_store (ns,
+  del_qe = GNUNET_NAMESTORE_record_set_store (ns,
                                            &zone_pkey,
                                            name,
                                            rd_left,
@@ -1393,7 +1386,7 @@ run_with_zone_pkey (const struct 
GNUNET_CONFIGURATION_Handle *cfg)
       rd[rd_count] = e->record;
       rd_count++;
     }
-    set_qe = GNUNET_NAMESTORE_records_store (ns,
+    set_qe = GNUNET_NAMESTORE_record_set_store (ns,
                                              &zone_pkey,
                                              name,
                                              rd_count,
@@ -1637,7 +1630,7 @@ run_with_zone_pkey (const struct 
GNUNET_CONFIGURATION_Handle *cfg)
     }
     if (GNUNET_OK !=
         GNUNET_CRYPTO_public_key_from_string (reverse_pkey,
-                                                &pubkey))
+                                              &pubkey))
     {
       fprintf (stderr,
                _ ("Invalid public key for reverse lookup `%s'\n"),
@@ -1708,7 +1701,7 @@ run_with_zone_pkey (const struct 
GNUNET_CONFIGURATION_Handle *cfg)
       rd.flags |= GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
     if (1 == is_shadow)
       rd.flags |= GNUNET_GNSRECORD_RF_SHADOW;
-    add_qe_uri = GNUNET_NAMESTORE_records_store (ns,
+    add_qe_uri = GNUNET_NAMESTORE_record_set_store (ns,
                                                  &zone_pkey,
                                                  sname,
                                                  1,
@@ -1732,6 +1725,7 @@ run_with_zone_pkey (const struct 
GNUNET_CONFIGURATION_Handle *cfg)
   }
 }
 
+
 #define MAX_LINE_LEN 4086
 
 #define MAX_ARGS 20
@@ -1746,7 +1740,7 @@ get_identity_for_string (const char *str,
   struct EgoEntry *ego_entry;
 
   if (GNUNET_OK == GNUNET_CRYPTO_public_key_from_string (str,
-                                                           &pubkey))
+                                                         &pubkey))
   {
     for (ego_entry = ego_head;
          NULL != ego_entry; ego_entry = ego_entry->next)
@@ -1774,6 +1768,7 @@ get_identity_for_string (const char *str,
   return GNUNET_NO;
 }
 
+
 static void
 process_command_stdin ()
 {
@@ -1811,7 +1806,7 @@ process_command_stdin ()
       if (NULL == tmp)
       {
         fprintf (stderr, "Error parsing name `%s'\n", next_name);
-        ns_qe = GNUNET_NAMESTORE_transaction_commit (ns, &commit_cb, NULL);
+        GNUNET_SCHEDULER_shutdown();
         ret = 1;
         return;
       }
@@ -1857,32 +1852,11 @@ process_command_stdin ()
       fprintf (stderr, "Warning, encountered recordline without zone\n");
     }
   }
-  ns_qe = GNUNET_NAMESTORE_transaction_commit (ns, &commit_cb, NULL);
+  GNUNET_SCHEDULER_shutdown();
   return;
 }
 
 
-static void
-begin_cb (void *cls, enum GNUNET_ErrorCode ec)
-{
-  ns_qe = NULL;
-  if (GNUNET_EC_NONE != ec)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Failed to start transaction: %s\n",
-                GNUNET_ErrorCode_get_hint (ec));
-    GNUNET_SCHEDULER_shutdown ();
-    return;
-  }
-  if (read_from_stdin)
-  {
-    process_command_stdin ();
-    return;
-  }
-  run_with_zone_pkey (cfg);
-}
-
-
 /**
  * Function called with ALL of the egos known to the
  * identity service, used on startup if the user did
@@ -1922,13 +1896,15 @@ id_connect_cb (void *cls,
   }
   if (NULL != ego)
     return;
-  ns_qe = GNUNET_NAMESTORE_transaction_begin (ns, &begin_cb, (void *) cfg);
+  if (read_from_stdin)
+  {
+    process_command_stdin ();
+    return;
+  }
+  run_with_zone_pkey (cfg);
 }
 
 
-
-
-
 /**
  * Main function that will be run.
  *
@@ -1971,7 +1947,6 @@ run (void *cls,
 }
 
 
-
 /**
  * The main function for gnunet-namestore.
  *
diff --git a/src/cli/namestore/gnunet-zoneimport.c 
b/src/cli/namestore/gnunet-zoneimport.c
index 9e8185653..aaed808dd 100644
--- a/src/cli/namestore/gnunet-zoneimport.c
+++ b/src/cli/namestore/gnunet-zoneimport.c
@@ -22,7 +22,6 @@
  * @brief import a DNS zone for publication in GNS, incremental
  * @author Christian Grothoff
  */
-#include "platform.h"
 #include <gnunet_util_lib.h>
 #include <gnunet_gnsrecord_lib.h>
 #include <gnunet_namestore_service.h>
@@ -55,7 +54,7 @@
  * How long do we wait at least between series of requests?
  */
 #define SERIES_DELAY \
-  GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS, 10)
+        GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS, 10)
 
 /**
  * How long do DNS records have to last at least after being imported?
@@ -1160,13 +1159,13 @@ process_result (void *cls,
       rd[off++] = rec->grd;
     pending_rs++;
     req->op_start_time = GNUNET_TIME_absolute_get ();
-    req->qe = GNUNET_NAMESTORE_records_store (ns,
-                                              &req->zone->key,
-                                              get_label (req),
-                                              rd_count,
-                                              rd,
-                                              &store_completed_cb,
-                                              req);
+    req->qe = GNUNET_NAMESTORE_record_set_store (ns,
+                                                 &req->zone->key,
+                                                 get_label (req),
+                                                 rd_count,
+                                                 rd,
+                                                 &store_completed_cb,
+                                                 req);
     GNUNET_assert (NULL != req->qe);
   }
   insert_sorted (req);
diff --git a/src/cli/reclaim/gnunet-did.c b/src/cli/reclaim/gnunet-did.c
index 33f6c5657..2350b6958 100644
--- a/src/cli/reclaim/gnunet-did.c
+++ b/src/cli/reclaim/gnunet-did.c
@@ -33,14 +33,12 @@
  * @brief DID Method Wrapper
  *
  */
-#include "platform.h"
 #include "gnunet_util_lib.h"
 #include "gnunet_namestore_service.h"
 #include "gnunet_identity_service.h"
 #include "gnunet_gns_service.h"
 #include "gnunet_gnsrecord_lib.h"
 #include "did_core.h"
-#include "jansson.h"
 
 #define GNUNET_DID_DEFAULT_DID_DOCUMENT_EXPIRATION_TIME "1d"
 
@@ -265,7 +263,7 @@ remove_did_document_ego_lookup_cb (void *cls, struct 
GNUNET_IDENTITY_Ego *ego)
   const struct GNUNET_CRYPTO_PrivateKey *skey =
     GNUNET_IDENTITY_ego_get_private_key (ego);
 
-  GNUNET_NAMESTORE_records_store (namestore_handle,
+  GNUNET_NAMESTORE_record_set_store (namestore_handle,
                                   skey,
                                   GNUNET_GNS_EMPTY_LABEL_AT,
                                   0,
diff --git a/src/include/gnunet_namestore_plugin.h 
b/src/include/gnunet_namestore_plugin.h
index d8dde5af5..b7bcc4eb6 100644
--- a/src/include/gnunet_namestore_plugin.h
+++ b/src/include/gnunet_namestore_plugin.h
@@ -53,6 +53,7 @@ extern "C"
  * @param cls closure
  * @param serial unique serial number of the record, MUST NOT BE ZERO,
  *               and must be monotonically increasing while iterating
+ * @param editor_hint content of the editor field when record was read (may be 
NULL)
  * @param zone_key private key of the zone
  * @param label name that is being mapped (at most 255 characters long)
  * @param rd_count number of entries in @a rd array
@@ -61,6 +62,7 @@ extern "C"
 typedef void
 (*GNUNET_NAMESTORE_RecordIterator) (void *cls,
                                     uint64_t serial,
+                                    const char *editor_hint,
                                     const struct
                                     GNUNET_CRYPTO_PrivateKey *private_key,
                                     const char *label,
@@ -158,53 +160,47 @@ struct GNUNET_NAMESTORE_PluginFunctions
   /** Transaction-based API draft **/
 
   /**
-   * Start a transaction in the database
+   * Edit records in the namestore.
+   * This modifies the editor hint, an advisory lock entry.
+   * The record iterator will be called with the old editor hint (if any).
    *
    * @param cls closure (internal context for the plugin)
-   * @param emsg message. On error, string will be allocated and must be freed.
-   * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
-   */
-  enum GNUNET_GenericReturnValue
-  (*transaction_begin)(void *cls, char **emsg);
-
-  /**
-   * Abort and roll back a transaction in the database
-   *
-   * @param cls closure (internal context for the plugin)
-   * @param emsg message. On error, string will be allocated and must be freed.
-   * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
-   */
-  enum GNUNET_GenericReturnValue
-  (*transaction_rollback)(void *cls, char **emsg);
-
-  /**
-   * Commit a transaction in the database
-   *
-   * @param cls closure (internal context for the plugin)
-   * @param emsg message. On error, string will be allocated and must be freed.
-   * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
+   * @param zone private key of the zone
+   * @param editor_hint the new value for the advisory lock field
+   * @param label name of the record in the zone
+   * @param iter function to call with the result
+   * @param iter_cls closure for @a iter
+   * @return #GNUNET_OK on success, #GNUNET_NO for no results, else 
#GNUNET_SYSERR
    */
   enum GNUNET_GenericReturnValue
-  (*transaction_commit)(void *cls, char **emsg);
+  (*edit_records)(void *cls,
+                  const char *editor_hint,
+                  const struct GNUNET_CRYPTO_PrivateKey *zone,
+                  const char *label,
+                  GNUNET_NAMESTORE_RecordIterator iter,
+                  void *iter_cls);
 
   /**
-   * Edit records in the datastore for which we are the authority.
-   * Should be called within a transaction (after begin) and maps
-   * to a SELECT ... FOR UPDATE in PQ.
+   * This clears the editor hint, unless it does not match the
+   * given editor hint, in which case this is a NOP.
+   * If a replacement hint is given, it hint is not cleared, but
+   * set to the replacement.
    *
    * @param cls closure (internal context for the plugin)
    * @param zone private key of the zone
+   * @param editor_hint the new value for the advisory lock field
+   * @param editor_hint_replacement an optional value to use instead of a clear
    * @param label name of the record in the zone
    * @param iter function to call with the result
    * @param iter_cls closure for @a iter
    * @return #GNUNET_OK on success, #GNUNET_NO for no results, else 
#GNUNET_SYSERR
    */
   enum GNUNET_GenericReturnValue
-  (*edit_records)(void *cls,
+  (*clear_editor_hint)(void *cls,
+                  const char *editor_hint,
+                  const char *editor_hint_replacement,
                   const struct GNUNET_CRYPTO_PrivateKey *zone,
-                  const char *label,
-                  GNUNET_NAMESTORE_RecordIterator iter,
-                  void *iter_cls);
+                       const char *label);
 
   /**
    * Setup the database.
diff --git a/src/include/gnunet_namestore_service.h 
b/src/include/gnunet_namestore_service.h
index 61691ff55..0f9be8b10 100644
--- a/src/include/gnunet_namestore_service.h
+++ b/src/include/gnunet_namestore_service.h
@@ -44,9 +44,7 @@
 
 #include "gnunet_error_codes.h"
 #include "gnunet_util_lib.h"
-#include "gnunet_block_lib.h"
 #include "gnunet_gnsrecord_lib.h"
-#include "gnunet_identity_service.h"
 
 #ifdef __cplusplus
 extern "C"
@@ -142,6 +140,9 @@ typedef void
  * keep up with the changes, calling @a cont will be delayed until the
  * monitors do keep up.
  *
+ * This always overwrites the record set and unsets any advisory
+ * lock inrrespective of the currently set editor hint/advisory lock value.
+ *
  * @param h handle to the namestore
  * @param pkey private key of the zone
  * @param label name that is being mapped
@@ -152,13 +153,13 @@ typedef void
  * @return handle to abort the request
  */
 struct GNUNET_NAMESTORE_QueueEntry *
-GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h,
-                                const struct GNUNET_CRYPTO_PrivateKey *pkey,
-                                const char *label,
-                                unsigned int rd_count,
-                                const struct GNUNET_GNSRECORD_Data *rd,
-                                GNUNET_NAMESTORE_ContinuationWithStatus cont,
-                                void *cont_cls);
+GNUNET_NAMESTORE_record_set_store (struct GNUNET_NAMESTORE_Handle *h,
+                                   const struct GNUNET_CRYPTO_PrivateKey *pkey,
+                                   const char *label,
+                                   unsigned int rd_count,
+                                   const struct GNUNET_GNSRECORD_Data *rd,
+                                   GNUNET_NAMESTORE_ContinuationWithStatus 
cont,
+                                   void *cont_cls);
 
 /**
  * Store one or more record sets in the namestore. If any item is already 
present,
@@ -175,6 +176,9 @@ GNUNET_NAMESTORE_records_store (struct 
GNUNET_NAMESTORE_Handle *h,
  * cause @a cont to be called immediately before the commit and before
  * notification of monitors.
  *
+ * This always overwrites the record set and unsets any advisory
+ * lock inrrespective of the currently set editor hint/advisory lock value.
+ *
  * @param h handle to the namestore
  * @param pkey private key of the zone
  * @param rd_set_count the number of record sets
@@ -185,7 +189,7 @@ GNUNET_NAMESTORE_records_store (struct 
GNUNET_NAMESTORE_Handle *h,
  * @return handle to abort the request
  */
 struct GNUNET_NAMESTORE_QueueEntry *
-GNUNET_NAMESTORE_records_store2 (
+GNUNET_NAMESTORE_records_store (
   struct GNUNET_NAMESTORE_Handle *h,
   const struct GNUNET_CRYPTO_PrivateKey *pkey,
   unsigned int rd_set_count,
@@ -216,16 +220,14 @@ GNUNET_NAMESTORE_records_store2 (
  * @return handle to abort the request
  */
 struct GNUNET_NAMESTORE_QueueEntry *
-GNUNET_NAMESTORE_records_store_ (struct GNUNET_NAMESTORE_Handle *h,
-                                 const struct GNUNET_CRYPTO_PrivateKey *pkey,
-                                 const char *label,
-                                 unsigned int rd_count,
-                                 const struct GNUNET_GNSRECORD_Data *rd,
-                                 int is_zonemaster,
-                                 GNUNET_NAMESTORE_ContinuationWithStatus cont,
-                                 void *cont_cls);
-
-
+GNUNET_NAMESTORE_record_set_store_ (struct GNUNET_NAMESTORE_Handle *h,
+                                    const struct GNUNET_CRYPTO_PrivateKey 
*pkey,
+                                    const char *label,
+                                    unsigned int rd_count,
+                                    const struct GNUNET_GNSRECORD_Data *rd,
+                                    int is_zonemaster,
+                                    GNUNET_NAMESTORE_ContinuationWithStatus 
cont,
+                                    void *cont_cls);
 
 
 /**
@@ -244,6 +246,23 @@ typedef void
                                    const char *label,
                                    unsigned int rd_count,
                                    const struct GNUNET_GNSRECORD_Data *rd);
+/**
+ * Process a record that was stored in the namestore.
+ *
+ * @param cls closure
+ * @param ec the error code. #GNUNET_EC_NONE on success.
+ * @param rd_count number of entries in @a rd array, 0 if label was deleted
+ * @param rd array of records with data to store
+ * @param editor_hint the advisory lock value that was replaced. NULL of not 
advisory lock
+                      was set or if lock was equal to provided editor hint.
+ */
+typedef void
+(*GNUNET_NAMESTORE_EditRecordSetBeginCallback) (void *cls,
+                                                enum GNUNET_ErrorCode ec,
+                                                unsigned int rd_count,
+                                                const struct
+                                                GNUNET_GNSRECORD_Data *rd,
+                                                const char *editor_hint);
 
 /**
  * Process a record set that was stored in the namestore.
@@ -318,7 +337,6 @@ GNUNET_NAMESTORE_records_lookup2 (struct 
GNUNET_NAMESTORE_Handle *h,
                                   enum GNUNET_GNSRECORD_Filter filter);
 
 
-
 /**
  * Look for an existing PKEY delegation record for a given public key.
  * Returns at most one result to the processor.
@@ -437,7 +455,6 @@ GNUNET_NAMESTORE_zone_iteration_start2 (struct 
GNUNET_NAMESTORE_Handle *h,
                                         enum GNUNET_GNSRECORD_Filter filter);
 
 
-
 /**
  * Calls the record processor specified in 
#GNUNET_NAMESTORE_zone_iteration_start
  * for the next record.
@@ -592,57 +609,62 @@ GNUNET_NAMESTORE_zone_monitor_stop (struct 
GNUNET_NAMESTORE_ZoneMonitor *zm);
  */
 
 /**
- * Begin a namestore transaction.
+ * This function is used to initiate the editing
+ * of a record set under #label.
+ * It will set the editor hint of the record set to #editor_hint.
+ * The editor hint serves as an advisory lock that is used in
+ * #GNUNET_NAMESTORE_EdtirRecordSetBeginCallback if #editor_hint
+ * differs from the currently set advisory lock in the database.
  *
  * @param h handle to the namestore
- * @param cont function to call on result
- * @param cont_cls closure for @a cont
- * @return handle to abort the request
+ * @param pkey the private key of the zone to edit
+ * @param label the label of the record set to edit
+ * @param editor_hint the editor hint to set as advisory lock
+ * @param error_cb the error callback
+ * @param error_cb_cls closure to #error_cb
+ * @param edit_cb the #GNUNET_NAMESTORE_EditRecordSetBeginCallback
+ * @param edit_cb_cls closure to #edit_cb
+ * @return handle to the operation
  */
 struct GNUNET_NAMESTORE_QueueEntry *
-GNUNET_NAMESTORE_transaction_begin (struct GNUNET_NAMESTORE_Handle *h,
-                                    GNUNET_NAMESTORE_ContinuationWithStatus
-                                    cont,
-                                    void *cont_cls);
+GNUNET_NAMESTORE_record_set_edit_begin (struct GNUNET_NAMESTORE_Handle *h,
+                                        const struct
+                                        GNUNET_CRYPTO_PrivateKey *pkey,
+                                        const char *label,
+                                        const char *editor_hint,
+                                        
GNUNET_NAMESTORE_EditRecordSetBeginCallback
+                                        edit_cb,
+                                        void *edit_cb_cls);
 
 /**
- * Begin rollback all actions in a transaction.
- * Reverts all actions performed since #GNUNET_NAMESTORE_transaction_begin
+ * If the current advisory lock is set to the provided editor hint,
+ * this API cancels the editing of a record set and unsets the advisory lock 
in database.
+ * Optionally, a new editor hint can be provided: For example,
+ * the value that was returned in in the callback to
+ * #GNUNET_NAMESTORE_record_set_edit_begin.
  *
- * @param h handle to the namestore
- * @param cont function to call on result
- * @param cont_cls closure for @a cont
- * @return handle to abort the request
- */
-struct GNUNET_NAMESTORE_QueueEntry *
-GNUNET_NAMESTORE_transaction_rollback (struct GNUNET_NAMESTORE_Handle *h,
-                                       GNUNET_NAMESTORE_ContinuationWithStatus
-                                       cont,
-                                       void *cont_cls);
-/**
- * Commit a namestore transaction.
- * Saves all actions performed since #GNUNET_NAMESTORE_transaction_begin
+ * If provided editor hint does not match the current advisory lock,
+ * this function is not doing anything (NOP).
  *
  * @param h handle to the namestore
- * @param cont function to call on result
- * @param cont_cls closure for @a cont
- * @return handle to abort the request
+ * @param pkey the private key of the zone to edit
+ * @param label the label of the record set to edit
+ * @param editor_hint the editor hint to set as advisory lock
+ * @param editor_hint_replacement the editor hint to set as advisory lock 
instead of clearing it
+ * @param finished_cb the callback called when cancelled
+ * @param finished_cb_cls closure to #finished_cb
+ * @return handle to the operation
  */
 struct GNUNET_NAMESTORE_QueueEntry *
-GNUNET_NAMESTORE_transaction_commit (struct GNUNET_NAMESTORE_Handle *h,
-                                     GNUNET_NAMESTORE_ContinuationWithStatus
-                                     cont,
-                                     void *cont_cls);
-
-struct GNUNET_NAMESTORE_QueueEntry *
-GNUNET_NAMESTORE_records_edit (
-  struct GNUNET_NAMESTORE_Handle *h,
-  const struct GNUNET_CRYPTO_PrivateKey *pkey,
-  const char *label,
-  GNUNET_SCHEDULER_TaskCallback error_cb,
-  void *error_cb_cls,
-  GNUNET_NAMESTORE_RecordMonitor rm,
-  void *rm_cls);
+GNUNET_NAMESTORE_record_set_edit_cancel (struct GNUNET_NAMESTORE_Handle *h,
+                                         const struct
+                                         GNUNET_CRYPTO_PrivateKey *pkey,
+                                         const char *label,
+                                         const char *editor_hint,
+                                         const char *editor_hint_replacement,
+                                         
GNUNET_NAMESTORE_ContinuationWithStatus
+                                         finished_cb,
+                                         void *finished_cls);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index a998344b9..17aeff63f 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -1327,7 +1327,7 @@ extern "C" {
 /**
  * Service to client: result of store operation.
  */
-#define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE 436
+#define GNUNET_MESSAGE_TYPE_NAMESTORE_GENERIC_RESPONSE 436
 
 /**
  * Client to service: lookup label
@@ -3631,20 +3631,19 @@ extern "C" {
  */
 
 /**
- * Message type for Begin, Commit or Rollback
+ * Message type for start of record edit with advisory lock
  */
-#define GNUNET_MESSAGE_TYPE_NAMESTORE_TX_CONTROL 1750
+#define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT 1750
 
 /**
- * Return status message for control message
+ * Return record set to edit with previous editor hint/advisory lock
  */
-#define GNUNET_MESSAGE_TYPE_NAMESTORE_TX_CONTROL_RESULT 1751
+#define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_RESPONSE 1751
 
 /**
- * Open and lock records for editing message
+ * Message type for cancellation/reset of editor hint/advisory lock
  */
-#define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_EDIT 1752
-
+#define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_CANCEL 1752
 
 /**
  * Type used to match 'all' message types.
diff --git a/src/lib/util/gnunet_error_codes.c 
b/src/lib/util/gnunet_error_codes.c
index 11ce2d0c8..c286f2e52 100644
--- a/src/lib/util/gnunet_error_codes.c
+++ b/src/lib/util/gnunet_error_codes.c
@@ -17,6 +17,7 @@
 
      SPDX-License-Identifier: AGPL3.0-or-later
  */
+#include "platform.h"
 #include "gnunet_error_codes.h"
 #include <stddef.h>
 #include <microhttpd.h>
diff --git a/src/plugin/namestore/meson.build b/src/plugin/namestore/meson.build
index 4a077915d..86eeb37c5 100644
--- a/src/plugin/namestore/meson.build
+++ b/src/plugin/namestore/meson.build
@@ -14,6 +14,18 @@ configure_file(copy: true,
                input: 'test_plugin_namestore_sqlite.conf',
                output: 'test_plugin_namestore_sqlite.conf')
 
+configure_file(input : 'namestore-0001.sql',
+               output : 'namestore-0001.sql',
+               configuration : cdata,
+               install: true,
+               install_dir: get_option('datadir')/'gnunet'/'sql')
+
+configure_file(input : 'namestore-drop.sql',
+               output : 'namestore-drop.sql',
+               configuration : cdata,
+               install: true,
+               install_dir: get_option('datadir')/'gnunet'/'sql')
+
 if pq_dep.found()
   shared_module('gnunet_plugin_namestore_postgres',
           ['plugin_namestore_postgres.c'],
diff --git a/src/plugin/namestore/namestore-0001.sql 
b/src/plugin/namestore/namestore-0001.sql
index bdfb31976..bd323e365 100644
--- a/src/plugin/namestore/namestore-0001.sql
+++ b/src/plugin/namestore/namestore-0001.sql
@@ -35,6 +35,7 @@ CREATE TABLE ns098records (
   record_count INTEGER NOT NULL DEFAULT 0,
   record_data BYTEA NOT NULL DEFAULT '',
   label TEXT NOT NULL DEFAULT '',
+  editor_hint TEXT NOT NULL DEFAULT '',
   CONSTRAINT zl UNIQUE (zone_private_key,label));
 
 CREATE INDEX IF NOT EXISTS ir_pkey_reverse 
diff --git a/src/plugin/namestore/plugin_namestore_flat.c 
b/src/plugin/namestore/plugin_namestore_flat.c
index 716071ff3..20019e1db 100644
--- a/src/plugin/namestore/plugin_namestore_flat.c
+++ b/src/plugin/namestore/plugin_namestore_flat.c
@@ -26,7 +26,6 @@
 
 #include "platform.h"
 #include "gnunet_namestore_plugin.h"
-#include "gnunet_namestore_service.h"
 #include "gnunet_gnsrecord_lib.h"
 
 /**
diff --git a/src/plugin/namestore/plugin_namestore_postgres.c 
b/src/plugin/namestore/plugin_namestore_postgres.c
index 1dc526dc2..ccf84dfa6 100644
--- a/src/plugin/namestore/plugin_namestore_postgres.c
+++ b/src/plugin/namestore/plugin_namestore_postgres.c
@@ -23,9 +23,8 @@
  * @brief postgres-based namestore backend
  * @author Christian Grothoff
  */
-#include "platform.h"
+#include "gnunet_db_lib.h"
 #include "gnunet_namestore_plugin.h"
-#include "gnunet_namestore_service.h"
 #include "gnunet_gnsrecord_lib.h"
 #include "gnunet_pq_lib.h"
 
@@ -122,8 +121,8 @@ database_prepare (struct Plugin *plugin)
     struct GNUNET_PQ_PreparedStatement ps[] = {
       GNUNET_PQ_make_prepare ("store_records",
                               "INSERT INTO namestore.ns098records"
-                              " (zone_private_key, pkey, rvalue, record_count, 
record_data, label)"
-                              " VALUES ($1, $2, $3, $4, $5, $6)"
+                              " (zone_private_key, pkey, rvalue, record_count, 
record_data, label, editor_hint)"
+                              " VALUES ($1, $2, $3, $4, $5, $6, '')"
                               " ON CONFLICT ON CONSTRAINT zl"
                               " DO UPDATE"
                               "    SET 
pkey=$2,rvalue=$3,record_count=$4,record_data=$5"
@@ -133,20 +132,27 @@ database_prepare (struct Plugin *plugin)
                               "DELETE FROM namestore.ns098records "
                               "WHERE zone_private_key=$1 AND label=$2"),
       GNUNET_PQ_make_prepare ("zone_to_name",
-                              "SELECT seq,record_count,record_data,label FROM 
namestore.ns098records"
+                              "SELECT 
seq,record_count,record_data,label,editor_hint FROM namestore.ns098records"
                               " WHERE zone_private_key=$1 AND pkey=$2"),
       GNUNET_PQ_make_prepare ("iterate_zone",
-                              "SELECT seq,record_count,record_data,label FROM 
namestore.ns098records "
+                              "SELECT 
seq,record_count,record_data,label,editor_hint FROM namestore.ns098records "
                               "WHERE zone_private_key=$1 AND seq > $2 ORDER BY 
seq ASC LIMIT $3"),
       GNUNET_PQ_make_prepare ("iterate_all_zones",
-                              "SELECT 
seq,record_count,record_data,label,zone_private_key"
+                              "SELECT 
seq,record_count,record_data,label,editor_hint,zone_private_key"
                               " FROM namestore.ns098records WHERE seq > $1 
ORDER BY seq ASC LIMIT $2"),
       GNUNET_PQ_make_prepare ("lookup_label",
-                              "SELECT seq,record_count,record_data,label "
+                              "SELECT 
seq,record_count,record_data,label,editor_hint "
                               "FROM namestore.ns098records WHERE 
zone_private_key=$1 AND label=$2"),
       GNUNET_PQ_make_prepare ("edit_set",
-                              "SELECT seq,record_count,record_data,label "
-                              "FROM namestore.ns098records WHERE 
zone_private_key=$1 AND label=$2 FOR UPDATE NOWAIT"),
+                              "UPDATE namestore.ns098records"
+                              " SET editor_hint=$3"
+                              " FROM namestore.ns098records AS 
old_ns098records"
+                              " WHERE ns098records.zone_private_key=$1 AND 
ns098records.label=$2"
+                              " RETURNING 
ns098records.seq,ns098records.record_count,ns098records.record_data,ns098records.label,old_ns098records.editor_hint
 "),
+      GNUNET_PQ_make_prepare ("clear_editor_hint",
+                              "UPDATE namestore.ns098records"
+                              " SET editor_hint=$4"
+                              " WHERE zone_private_key=$1 AND label=$2 AND 
editor_hint=$3"),
       GNUNET_PQ_PREPARED_STATEMENT_END
     };
 
@@ -377,12 +383,14 @@ parse_result_call_iterator (void *cls,
     size_t data_size;
     uint32_t record_count;
     char *label;
+    char *editor_hint;
     struct GNUNET_CRYPTO_PrivateKey zk;
     struct GNUNET_PQ_ResultSpec rs_with_zone[] = {
       GNUNET_PQ_result_spec_uint64 ("seq", &serial),
       GNUNET_PQ_result_spec_uint32 ("record_count", &record_count),
       GNUNET_PQ_result_spec_variable_size ("record_data", &data, &data_size),
       GNUNET_PQ_result_spec_string ("label", &label),
+      GNUNET_PQ_result_spec_string ("editor_hint", &editor_hint),
       GNUNET_PQ_result_spec_auto_from_type ("zone_private_key", &zk),
       GNUNET_PQ_result_spec_end
     };
@@ -391,6 +399,7 @@ parse_result_call_iterator (void *cls,
       GNUNET_PQ_result_spec_uint32 ("record_count", &record_count),
       GNUNET_PQ_result_spec_variable_size ("record_data", &data, &data_size),
       GNUNET_PQ_result_spec_string ("label", &label),
+      GNUNET_PQ_result_spec_string ("editor_hint", &editor_hint),
       GNUNET_PQ_result_spec_end
     };
     struct GNUNET_PQ_ResultSpec *rs;
@@ -430,6 +439,7 @@ parse_result_call_iterator (void *cls,
       }
       pc->iter (pc->iter_cls,
                 serial,
+                editor_hint,
                 (NULL == pc->zone_key) ? &zk : pc->zone_key,
                 label,
                 record_count,
@@ -449,17 +459,15 @@ parse_result_call_iterator (void *cls,
  * @param label name of the record in the zone
  * @param iter function to call with the result
  * @param iter_cls closure for @a iter
- * @param method the method to use "lookup_record" or "edit_set"
  * @return #GNUNET_OK on success, #GNUNET_NO for no results, else 
#GNUNET_SYSERR
  */
 static enum GNUNET_GenericReturnValue
-lookup_records (void *cls,
-                const struct
-                GNUNET_CRYPTO_PrivateKey *zone,
-                const char *label,
-                GNUNET_NAMESTORE_RecordIterator iter,
-                void *iter_cls,
-                const char*method)
+namestore_postgres_lookup_records (void *cls,
+                                   const struct
+                                   GNUNET_CRYPTO_PrivateKey *zone,
+                                   const char *label,
+                                   GNUNET_NAMESTORE_RecordIterator iter,
+                                   void *iter_cls)
 {
   struct Plugin *plugin = cls;
   GNUNET_assert (GNUNET_OK == database_prepare (plugin));
@@ -480,7 +488,7 @@ lookup_records (void *cls,
   pc.iter_cls = iter_cls;
   pc.zone_key = zone;
   res = GNUNET_PQ_eval_prepared_multi_select (plugin->dbh,
-                                              method,
+                                              "lookup_label",
                                               params,
                                               &parse_result_call_iterator,
                                               &pc);
@@ -493,7 +501,6 @@ lookup_records (void *cls,
 
 
 /**
- * Lookup records in the datastore for which we are the authority.
  *
  * @param cls closure (internal context for the plugin)
  * @param zone private key of the zone
@@ -502,15 +509,40 @@ lookup_records (void *cls,
  * @param iter_cls closure for @a iter
  * @return #GNUNET_OK on success, #GNUNET_NO for no results, else 
#GNUNET_SYSERR
  */
-static enum GNUNET_GenericReturnValue
-namestore_postgres_lookup_records (void *cls,
-                                   const struct
-                                   GNUNET_CRYPTO_PrivateKey *zone,
-                                   const char *label,
-                                   GNUNET_NAMESTORE_RecordIterator iter,
-                                   void *iter_cls)
+static int
+namestore_postgres_clear_editor_hint (void *cls,
+                                      const char *editor_hint,
+                                      const char *editor_hint_replacement,
+                                      const struct
+                                      GNUNET_CRYPTO_PrivateKey *zone,
+                                      const char *label)
 {
-  return lookup_records (cls, zone, label, iter, iter_cls, "lookup_label");
+
+  struct Plugin *plugin = cls;
+  struct GNUNET_CRYPTO_PublicKey pkey;
+
+  GNUNET_assert (GNUNET_OK == database_prepare (plugin));
+  memset (&pkey,
+          0,
+          sizeof(pkey));
+  {
+    struct GNUNET_PQ_QueryParam params[] = {
+      GNUNET_PQ_query_param_auto_from_type (zone),
+      GNUNET_PQ_query_param_string (label),
+      GNUNET_PQ_query_param_string (editor_hint),
+      GNUNET_PQ_query_param_string (editor_hint_replacement),
+      GNUNET_PQ_query_param_end
+    };
+    enum GNUNET_DB_QueryStatus res;
+
+    res = GNUNET_PQ_eval_prepared_non_select (plugin->dbh,
+                                              "clear_editor_hint",
+                                              params);
+    if ((GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != res) &&
+        (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != res))
+      return GNUNET_SYSERR;
+  }
+  return GNUNET_OK;
 }
 
 
@@ -526,13 +558,42 @@ namestore_postgres_lookup_records (void *cls,
  */
 static int
 namestore_postgres_edit_records (void *cls,
+                                 const char *editor_hint,
                                  const struct
                                  GNUNET_CRYPTO_PrivateKey *zone,
                                  const char *label,
                                  GNUNET_NAMESTORE_RecordIterator iter,
                                  void *iter_cls)
 {
-  return lookup_records (cls, zone, label, iter, iter_cls, "edit_set");
+  struct Plugin *plugin = cls;
+  GNUNET_assert (GNUNET_OK == database_prepare (plugin));
+  struct GNUNET_PQ_QueryParam params[] = {
+    GNUNET_PQ_query_param_auto_from_type (zone),
+    GNUNET_PQ_query_param_string (label),
+    GNUNET_PQ_query_param_string (editor_hint),
+    GNUNET_PQ_query_param_end
+  };
+  struct ParserContext pc;
+  enum GNUNET_DB_QueryStatus res;
+
+  if (NULL == zone)
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  pc.iter = iter;
+  pc.iter_cls = iter_cls;
+  pc.zone_key = zone;
+  res = GNUNET_PQ_eval_prepared_multi_select (plugin->dbh,
+                                              "edit_set",
+                                              params,
+                                              &parse_result_call_iterator,
+                                              &pc);
+  if (res < 0)
+    return GNUNET_SYSERR;
+  if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == res)
+    return GNUNET_NO;
+  return GNUNET_OK;
 }
 
 
@@ -649,74 +710,6 @@ namestore_postgres_zone_to_name (void *cls,
 }
 
 
-/**
- * Begin a transaction for a client.
- *
- * @param cls closure (internal context for the plugin)
- * @param emsg error message set of return code is #GNUNET_SYSERR
- * @return #GNUNET_YES on success, #GNUNET_SYSERR if transaction cannot be 
started.
- */
-static enum GNUNET_GenericReturnValue
-namestore_postgres_transaction_begin (void *cls,
-                                      char **emsg)
-{
-  struct Plugin *plugin = cls;
-  GNUNET_assert (GNUNET_OK == database_prepare (plugin));
-  struct GNUNET_PQ_ExecuteStatement es[] = {
-    GNUNET_PQ_make_execute ("BEGIN"),
-    GNUNET_PQ_EXECUTE_STATEMENT_END
-  };
-
-  return GNUNET_PQ_exec_statements (plugin->dbh, es);
-}
-
-
-/**
- * Commit a transaction for a client.
- * This releases the lock on the database.
- *
- * @param cls closure (internal context for the plugin)
- * @param emsg error message set of return code is #GNUNET_SYSERR
- * @return #GNUNET_YES on success, #GNUNET_SYSERR if transaction cannot be 
started.
- */
-static enum GNUNET_GenericReturnValue
-namestore_postgres_transaction_rollback (void *cls,
-                                         char **emsg)
-{
-  struct Plugin *plugin = cls;
-  GNUNET_assert (GNUNET_OK == database_prepare (plugin));
-  struct GNUNET_PQ_ExecuteStatement es[] = {
-    GNUNET_PQ_make_execute ("ROLLBACK"),
-    GNUNET_PQ_EXECUTE_STATEMENT_END
-  };
-
-  return GNUNET_PQ_exec_statements (plugin->dbh, es);
-}
-
-
-/**
- * Roll back a transaction for a client.
- * This releases the lock on the database.
- *
- * @param cls closure (internal context for the plugin)
- * @param emsg error message set of return code is #GNUNET_SYSERR
- * @return #GNUNET_YES on success, #GNUNET_SYSERR if transaction cannot be 
started.
- */
-static enum GNUNET_GenericReturnValue
-namestore_postgres_transaction_commit (void *cls,
-                                       char **emsg)
-{
-  struct Plugin *plugin = cls;
-  GNUNET_assert (GNUNET_OK == database_prepare (plugin));
-  struct GNUNET_PQ_ExecuteStatement es[] = {
-    GNUNET_PQ_make_execute ("COMMIT"),
-    GNUNET_PQ_EXECUTE_STATEMENT_END
-  };
-
-  return GNUNET_PQ_exec_statements (plugin->dbh, es);
-}
-
-
 /**
  * Shutdown database connection and associate data
  * structures.
@@ -760,10 +753,8 @@ libgnunet_plugin_namestore_postgres_init (void *cls)
   api->iterate_records = &namestore_postgres_iterate_records;
   api->zone_to_name = &namestore_postgres_zone_to_name;
   api->lookup_records = &namestore_postgres_lookup_records;
-  api->transaction_begin = &namestore_postgres_transaction_begin;
-  api->transaction_commit = &namestore_postgres_transaction_commit;
-  api->transaction_rollback = &namestore_postgres_transaction_rollback;
   api->edit_records = &namestore_postgres_edit_records;
+  api->clear_editor_hint = &namestore_postgres_clear_editor_hint;
   LOG (GNUNET_ERROR_TYPE_INFO,
        "Postgres namestore plugin running\n");
   return api;
diff --git a/src/plugin/namestore/plugin_namestore_sqlite.c 
b/src/plugin/namestore/plugin_namestore_sqlite.c
index ada9ca25b..50c2f5728 100644
--- a/src/plugin/namestore/plugin_namestore_sqlite.c
+++ b/src/plugin/namestore/plugin_namestore_sqlite.c
@@ -26,7 +26,6 @@
 
 #include "platform.h"
 #include "gnunet_namestore_plugin.h"
-#include "gnunet_namestore_service.h"
 #include "gnunet_gnsrecord_lib.h"
 #include "gnunet_sq_lib.h"
 #include <sqlite3.h>
@@ -50,13 +49,13 @@
  * with the message given by strerror(errno).
  */
 #define LOG_SQLITE(db, level, cmd) do { \
-    GNUNET_log_from (level,                                             \
-                     "namestore-sqlite", _ (                            \
-                       "`%s' failed at %s:%d with error: %s\n"), \
-                     cmd,                                               \
-                     __FILE__, __LINE__,                                \
-                     sqlite3_errmsg (                                   \
-                       db->dbh));                         \
+          GNUNET_log_from (level,                                             \
+                           "namestore-sqlite", _ (                            \
+                             "`%s' failed at %s:%d with error: %s\n"), \
+                           cmd,                                               \
+                           __FILE__, __LINE__,                                \
+                           sqlite3_errmsg (                                   \
+                             db->dbh));                         \
 } while (0)
 
 #define LOG(kind, ...) GNUNET_log_from (kind, "namestore-sqlite", __VA_ARGS__)
@@ -113,6 +112,11 @@ struct Plugin
    * Precompiled SQL to lookup records based on label.
    */
   sqlite3_stmt *lookup_label;
+
+  /**
+   * Precompiled SQL to clear editor hint.
+   */
+  sqlite3_stmt *editor_hint_clear;
 };
 
 
@@ -142,33 +146,43 @@ database_prepare (struct Plugin *plugin)
   };
   struct GNUNET_SQ_PrepareStatement ps[] = {
     GNUNET_SQ_make_prepare ("INSERT INTO ns098records "
-                            
"(zone_private_key,pkey,rvalue,record_count,record_data,label)"
-                            " VALUES (?, ?, ?, ?, ?, ?)",
+                            
"(zone_private_key,pkey,rvalue,record_count,record_data,"
+                            "label,editor_hint)"
+                            " VALUES (?, ?, ?, ?, ?, ?, '')",
                             &plugin->store_records),
     GNUNET_SQ_make_prepare ("DELETE FROM ns098records "
                             "WHERE zone_private_key=? AND label=?",
                             &plugin->delete_records),
-    GNUNET_SQ_make_prepare ("SELECT uid,record_count,record_data,label"
-                            " FROM ns098records"
-                            " WHERE zone_private_key=? AND pkey=?",
-                            &plugin->zone_to_name),
-    GNUNET_SQ_make_prepare ("SELECT uid,record_count,record_data,label"
-                            " FROM ns098records"
-                            " WHERE zone_private_key=? AND uid > ?"
-                            " ORDER BY uid ASC"
-                            " LIMIT ?",
-                            &plugin->iterate_zone),
     GNUNET_SQ_make_prepare (
-      "SELECT uid,record_count,record_data,label,zone_private_key"
+      "SELECT uid,record_count,record_data,label,editor_hint"
+      " FROM ns098records"
+      " WHERE zone_private_key=? AND pkey=?",
+      &plugin->zone_to_name),
+    GNUNET_SQ_make_prepare (
+      "SELECT uid,record_count,record_data,label,editor_hint"
+      " FROM ns098records"
+      " WHERE zone_private_key=? AND uid > ?"
+      " ORDER BY uid ASC"
+      " LIMIT ?",
+      &plugin->iterate_zone),
+    GNUNET_SQ_make_prepare (
+      "SELECT uid,record_count,record_data,label,editor_hint,zone_private_key"
       " FROM ns098records"
       " WHERE uid > ?"
       " ORDER BY uid ASC"
       " LIMIT ?",
       &plugin->iterate_all_zones),
-    GNUNET_SQ_make_prepare ("SELECT uid,record_count,record_data,label"
-                            " FROM ns098records"
-                            " WHERE zone_private_key=? AND label=?",
+    GNUNET_SQ_make_prepare ("UPDATE ns098records"
+                            " SET editor_hint=?"
+                            " FROM ns098records AS old_ns098records"
+                            " WHERE ns098records.zone_private_key=? AND 
ns098records.label=?"
+                            " RETURNING 
ns098records.uid,ns098records.record_count,ns098records.record_data,ns098records.label,editor_hint
 ",
                             &plugin->lookup_label),
+    GNUNET_SQ_make_prepare ("UPDATE ns098records"
+                            " SET editor_hint=?"
+                            " FROM ns098records AS old_ns098records"
+                            " WHERE ns098records.zone_private_key=? AND 
ns098records.label=? AND ns098records.editor_hint=?",
+                            &plugin->editor_hint_clear),
     GNUNET_SQ_PREPARE_END
   };
 
@@ -219,6 +233,8 @@ database_shutdown (struct Plugin *plugin)
     sqlite3_finalize (plugin->zone_to_name);
   if (NULL != plugin->lookup_label)
     sqlite3_finalize (plugin->lookup_label);
+  if (NULL != plugin->editor_hint_clear)
+    sqlite3_finalize (plugin->editor_hint_clear);
   result = sqlite3_close (plugin->dbh);
   if (result == SQLITE_BUSY)
   {
@@ -460,6 +476,7 @@ get_records_and_call_iterator (struct Plugin *plugin,
       size_t data_size;
       void *data;
       char *label;
+      char *editor_hint;
       struct GNUNET_CRYPTO_PrivateKey zk;
       struct GNUNET_SQ_ResultSpec rs[] = {
         GNUNET_SQ_result_spec_uint64 (&seq),
@@ -467,6 +484,7 @@ get_records_and_call_iterator (struct Plugin *plugin,
         GNUNET_SQ_result_spec_variable_size (&data,
                                              &data_size),
         GNUNET_SQ_result_spec_string (&label),
+        GNUNET_SQ_result_spec_string (&editor_hint),
         GNUNET_SQ_result_spec_end
       };
       struct GNUNET_SQ_ResultSpec rsx[] = {
@@ -475,6 +493,7 @@ get_records_and_call_iterator (struct Plugin *plugin,
         GNUNET_SQ_result_spec_variable_size (&data,
                                              &data_size),
         GNUNET_SQ_result_spec_string (&label),
+        GNUNET_SQ_result_spec_string (&editor_hint),
         GNUNET_SQ_result_spec_auto_from_type (&zk),
         GNUNET_SQ_result_spec_end
       };
@@ -514,6 +533,7 @@ get_records_and_call_iterator (struct Plugin *plugin,
           if (NULL != iter)
             iter (iter_cls,
                   seq,
+                  editor_hint,
                   &zk,
                   label,
                   record_count,
@@ -540,16 +560,18 @@ get_records_and_call_iterator (struct Plugin *plugin,
  * @return #GNUNET_OK on success, #GNUNET_NO for no results, else 
#GNUNET_SYSERR
  */
 static enum GNUNET_GenericReturnValue
-namestore_sqlite_lookup_records (void *cls,
-                                 const struct
-                                 GNUNET_CRYPTO_PrivateKey *zone,
-                                 const char *label,
-                                 GNUNET_NAMESTORE_RecordIterator iter,
-                                 void *iter_cls)
+lookup_records (void *cls,
+                const struct
+                GNUNET_CRYPTO_PrivateKey *zone,
+                const char *label,
+                GNUNET_NAMESTORE_RecordIterator iter,
+                void *iter_cls,
+                const char *editor_hint)
 {
   struct Plugin *plugin = cls;
   GNUNET_assert (GNUNET_OK == database_prepare (plugin));
   struct GNUNET_SQ_QueryParam params[] = {
+    GNUNET_SQ_query_param_string (editor_hint),
     GNUNET_SQ_query_param_auto_from_type (zone),
     GNUNET_SQ_query_param_string (label),
     GNUNET_SQ_query_param_end
@@ -579,6 +601,124 @@ namestore_sqlite_lookup_records (void *cls,
 }
 
 
+/**
+ * Lookup records in the datastore for which we are the authority.
+ *
+ * @param cls closure (internal context for the plugin)
+ * @param zone private key of the zone
+ * @param label name of the record in the zone
+ * @param iter function to call with the result
+ * @param iter_cls closure for @a iter
+ * @return #GNUNET_OK on success, #GNUNET_NO for no results, else 
#GNUNET_SYSERR
+ */
+static enum GNUNET_GenericReturnValue
+namestore_sqlite_lookup_records (void *cls,
+                                 const struct
+                                 GNUNET_CRYPTO_PrivateKey *zone,
+                                 const char *label,
+                                 GNUNET_NAMESTORE_RecordIterator iter,
+                                 void *iter_cls)
+{
+  return lookup_records (cls, zone, label, iter, iter_cls, "");
+}
+
+
+/**
+ * Clear editor hint.
+ *
+ * @param cls closure (internal context for the plugin)
+ * @param zone private key of the zone
+ * @param label name of the record in the zone
+ * @param editor_hint editor hint to clear
+ * @param editor_hint_repl editor hint to replace the old with (optional)
+ * @param iter function to call with the result
+ * @param iter_cls closure for @a iter
+ * @return #GNUNET_OK on success, #GNUNET_NO for no results, else 
#GNUNET_SYSERR
+ */
+static enum GNUNET_GenericReturnValue
+namestore_sqlite_editor_hint_clear (void *cls,
+                                    const char *editor_hint,
+                                    const char *editor_hint_replacement,
+                                    const struct
+                                    GNUNET_CRYPTO_PrivateKey *zone,
+                                    const char *label)
+{
+  struct Plugin *plugin = cls;
+  int n;
+  GNUNET_assert (GNUNET_OK == database_prepare (plugin));
+  struct GNUNET_SQ_QueryParam params[] = {
+    GNUNET_SQ_query_param_string ((NULL == editor_hint_replacement) ? "":
+                                  editor_hint_replacement),
+    GNUNET_SQ_query_param_auto_from_type (zone),
+    GNUNET_SQ_query_param_string (label),
+    GNUNET_SQ_query_param_string (editor_hint),
+    GNUNET_SQ_query_param_end
+  };
+
+  if (NULL == zone)
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  if (GNUNET_OK !=
+      GNUNET_SQ_bind (plugin->editor_hint_clear,
+                      params))
+  {
+    LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
+                "sqlite3_bind_XXXX");
+    GNUNET_SQ_reset (plugin->dbh,
+                     plugin->editor_hint_clear);
+    return GNUNET_SYSERR;
+  }
+  n = sqlite3_step (plugin->editor_hint_clear);
+  GNUNET_SQ_reset (plugin->dbh,
+                   plugin->store_records);
+  switch (n)
+  {
+  case SQLITE_DONE:
+    GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG,
+                     "sqlite",
+                     "Editor hint cleared\n");
+    return GNUNET_OK;
+
+  case SQLITE_BUSY:
+    LOG_SQLITE (plugin,
+                GNUNET_ERROR_TYPE_WARNING | GNUNET_ERROR_TYPE_BULK,
+                "sqlite3_step");
+    return GNUNET_NO;
+
+  default:
+    LOG_SQLITE (plugin,
+                GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
+                "sqlite3_step");
+    return GNUNET_SYSERR;
+  }
+}
+
+
+/**
+ * Lookup records in the datastore for which we are the authority.
+ *
+ * @param cls closure (internal context for the plugin)
+ * @param zone private key of the zone
+ * @param label name of the record in the zone
+ * @param iter function to call with the result
+ * @param iter_cls closure for @a iter
+ * @return #GNUNET_OK on success, #GNUNET_NO for no results, else 
#GNUNET_SYSERR
+ */
+static enum GNUNET_GenericReturnValue
+namestore_sqlite_edit_records (void *cls,
+                               const char *editor_hint,
+                               const struct
+                               GNUNET_CRYPTO_PrivateKey *zone,
+                               const char *label,
+                               GNUNET_NAMESTORE_RecordIterator iter,
+                               void *iter_cls)
+{
+  return lookup_records (cls, zone, label, iter, iter_cls, editor_hint);
+}
+
+
 /**
  * Iterate over the results for a particular key and zone in the
  * datastore.  Will return at most one result to the iterator.
@@ -698,92 +838,6 @@ namestore_sqlite_zone_to_name (void *cls,
 }
 
 
-/**
- * Begin a transaction for a client.
- * This locks the database. SQLite is unable to discern between different
- * rows with a specific zone key but the API looks like this anyway.
- * https://www.sqlite.org/lang_transaction.html
- *
- * @param cls closure (internal context for the plugin)
- * @param emsg error message set of return code is #GNUNET_SYSERR
- * @return #GNUNET_YES on success, #GNUNET_SYSERR if transaction cannot be 
started.
- */
-static enum GNUNET_GenericReturnValue
-namestore_sqlite_transaction_begin (void *cls,
-                                    char **emsg)
-{
-  struct Plugin *plugin = cls;
-  int rc;
-  char *sqlEmsg;
-
-  GNUNET_assert (GNUNET_OK == database_prepare (plugin));
-  rc = sqlite3_exec (plugin->dbh, "BEGIN IMMEDIATE TRANSACTION;",
-                     NULL, NULL, &sqlEmsg);
-  if (SQLITE_OK != rc)
-  {
-    *emsg = GNUNET_strdup (sqlEmsg);
-    sqlite3_free (sqlEmsg);
-  }
-  return (SQLITE_OK != rc) ? GNUNET_SYSERR : GNUNET_YES;
-}
-
-
-/**
- * Commit a transaction for a client.
- * This releases the lock on the database.
- *
- * @param cls closure (internal context for the plugin)
- * @param emsg error message set of return code is #GNUNET_SYSERR
- * @return #GNUNET_YES on success, #GNUNET_SYSERR if transaction cannot be 
started.
- */
-static enum GNUNET_GenericReturnValue
-namestore_sqlite_transaction_rollback (void *cls,
-                                       char **emsg)
-{
-  struct Plugin *plugin = cls;
-  int rc;
-  char *sqlEmsg;
-
-  GNUNET_assert (GNUNET_OK == database_prepare (plugin));
-  rc = sqlite3_exec (plugin->dbh, "ROLLBACK;",
-                     NULL, NULL, &sqlEmsg);
-  if (SQLITE_OK != rc)
-  {
-    *emsg = GNUNET_strdup (sqlEmsg);
-    sqlite3_free (sqlEmsg);
-  }
-  return (SQLITE_OK != rc) ? GNUNET_SYSERR : GNUNET_YES;
-}
-
-
-/**
- * Roll back a transaction for a client.
- * This releases the lock on the database.
- *
- * @param cls closure (internal context for the plugin)
- * @param emsg error message set of return code is #GNUNET_SYSERR
- * @return #GNUNET_YES on success, #GNUNET_SYSERR if transaction cannot be 
started.
- */
-static enum GNUNET_GenericReturnValue
-namestore_sqlite_transaction_commit (void *cls,
-                                     char **emsg)
-{
-  struct Plugin *plugin = cls;
-  int rc;
-  char *sqlEmsg;
-
-  GNUNET_assert (GNUNET_OK == database_prepare (plugin));
-  rc = sqlite3_exec (plugin->dbh, "END TRANSACTION;",
-                     NULL, NULL, &sqlEmsg);
-  if (SQLITE_OK != rc)
-  {
-    *emsg = GNUNET_strdup (sqlEmsg);
-    sqlite3_free (sqlEmsg);
-  }
-  return (SQLITE_OK != rc) ? GNUNET_SYSERR : GNUNET_YES;
-}
-
-
 static enum GNUNET_GenericReturnValue
 namestore_sqlite_create_tables (void *cls)
 {
@@ -804,7 +858,8 @@ namestore_sqlite_create_tables (void *cls)
                             " rvalue INT8 NOT NULL,"
                             " record_count INT NOT NULL,"
                             " record_data BLOB NOT NULL,"
-                            " label TEXT NOT NULL"
+                            " label TEXT NOT NULL,"
+                            " editor_hint TEXT NOT NULL"
                             ")"),
     GNUNET_SQ_make_try_execute ("CREATE INDEX ir_pkey_reverse "
                                 "ON ns098records (zone_private_key,pkey)"),
@@ -940,17 +995,10 @@ libgnunet_plugin_namestore_sqlite_init (void *cls)
   api->iterate_records = &namestore_sqlite_iterate_records;
   api->zone_to_name = &namestore_sqlite_zone_to_name;
   api->lookup_records = &namestore_sqlite_lookup_records;
-  api->transaction_begin = &namestore_sqlite_transaction_begin;
-  api->transaction_commit = &namestore_sqlite_transaction_commit;
-  api->transaction_rollback = &namestore_sqlite_transaction_rollback;
   api->create_tables = &namestore_sqlite_create_tables;
   api->drop_tables = &namestore_sqlite_drop_tables;
-  /**
-   * NOTE: Since SQlite does not support SELECT ... FOR UPDATE this is
-   * just an alias to lookup_records. The BEGIN IMMEDIATE mechanic currently
-   * implicitly ensures this API behaves as it should
-   */
-  api->edit_records = &namestore_sqlite_lookup_records;
+  api->edit_records = &namestore_sqlite_edit_records;
+  api->clear_editor_hint = &namestore_sqlite_editor_hint_clear;
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        _ ("SQlite database running\n"));
   return api;
diff --git a/src/plugin/namestore/test_plugin_namestore.c 
b/src/plugin/namestore/test_plugin_namestore.c
index d90651255..db943ab9a 100644
--- a/src/plugin/namestore/test_plugin_namestore.c
+++ b/src/plugin/namestore/test_plugin_namestore.c
@@ -22,7 +22,6 @@
  * @brief Test for the namestore plugins
  * @author Christian Grothoff
  */
-#include "platform.h"
 #include "gnunet_util_lib.h"
 #include "gnunet_namestore_plugin.h"
 
@@ -97,6 +96,7 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg)
 static void
 test_record (void *cls,
              uint64_t seq,
+             const char *editor_hint,
              const struct GNUNET_CRYPTO_PrivateKey *private_key,
              const char *label,
              unsigned int rd_count,
diff --git a/src/service/core/meson.build b/src/service/core/meson.build
index 6f7ff7404..19ffd0ddc 100644
--- a/src/service/core/meson.build
+++ b/src/service/core/meson.build
@@ -53,6 +53,7 @@ shared_module('gnunet_test_core_plugin_cmd_just_run',
         dependencies: [libgnunetutil_dep,
                        libgnunettesting_dep,
                        libgnunetcoretesting_dep,
+                       libgnunettransporttesting2_dep,
                        libgnunettransportcore_dep,
                        libgnunettransportapplication_dep,
                        libgnunettesting_dep,
diff --git a/src/service/namestore/.gitignore b/src/service/namestore/.gitignore
index 7b99c6163..2728811c9 100644
--- a/src/service/namestore/.gitignore
+++ b/src/service/namestore/.gitignore
@@ -1,3 +1,6 @@
+perf_namestore_api_zone_iteration_postgres
+perf_namestore_api_zone_iteration_sqlite
+test_namestore_api_edit_records_sqlite
 gnunet-service-namestore
 gnunet-namestore-fcfsd
 test_namestore_api_lookup_nick.nc
diff --git a/src/service/namestore/Makefile.am 
b/src/service/namestore/Makefile.am
index d8f6a5318..01c6e9096 100644
--- a/src/service/namestore/Makefile.am
+++ b/src/service/namestore/Makefile.am
@@ -76,10 +76,10 @@ SQLITE_TESTS = \
  test_namestore_api_zone_iteration_stop_sqlite \
  test_namestore_api_monitoring_existing_sqlite \
  test_namestore_api_zone_to_name_sqlite \
+ test_namestore_api_edit_records_sqlite \
  perf_namestore_api_zone_iteration_sqlite \
  perf_namestore_api_import_sqlite \
- perf_namestore_api_import_postgres \
- test_namestore_api_tx_rollback_sqlite
+ perf_namestore_api_import_postgres
 endif
 
 
@@ -97,8 +97,7 @@ POSTGRES_TESTS = \
  test_namestore_api_zone_iteration_stop_postgres \
  test_namestore_api_monitoring_existing_postgres \
  test_namestore_api_zone_to_name_postgres \
- perf_namestore_api_zone_iteration_postgres \
- test_namestore_api_tx_rollback_postgres
+ perf_namestore_api_zone_iteration_postgres
 if HAVE_EXPERIMENTAL
 POSTGRES_TESTS += test_namestore_api_edit_records_postgres
 endif
@@ -261,34 +260,25 @@ test_namestore_api_monitoring_existing_postgres_LDADD = \
   $(top_builddir)/src/service/identity/libgnunetidentity.la \
   $(top_builddir)/src/lib/util/libgnunetutil.la
 
-test_namestore_api_tx_rollback_sqlite_SOURCES = \
- test_namestore_api_tx_rollback.c
-test_namestore_api_tx_rollback_sqlite_LDADD = \
-  $(top_builddir)/src/service/testing/libgnunettesting.la \
-  $(top_builddir)/src/service/identity/libgnunetidentity.la \
-  $(top_builddir)/src/service/namestore/libgnunetnamestore.la \
-  $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \
-  $(top_builddir)/src/lib/util/libgnunetutil.la
-
-test_namestore_api_tx_rollback_postgres_SOURCES = \
- test_namestore_api_tx_rollback.c
-test_namestore_api_tx_rollback_postgres_LDADD = \
+if HAVE_EXPERIMENTAL
+test_namestore_api_edit_records_postgres_SOURCES = \
+ test_namestore_api_edit_records.c
+test_namestore_api_edit_records_postgres_LDADD = \
   $(top_builddir)/src/service/testing/libgnunettesting.la \
   $(top_builddir)/src/service/identity/libgnunetidentity.la \
   $(top_builddir)/src/service/namestore/libgnunetnamestore.la \
   $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \
   $(top_builddir)/src/lib/util/libgnunetutil.la
+endif
 
-if HAVE_EXPERIMENTAL
-test_namestore_api_edit_records_postgres_SOURCES = \
+test_namestore_api_edit_records_sqlite_SOURCES = \
  test_namestore_api_edit_records.c
-test_namestore_api_edit_records_postgres_LDADD = \
+test_namestore_api_edit_records_sqlite_LDADD = \
   $(top_builddir)/src/service/testing/libgnunettesting.la \
   $(top_builddir)/src/service/identity/libgnunetidentity.la \
   $(top_builddir)/src/service/namestore/libgnunetnamestore.la \
   $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \
   $(top_builddir)/src/lib/util/libgnunetutil.la
-endif
 
 test_namestore_api_zone_iteration_sqlite_SOURCES = \
  test_namestore_api_zone_iteration.c
diff --git a/src/service/namestore/gnunet-namestore-fcfsd.c 
b/src/service/namestore/gnunet-namestore-fcfsd.c
index 4948ae441..03ded7fcb 100644
--- a/src/service/namestore/gnunet-namestore-fcfsd.c
+++ b/src/service/namestore/gnunet-namestore-fcfsd.c
@@ -533,13 +533,13 @@ register_do_cb (void *cls,
   gd.expiration_time = record_exp.rel_value_us;
   gd.flags = GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
 
-  rd->searching = GNUNET_NAMESTORE_records_store (namestore,
-                                                  zone_key,
-                                                  rd->register_name,
-                                                  1,
-                                                  &gd,
-                                                  &register_done_cb,
-                                                  rd);
+  rd->searching = GNUNET_NAMESTORE_record_set_store (namestore,
+                                                     zone_key,
+                                                     rd->register_name,
+                                                     1,
+                                                     &gd,
+                                                     &register_done_cb,
+                                                     rd);
 
   GNUNET_free (gdraw);
 }
@@ -839,7 +839,7 @@ create_response (void *cls,
       }
 
       if (GNUNET_OK != GNUNET_CRYPTO_public_key_from_string (rd->register_key,
-                                                               &(rd->key)))
+                                                             &(rd->key)))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                     _ ("Unable to parse key %s\n"),
@@ -1066,7 +1066,7 @@ run_service (void *cls,
                                                         &record_exp))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-                _("No expiration specified for records.\n"));
+                _ ("No expiration specified for records.\n"));
     GNUNET_SCHEDULER_shutdown ();
     return;
   }
diff --git a/src/service/namestore/gnunet-service-namestore.c 
b/src/service/namestore/gnunet-service-namestore.c
index 26de295bf..f375828dc 100644
--- a/src/service/namestore/gnunet-service-namestore.c
+++ b/src/service/namestore/gnunet-service-namestore.c
@@ -24,17 +24,16 @@
  * @author Matthias Wachs
  * @author Christian Grothoff
  */
-#include "platform.h"
+#include "gnunet_error_codes.h"
+#include "gnunet_gnsrecord_lib.h"
+#include "gnunet_protocols.h"
 #include "gnunet_util_lib.h"
-#include "gnunet_gns_service.h"
-#include "gnunet_namestore_service.h"
 #include "gnunet_namestore_plugin.h"
 #include "gnunet_statistics_service.h"
-#include "gnunet_signatures.h"
 #include "namestore.h"
 
 #define LOG_STRERROR_FILE(kind, syscall, filename) \
-  GNUNET_log_from_strerror_file (kind, "util", syscall, filename)
+        GNUNET_log_from_strerror_file (kind, "util", syscall, filename)
 
 /**
  * If a monitor takes more than 1 minute to process an event, print a warning.
@@ -144,11 +143,6 @@ struct NamestoreClient
    */
   char *db_lib_name;
 
-  /**
-   * GNUNET_YES if this nc has begun a transaction which is uncommited.
-   */
-  int in_transaction;
-
   /**
    * Message queue for transmission to @e client
    */
@@ -256,7 +250,6 @@ struct ZoneMonitor
 };
 
 
-
 /**
  * Information for an ongoing #handle_record_store() operation.
  * Needed as we may wait for monitors to be ready for the notification.
@@ -293,12 +286,6 @@ struct StoreActivity
    */
   uint16_t rd_set_count;
 
-  /**
-   * Wheather or not this store action is already commited.
-   * The store activity will not be processed unless this field is GNUNET_YES
-   */
-  int uncommited;
-
   /**
    * The zone private key
    */
@@ -438,6 +425,7 @@ free_store_activity (struct StoreActivity *sa)
   GNUNET_free (sa);
 }
 
+
 /**
  * Function called with the records for the #GNUNET_GNS_EMPTY_LABEL_AT
  * label in the zone.  Used to locate the #GNUNET_GNSRECORD_TYPE_NICK
@@ -453,6 +441,7 @@ free_store_activity (struct StoreActivity *sa)
 static void
 lookup_nick_it (void *cls,
                 uint64_t seq,
+                const char *editor_hint,
                 const struct GNUNET_CRYPTO_PrivateKey *private_key,
                 const char *label,
                 unsigned int rd_count,
@@ -788,8 +777,8 @@ send_lookup_response_with_filter (struct NamestoreClient 
*nc,
   zir_msg->rd_len = htons ((uint16_t) rd_ser_len);
   zir_msg->key_len = htons (key_len);
   GNUNET_CRYPTO_write_private_key_to_buffer (zone_key,
-                                               &zir_msg[1],
-                                               key_len);
+                                             &zir_msg[1],
+                                             key_len);
   zir_msg->expire = GNUNET_TIME_absolute_hton (block_exp);
   name_tmp = (char *) &zir_msg[1] + key_len;
   GNUNET_memcpy (name_tmp, name, name_len);
@@ -810,6 +799,7 @@ send_lookup_response_with_filter (struct NamestoreClient 
*nc,
   return res_count;
 }
 
+
 /**
  * Send response to the store request to the client.
  *
@@ -823,17 +813,17 @@ send_store_response (struct NamestoreClient *nc,
                      uint32_t rid)
 {
   struct GNUNET_MQ_Envelope *env;
-  struct RecordStoreResponseMessage *rcr_msg;
+  struct NamestoreResponseMessage *rcr_msg;
 
   GNUNET_assert (NULL != nc);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Sending RECORD_STORE_RESPONSE message\n");
+              "Sending GENERIC_RESPONSE message\n");
   GNUNET_STATISTICS_update (statistics,
                             "Store requests completed",
                             1,
                             GNUNET_NO);
   env = GNUNET_MQ_msg (rcr_msg,
-                       GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE);
+                       GNUNET_MESSAGE_TYPE_NAMESTORE_GENERIC_RESPONSE);
   rcr_msg->gns_header.r_id = htonl (rid);
   rcr_msg->ec = htonl (ec);
   GNUNET_MQ_send (nc->mq, env);
@@ -865,8 +855,6 @@ zone_iteration_done_client_continue (struct ZoneIteration 
*zi)
 }
 
 
-
-
 /**
  * Print a warning that one of our monitors is no longer reacting.
  *
@@ -904,17 +892,6 @@ continue_store_activity (struct StoreActivity *sa,
   const char *buf;
   char *conv_name;
 
-  // If we are in a transaction, do not notify monitors or update
-  // cached. This will be done when we are commiting.
-  if (GNUNET_YES == sa->uncommited)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "Transaction not yet committed, delaying monitor and cache 
updates\n");
-    send_store_response (sa->nc, GNUNET_EC_NONE, sa->rid);
-    if (GNUNET_YES == call_continue)
-      GNUNET_SERVICE_client_continue (sa->nc->client);
-    return GNUNET_OK;
-  }
   buf = (const char *) &sa[1];
   for (int i = sa->rd_set_pos; i < sa->rd_set_count; i++)
   {
@@ -1004,39 +981,9 @@ client_disconnect_cb (void *cls,
   struct ZoneIteration *no;
   struct StoreActivity *sa = sa_head;
   struct StoreActivity *sn;
-  char *emsg;
 
   (void) cls;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Client %p disconnected\n", client);
-  if (GNUNET_YES == nc->in_transaction)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                "Client in transaction, rolling back...\n");
-    if (GNUNET_SYSERR == nc->GSN_database->transaction_rollback (
-          nc->GSN_database->cls,
-          &emsg))
-    {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                  "Unable to roll back: %s\n", emsg);
-      GNUNET_free (emsg);
-    }
-    else
-    {
-      nc->in_transaction = GNUNET_NO;
-      while (NULL != sa)
-      {
-        if ((nc != sa->nc) ||
-            (GNUNET_NO == sa->uncommited))
-        {
-          sa = sa->next;
-          continue;
-        }
-        sn = sa->next;
-        free_store_activity (sa);
-        sa = sn;
-      }
-    }
-  }
   for (struct ZoneMonitor *zm = monitor_head; NULL != zm; zm = zm->next)
   {
     if (nc != zm->nc)
@@ -1147,6 +1094,11 @@ struct RecordLookupContext
    */
   const char *label;
 
+  /**
+   * The editor hint for set
+   */
+  const char *editor_hint;
+
   /**
    * The record result.
    */
@@ -1194,6 +1146,7 @@ struct RecordLookupContext
 static void
 lookup_it (void *cls,
            uint64_t seq,
+           const char *editor_hint,
            const struct GNUNET_CRYPTO_PrivateKey *private_key,
            const char *label,
            unsigned int rd_count_nf,
@@ -1210,7 +1163,7 @@ lookup_it (void *cls,
   if (0 != strcmp (label, rlc->label))
     return;
   rlc->found = GNUNET_YES;
-
+  rlc->editor_hint = editor_hint;
   if (GNUNET_OK != GNUNET_GNSRECORD_normalize_record_set (rlc->label,
                                                           rd_nf,
                                                           rd_count_nf,
@@ -1301,6 +1254,245 @@ lookup_it (void *cls,
 }
 
 
+/**
+ * Handles a #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT message
+ *
+ * @param cls client sending the message
+ * @param er_msg message of type `struct EditRecordSetMessage`
+ * @return #GNUNET_OK if @a er_msg is well-formed
+ */
+static int
+check_edit_record_set (void *cls, const struct EditRecordSetMessage *er_msg)
+{
+  uint16_t name_len;
+  uint16_t editor_hint_len;
+  size_t src_size;
+  size_t key_len;
+
+  (void) cls;
+  name_len = ntohs (er_msg->label_len);
+  editor_hint_len = ntohs (er_msg->editor_hint_len);
+  key_len = ntohs (er_msg->key_len);
+  src_size = ntohs (er_msg->gns_header.header.size);
+  if (name_len + editor_hint_len + key_len != src_size - sizeof(struct
+                                                                
EditRecordSetMessage))
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  return GNUNET_OK;
+}
+
+
+/**
+ * Handles a #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT message
+ *
+ * @param cls client sending the message
+ * @param ll_msg message of type `struct EditRecordSetMessage`
+ */
+static void
+handle_edit_record_set (void *cls, const struct EditRecordSetMessage *er_msg)
+{
+  struct GNUNET_CRYPTO_PrivateKey zone;
+  struct NamestoreClient *nc = cls;
+  struct GNUNET_MQ_Envelope *env;
+  struct EditRecordSetResponseMessage *rer_msg;
+  struct RecordLookupContext rlc;
+  const char *name_tmp;
+  const char *editor_hint;
+  char *conv_name;
+  uint16_t name_len;
+  uint16_t old_editor_hint_len;
+  int res;
+  size_t key_len;
+  size_t kb_read;
+
+  key_len = ntohs (er_msg->key_len);
+  name_len = ntohs (er_msg->label_len);
+  if ((GNUNET_SYSERR ==
+       GNUNET_CRYPTO_read_private_key_from_buffer (&er_msg[1],
+                                                   key_len,
+                                                   &zone,
+                                                   &kb_read)) ||
+      (kb_read != key_len))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Error reading private key\n");
+    GNUNET_SERVICE_client_drop (nc->client);
+    return;
+  }
+  name_tmp = (const char *) &er_msg[1] + key_len;
+  editor_hint = (const char *) name_tmp + name_len;
+  GNUNET_SERVICE_client_continue (nc->client);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Received NAMESTORE_RECORD_SET_EDIT message for name `%s'\n",
+              name_tmp);
+
+  conv_name = GNUNET_GNSRECORD_string_normalize (name_tmp);
+  if (NULL == conv_name)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Error converting name `%s'\n",
+                name_tmp);
+    GNUNET_SERVICE_client_drop (nc->client);
+    return;
+  }
+  name_len = strlen (conv_name) + 1;
+  rlc.label = conv_name;
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Looking up without filter\n");
+  rlc.filter = GNUNET_GNSRECORD_FILTER_NONE;
+  rlc.found = GNUNET_NO;
+  rlc.res_rd_count = 0;
+  rlc.res_rd = NULL;
+  rlc.rd_ser_len = 0;
+  rlc.nick = get_nick_record (&zone);
+  res = nc->GSN_database->edit_records (nc->GSN_database->cls,
+                                        editor_hint,
+                                        &zone,
+                                        conv_name,
+                                        &lookup_it,
+                                        &rlc);
+
+  old_editor_hint_len = 0;
+  if (NULL != rlc.editor_hint)
+    old_editor_hint_len = strlen (rlc.editor_hint) + 1;
+  env =
+    GNUNET_MQ_msg_extra (rer_msg,
+                         rlc.rd_ser_len + old_editor_hint_len,
+                         
GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_RESPONSE);
+  rer_msg->editor_hint_len = htons (old_editor_hint_len);
+  rer_msg->gns_header.r_id = er_msg->gns_header.r_id;
+  rer_msg->rd_count = htons (rlc.res_rd_count);
+  rer_msg->rd_len = htons (rlc.rd_ser_len);
+  if (GNUNET_YES == rlc.found)
+    rer_msg->ec = htons (GNUNET_EC_NONE);
+  else if (GNUNET_SYSERR == res)
+    rer_msg->ec = htons (GNUNET_EC_NAMESTORE_UNKNOWN);
+  else
+    rer_msg->ec = htons (GNUNET_EC_NAMESTORE_NO_RESULTS);
+  GNUNET_memcpy (&rer_msg[1], rlc.editor_hint, old_editor_hint_len);
+  GNUNET_memcpy ((char*) &rer_msg[1] + old_editor_hint_len, rlc.res_rd,
+                 rlc.rd_ser_len);
+  GNUNET_MQ_send (nc->mq, env);
+  GNUNET_free (rlc.res_rd);
+  GNUNET_free (conv_name);
+}
+
+
+/**
+ * Handles a #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_CANCEL message
+ *
+ * @param cls client sending the message
+ * @param er_msg message of type `struct EditRecordSetMessage`
+ * @return #GNUNET_OK if @a er_msg is well-formed
+ */
+static int
+check_edit_record_set_cancel (void *cls, const struct
+                              EditRecordSetCancelMessage *er_msg)
+{
+  uint16_t name_len;
+  uint16_t editor_hint_len;
+  uint16_t editor_hint_repl_len;
+  size_t src_size;
+  size_t key_len;
+
+  (void) cls;
+  name_len = ntohs (er_msg->label_len);
+  editor_hint_len = ntohs (er_msg->editor_hint_len);
+  editor_hint_repl_len = ntohs (er_msg->editor_hint_len);
+  key_len = ntohs (er_msg->key_len);
+  src_size = ntohs (er_msg->gns_header.header.size);
+  if (name_len + editor_hint_len + editor_hint_repl_len + key_len != src_size
+      - sizeof(struct
+               EditRecordSetCancelMessage))
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  return GNUNET_OK;
+}
+
+
+/**
+ * Handles a #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_CANCEL message
+ *
+ * @param cls client sending the message
+ * @param ll_msg message of type `struct EditRecordSetCancelMessage`
+ */
+static void
+handle_edit_record_set_cancel (void *cls, const struct
+                               EditRecordSetCancelMessage *er_msg)
+{
+  struct GNUNET_CRYPTO_PrivateKey zone;
+  struct NamestoreClient *nc = cls;
+  struct GNUNET_MQ_Envelope *env;
+  struct NamestoreResponseMessage *rer_msg;
+  const char *name_tmp;
+  const char *editor_hint;
+  const char *editor_hint_repl;
+  char *conv_name;
+  uint16_t name_len;
+  uint16_t editor_hint_len;
+  int res;
+  size_t key_len;
+  size_t kb_read;
+
+  key_len = ntohs (er_msg->key_len);
+  name_len = ntohs (er_msg->label_len);
+  editor_hint_len = ntohs (er_msg->editor_hint_len);
+  if ((GNUNET_SYSERR ==
+       GNUNET_CRYPTO_read_private_key_from_buffer (&er_msg[1],
+                                                   key_len,
+                                                   &zone,
+                                                   &kb_read)) ||
+      (kb_read != key_len))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Error reading private key\n");
+    GNUNET_SERVICE_client_drop (nc->client);
+    return;
+  }
+  name_tmp = (const char *) &er_msg[1] + key_len;
+  editor_hint = (const char *) name_tmp + name_len;
+  editor_hint_repl = (const char *) name_tmp + name_len + editor_hint_len;
+  GNUNET_SERVICE_client_continue (nc->client);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Received NAMESTORE_RECORD_SET_EDIT message for name `%s'\n",
+              name_tmp);
+
+  conv_name = GNUNET_GNSRECORD_string_normalize (name_tmp);
+  if (NULL == conv_name)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Error converting name `%s'\n",
+                name_tmp);
+    GNUNET_SERVICE_client_drop (nc->client);
+    return;
+  }
+  name_len = strlen (conv_name) + 1;
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Clearing editor hint\n");
+  res = nc->GSN_database->clear_editor_hint (nc->GSN_database->cls,
+                                             editor_hint,
+                                             editor_hint_repl,
+                                             &zone,
+                                             conv_name);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Clearing editor hint %s\n", (GNUNET_SYSERR == res) ? "failed." :
+              "successful.");
+
+  env =
+    GNUNET_MQ_msg (rer_msg,
+                   GNUNET_MESSAGE_TYPE_NAMESTORE_GENERIC_RESPONSE);
+  rer_msg->gns_header.r_id = er_msg->gns_header.r_id;
+  rer_msg->ec = htons ((GNUNET_OK == res) ? GNUNET_EC_NONE :
+                       GNUNET_EC_NAMESTORE_BACKEND_FAILED);
+  GNUNET_MQ_send (nc->mq, env);
+  GNUNET_free (conv_name);
+}
+
+
 /**
  * Handles a #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP message
  *
@@ -1353,9 +1545,9 @@ handle_record_lookup (void *cls, const struct 
LabelLookupMessage *ll_msg)
   key_len = ntohs (ll_msg->key_len);
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_private_key_from_buffer (&ll_msg[1],
-                                                     key_len,
-                                                     &zone,
-                                                     &kb_read)) ||
+                                                   key_len,
+                                                   &zone,
+                                                   &kb_read)) ||
       (kb_read != key_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -1388,19 +1580,11 @@ handle_record_lookup (void *cls, const struct 
LabelLookupMessage *ll_msg)
   rlc.res_rd = NULL;
   rlc.rd_ser_len = 0;
   rlc.nick = get_nick_record (&zone);
-  if (GNUNET_YES != ntohs (ll_msg->is_edit_request))
-    res = nc->GSN_database->lookup_records (nc->GSN_database->cls,
-                                            &zone,
-                                            conv_name,
-                                            &lookup_it,
-                                            &rlc);
-  else
-    res = nc->GSN_database->edit_records (nc->GSN_database->cls,
+  res = nc->GSN_database->lookup_records (nc->GSN_database->cls,
                                           &zone,
                                           conv_name,
                                           &lookup_it,
                                           &rlc);
-
   env =
     GNUNET_MQ_msg_extra (llr_msg,
                          key_len + name_len + rlc.rd_ser_len,
@@ -1427,7 +1611,6 @@ handle_record_lookup (void *cls, const struct 
LabelLookupMessage *ll_msg)
 }
 
 
-
 /**
  * Checks a #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE message
  *
@@ -1458,6 +1641,7 @@ check_record_store (void *cls, const struct 
RecordStoreMessage *rp_msg)
   return GNUNET_OK;
 }
 
+
 struct LookupExistingRecordsContext
 {
 
@@ -1488,6 +1672,7 @@ struct LookupExistingRecordsContext
 static void
 get_existing_rd_exp (void *cls,
                      uint64_t seq,
+                     const char *editor_hint,
                      const struct
                      GNUNET_CRYPTO_PrivateKey *private_key,
                      const char *label,
@@ -1521,6 +1706,7 @@ get_existing_rd_exp (void *cls,
   }
 }
 
+
 static enum GNUNET_ErrorCode
 store_record_set (struct NamestoreClient *nc,
                   const struct GNUNET_CRYPTO_PrivateKey *private_key,
@@ -1635,8 +1821,6 @@ store_record_set (struct NamestoreClient *nc,
         if ((0 == strcmp (GNUNET_GNS_EMPTY_LABEL_AT, conv_name)) &&
             (GNUNET_GNSRECORD_TYPE_NICK == rd[i].record_type))
         {
-          // FIXME: In case this is an uncommited transaction,
-          // we should not do this here. Can we do this in the store activity?
           cache_nick (private_key, &rd[i]);
           have_nick = GNUNET_YES;
         }
@@ -1681,9 +1865,6 @@ store_record_set (struct NamestoreClient *nc,
       if ((0 == strcmp (GNUNET_GNS_EMPTY_LABEL_AT, conv_name)) &&
           (GNUNET_NO == have_nick))
       {
-        /* remove nick record from cache, in case we have one there */
-        // FIXME: In case this is an uncommited transaction,
-        // we should not do this here. Can we do this in the store activity?
         cache_nick (private_key, NULL);
       }
       res = nc->GSN_database->store_records (nc->GSN_database->cls,
@@ -1718,6 +1899,7 @@ store_record_set (struct NamestoreClient *nc,
   return ec;
 }
 
+
 /**
  * Handles a #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE message
  *
@@ -1748,9 +1930,9 @@ handle_record_store (void *cls, const struct 
RecordStoreMessage *rp_msg)
   rs_len = rp_msg_len - rs_off;
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_private_key_from_buffer (&rp_msg[1],
-                                                     key_len,
-                                                     &zone,
-                                                     &kb_read)) ||
+                                                   key_len,
+                                                   &zone,
+                                                   &kb_read)) ||
       (kb_read != key_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -1786,130 +1968,9 @@ handle_record_store (void *cls, const struct 
RecordStoreMessage *rp_msg)
   sa->rd_set_pos = 0;
   sa->private_key = zone;
   sa->zm_pos = monitor_head;
-  sa->uncommited = nc->in_transaction;
   continue_store_activity (sa, GNUNET_YES);
 }
 
-static void
-send_tx_response (int rid, enum GNUNET_ErrorCode ec, struct NamestoreClient 
*nc)
-{
-  struct TxControlResultMessage *txr_msg;
-  struct GNUNET_MQ_Envelope *env;
-
-  env =
-    GNUNET_MQ_msg (txr_msg, GNUNET_MESSAGE_TYPE_NAMESTORE_TX_CONTROL_RESULT);
-  txr_msg->gns_header.r_id = rid;
-  txr_msg->ec = htonl (ec);
-  GNUNET_MQ_send (nc->mq, env);
-}
-
-/**
- * Handles a #GNUNET_MESSAGE_TYPE_NAMESTORE_TX_CONTROL message
- *
- * @param cls client sending the message
- * @param tx_msg message of type `struct TxControlMessage`
- */
-static void
-handle_tx_control (void *cls, const struct TxControlMessage *tx_msg)
-{
-  struct NamestoreClient *nc = cls;
-  struct StoreActivity *sa = sa_head;
-  struct StoreActivity *sn;
-  enum GNUNET_GenericReturnValue ret;
-  char *emsg = NULL;
-  int blocked = GNUNET_NO;
-
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TX_CONTROL message\n");
-
-  switch (ntohs (tx_msg->control))
-  {
-  case GNUNET_NAMESTORE_TX_BEGIN:
-    ret = nc->GSN_database->transaction_begin (nc->GSN_database->cls,
-                                               &emsg);
-    send_tx_response (tx_msg->gns_header.r_id,
-                      (GNUNET_SYSERR == ret) ?
-                      GNUNET_EC_NAMESTORE_BACKEND_FAILED : GNUNET_EC_NONE, nc);
-    if (GNUNET_SYSERR == ret)
-    {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                  "Databse backend error: `%s'", emsg);
-      GNUNET_free (emsg);
-    }
-    GNUNET_SERVICE_client_continue (nc->client);
-    nc->in_transaction = GNUNET_YES;
-    break;
-  case GNUNET_NAMESTORE_TX_COMMIT:
-    ret = nc->GSN_database->transaction_commit (nc->GSN_database->cls,
-                                                &emsg);
-    send_tx_response (tx_msg->gns_header.r_id,
-                      (GNUNET_SYSERR == ret) ?
-                      GNUNET_EC_NAMESTORE_BACKEND_FAILED : GNUNET_EC_NONE,
-                      nc);
-    if (GNUNET_SYSERR == ret)
-    {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                  "Databse backend error: `%s'", emsg);
-      GNUNET_free (emsg);
-    }
-    if (GNUNET_SYSERR != ret)
-    {
-      nc->in_transaction = GNUNET_NO;
-      while (NULL != sa)
-      {
-        if ((nc != sa->nc) ||
-            (GNUNET_NO == sa->uncommited))
-        {
-          sa = sa->next;
-          continue;
-        }
-        sa->uncommited = GNUNET_NO;
-        sn = sa->next;
-        if (GNUNET_OK != continue_store_activity (sa, GNUNET_NO))
-          blocked = GNUNET_YES;
-        sa = sn;
-      }
-      if (GNUNET_YES != blocked)
-        GNUNET_SERVICE_client_continue (nc->client);
-    }
-    break;
-  case GNUNET_NAMESTORE_TX_ROLLBACK:
-    ret = nc->GSN_database->transaction_rollback (nc->GSN_database->cls,
-                                                  &emsg);
-    send_tx_response (tx_msg->gns_header.r_id,
-                      (GNUNET_SYSERR == ret) ?
-                      GNUNET_EC_NAMESTORE_BACKEND_FAILED : GNUNET_EC_NONE, nc);
-    GNUNET_SERVICE_client_continue (nc->client);
-    if (GNUNET_SYSERR == ret)
-    {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                  "Databse backend error: `%s'", emsg);
-      GNUNET_free (emsg);
-    }
-    if (GNUNET_SYSERR != ret)
-    {
-      nc->in_transaction = GNUNET_NO;
-      while (NULL != sa)
-      {
-        if ((nc != sa->nc) ||
-            (GNUNET_NO == sa->uncommited))
-        {
-          sa = sa->next;
-          continue;
-        }
-        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                    "Discarding uncommited StoreActivity\n");
-        sn = sa->next;
-        free_store_activity (sa);
-        sa = sn;
-      }
-    }
-    break;
-  default:
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                "Unknown control type %u\n", ntohs (tx_msg->control));
-    GNUNET_break (0);
-  }
-}
 
 /**
  * Context for record remove operations passed from #handle_zone_to_name to
@@ -1949,6 +2010,7 @@ struct ZoneToNameCtx
 static void
 handle_zone_to_name_it (void *cls,
                         uint64_t seq,
+                        const char *editor_hint,
                         const struct GNUNET_CRYPTO_PrivateKey *zone_key,
                         const char *name,
                         unsigned int rd_count,
@@ -1998,8 +2060,8 @@ handle_zone_to_name_it (void *cls,
   ztnr_msg->name_len = htons (name_len);
   ztnr_msg->key_len = htons (key_len);
   GNUNET_CRYPTO_write_private_key_to_buffer (zone_key,
-                                               &ztnr_msg[1],
-                                               key_len);
+                                             &ztnr_msg[1],
+                                             key_len);
   name_tmp = (char *) &ztnr_msg[1] + key_len;
   GNUNET_memcpy (name_tmp, name, name_len);
   rd_tmp = &name_tmp[name_len];
@@ -2010,6 +2072,7 @@ handle_zone_to_name_it (void *cls,
   GNUNET_MQ_send (ztn_ctx->nc->mq, env);
 }
 
+
 static enum GNUNET_GenericReturnValue
 check_zone_to_name (void *cls,
                     const struct ZoneToNameMessage *zis_msg)
@@ -2044,9 +2107,9 @@ handle_zone_to_name (void *cls, const struct 
ZoneToNameMessage *ztn_msg)
   key_len = ntohs (ztn_msg->key_len);
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_private_key_from_buffer (&ztn_msg[1],
-                                                     key_len,
-                                                     &zone,
-                                                     &kb_read)) ||
+                                                   key_len,
+                                                   &zone,
+                                                   &kb_read)) ||
       (kb_read != key_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -2058,10 +2121,10 @@ handle_zone_to_name (void *cls, const struct 
ZoneToNameMessage *ztn_msg)
   pkey_len = ntohs (ztn_msg->pkey_len);
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_public_key_from_buffer ((char*) &ztn_msg[1]
-                                                    + key_len,
-                                                    pkey_len,
-                                                    &value_zone,
-                                                    &kb_read)) ||
+                                                  + key_len,
+                                                  pkey_len,
+                                                  &value_zone,
+                                                  &kb_read)) ||
       (kb_read != pkey_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -2133,6 +2196,7 @@ struct ZoneIterationProcResult
 static void
 zone_iterate_proc (void *cls,
                    uint64_t seq,
+                   const char *editor_hint,
                    const struct GNUNET_CRYPTO_PrivateKey *zone_key,
                    const char *name,
                    unsigned int rd_count,
@@ -2225,6 +2289,7 @@ run_zone_iteration_round (struct ZoneIteration *zi, 
uint64_t limit)
     zone_iteration_done_client_continue (zi);
 }
 
+
 static enum GNUNET_GenericReturnValue
 check_iteration_start (void *cls,
                        const struct ZoneIterationStartMessage *zis_msg)
@@ -2268,9 +2333,9 @@ handle_iteration_start (void *cls,
   {
     if ((GNUNET_SYSERR ==
          GNUNET_CRYPTO_read_private_key_from_buffer (&zis_msg[1],
-                                                       key_len,
-                                                       &zone,
-                                                       &kb_read)) ||
+                                                     key_len,
+                                                     &zone,
+                                                     &kb_read)) ||
         (kb_read != key_len))
     {
       GNUNET_SERVICE_client_drop (nc->client);
@@ -2443,6 +2508,7 @@ monitor_iteration_next (void *cls);
 static void
 monitor_iterate_cb (void *cls,
                     uint64_t seq,
+                    const char *editor_hint,
                     const struct GNUNET_CRYPTO_PrivateKey *zone_key,
                     const char *name,
                     unsigned int rd_count,
@@ -2476,6 +2542,7 @@ monitor_iterate_cb (void *cls,
   }
 }
 
+
 static enum GNUNET_GenericReturnValue
 check_monitor_start (void *cls,
                      const struct ZoneMonitorStartMessage *zis_msg)
@@ -2520,9 +2587,9 @@ handle_monitor_start (void *cls, const struct
   {
     if ((GNUNET_SYSERR ==
          GNUNET_CRYPTO_read_private_key_from_buffer (&zis_msg[1],
-                                                       key_len,
-                                                       &zone,
-                                                       &kb_read)) ||
+                                                     key_len,
+                                                     &zone,
+                                                     &kb_read)) ||
         (kb_read != key_len))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -2594,6 +2661,7 @@ monitor_iteration_next (void *cls)
   }
 }
 
+
 /**
  * Handles a #GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_NEXT message
  *
@@ -2652,6 +2720,7 @@ handle_monitor_next (void *cls, const struct 
ZoneMonitorNextMessage *nm)
   }
 }
 
+
 /**
  * Process namestore requests.
  *
@@ -2710,14 +2779,18 @@ GNUNET_SERVICE_MAIN (
   &client_connect_cb,
   &client_disconnect_cb,
   NULL,
-  GNUNET_MQ_hd_fixed_size (tx_control,
-                           GNUNET_MESSAGE_TYPE_NAMESTORE_TX_CONTROL,
-                           struct TxControlMessage,
-                           NULL),
   GNUNET_MQ_hd_var_size (record_store,
                          GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE,
                          struct RecordStoreMessage,
                          NULL),
+  GNUNET_MQ_hd_var_size (edit_record_set,
+                         GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT,
+                         struct EditRecordSetMessage,
+                         NULL),
+  GNUNET_MQ_hd_var_size (edit_record_set_cancel,
+                         GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_CANCEL,
+                         struct EditRecordSetCancelMessage,
+                         NULL),
   GNUNET_MQ_hd_var_size (record_lookup,
                          GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP,
                          struct LabelLookupMessage,
diff --git a/src/service/namestore/meson.build 
b/src/service/namestore/meson.build
index d4fc9579a..62512c405 100644
--- a/src/service/namestore/meson.build
+++ b/src/service/namestore/meson.build
@@ -64,6 +64,10 @@ configure_file(copy: true,
                input: 'test_namestore_api_sqlite.conf',
                output: 'test_namestore_api_sqlite.conf')
 
+configure_file(copy: true,
+               input: 'test_namestore_api_postgres.conf',
+               output: 'test_namestore_api_postgres.conf')
+
 namestoreapitestnames = [
   'test_namestore_api_lookup_nick',
   'test_namestore_api_monitoring',
@@ -72,12 +76,12 @@ namestoreapitestnames = [
   'test_namestore_api_remove_not_existing_record',
   'test_namestore_api_store',
   'test_namestore_api_store_update',
-  'test_namestore_api_tx_rollback',
   'test_namestore_api_zone_iteration',
   'test_namestore_api_zone_iteration_nick',
   'test_namestore_api_zone_iteration_specific_zone',
   'test_namestore_api_zone_iteration_stop',
-  'test_namestore_api_zone_to_name'
+  'test_namestore_api_zone_to_name',
+  'test_namestore_api_edit_records'
   ]
 
 if get_option('experimental')
@@ -109,7 +113,7 @@ foreach tn : namestoreapitestnames
                 libgnunetnamestore_dep],
               include_directories: [incdir, configuration_inc],
               install: false)
-    test(tn + '_postgres', t, workdir: meson.current_build_dir(),
+    test(tn + '_postgres', t_pq, workdir: meson.current_build_dir(),
     is_parallel: false,
        suite: 'namestore')
   endif
diff --git a/src/service/namestore/namestore.h 
b/src/service/namestore/namestore.h
index 35d54d317..2ace6a83e 100644
--- a/src/service/namestore/namestore.h
+++ b/src/service/namestore/namestore.h
@@ -110,10 +110,10 @@ struct RecordStoreMessage
 /**
  * Response to a record storage request.
  */
-struct RecordStoreResponseMessage
+struct NamestoreResponseMessage
 {
   /**
-   * Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE
+   * Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_GENERIC_RESPONSE
    */
   struct GNUNET_NAMESTORE_Header gns_header;
 
@@ -124,6 +124,42 @@ struct RecordStoreResponseMessage
 
 };
 
+/**
+ * Response to RecordSetEditMessage.
+ */
+struct EditRecordSetResponseMessage
+{
+  /**
+   * Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_RESPONSE
+   */
+  struct GNUNET_NAMESTORE_Header gns_header;
+
+  /**
+   * Length of the editor hint
+   */
+  uint16_t editor_hint_len GNUNET_PACKED;
+
+  /**
+   * Reserved
+   */
+  uint16_t ec GNUNET_PACKED;
+
+  /**
+   * Length of serialized record data
+   */
+  uint16_t rd_len GNUNET_PACKED;
+
+  /**
+   * Number of records contained
+   */
+  uint16_t rd_count GNUNET_PACKED;
+
+  /**
+   * Followed by editor hint
+   * Followed by record set
+   */
+};
+
 
 /**
  * Lookup a label
@@ -141,9 +177,9 @@ struct LabelLookupMessage
   uint16_t label_len GNUNET_PACKED;
 
   /**
-   * GNUNET_YES if this lookup corresponds to an edit request
+   * Unused
    */
-  uint16_t is_edit_request GNUNET_PACKED;
+  uint16_t unused GNUNET_PACKED;
 
   /**
    * The record filter
@@ -161,6 +197,82 @@ struct LabelLookupMessage
    */
 };
 
+/**
+ * Edit a record set and set editor hint/advisory lock.
+ */
+struct EditRecordSetMessage
+{
+  /**
+   * Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_EDIT_RECORD_SET
+   */
+  struct GNUNET_NAMESTORE_Header gns_header;
+
+  /**
+   * Length of the name
+   */
+  uint16_t label_len GNUNET_PACKED;
+
+  /**
+   * Unused
+   */
+  uint16_t editor_hint_len GNUNET_PACKED;
+
+  /**
+   * Unused
+   */
+  uint16_t reserved GNUNET_PACKED;
+
+  /**
+   * Length of the zone key
+   */
+  uint16_t key_len GNUNET_PACKED;
+
+  /* followed by:
+   * the private zone key
+   * label with length label_len
+   * editor hint with length editor_hint_len
+   */
+};
+
+
+/**
+ * Edit a record set and set editor hint/advisory lock.
+ */
+struct EditRecordSetCancelMessage
+{
+  /**
+   * Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_EDIT_RECORD_SET_CANCEL
+   */
+  struct GNUNET_NAMESTORE_Header gns_header;
+
+  /**
+   * Length of the name
+   */
+  uint16_t label_len GNUNET_PACKED;
+
+  /**
+   * Unused
+   */
+  uint16_t editor_hint_len GNUNET_PACKED;
+
+  /**
+   * Unused
+   */
+  uint16_t editor_hint_replacement_len GNUNET_PACKED;
+
+  /**
+   * Length of the zone key
+   */
+  uint16_t key_len GNUNET_PACKED;
+
+  /* followed by:
+   * the private zone key
+   * label with length label_len
+   * editor hint with length editor_hint_len
+   * replacement editor hint with length editor_hint_replacement_len
+   */
+};
+
 
 /**
  * Lookup a label
diff --git a/src/service/namestore/namestore_api.c 
b/src/service/namestore/namestore_api.c
index 7a4438e30..45a15c39a 100644
--- a/src/service/namestore/namestore_api.c
+++ b/src/service/namestore/namestore_api.c
@@ -26,13 +26,9 @@
  * @author Christian Grothoff
  */
 
-#include "platform.h"
+#include "gnunet_protocols.h"
 #include "gnunet_error_codes.h"
 #include "gnunet_util_lib.h"
-#include "gnunet_constants.h"
-#include "gnunet_arm_service.h"
-#include "gnunet_signatures.h"
-#include "gnunet_gns_service.h"
 #include "gnunet_namestore_service.h"
 #include "namestore.h"
 
@@ -86,6 +82,11 @@ struct GNUNET_NAMESTORE_QueueEntry
    */
   GNUNET_NAMESTORE_RecordSetMonitor proc2;
 
+  /**
+   * Function to call with the records we get back including optional editor 
hint.
+   */
+  GNUNET_NAMESTORE_EditRecordSetBeginCallback edit_proc;
+
   /**
    * Closure for @e proc.
    */
@@ -355,16 +356,17 @@ check_rd (size_t rd_len, const void *rd_buf, unsigned int 
rd_count)
   return GNUNET_OK;
 }
 
+
 /**
  * Handle an incoming message of type
- * #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE
+ * #GNUNET_MESSAGE_TYPE_NAMESTORE_GENERIC_RESPONSE
  *
  * @param cls
  * @param msg the message we received
  */
 static void
-handle_record_store_response (void *cls,
-                              const struct RecordStoreResponseMessage *msg)
+handle_generic_response (void *cls,
+                         const struct NamestoreResponseMessage *msg)
 {
   struct GNUNET_NAMESTORE_Handle *h = cls;
   struct GNUNET_NAMESTORE_QueueEntry *qe;
@@ -373,8 +375,8 @@ handle_record_store_response (void *cls,
   qe = find_qe (h, ntohl (msg->gns_header.r_id));
   res = ntohl (msg->ec);
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Received RECORD_STORE_RESPONSE with result %d\n",
-       res);
+       "Received GENERIC_RESPONSE with result %s\n",
+       GNUNET_ErrorCode_get_hint(res));
   if (NULL == qe)
     return;
   if (NULL != qe->cont)
@@ -469,9 +471,9 @@ handle_lookup_result (void *cls, const struct 
LabelLookupResponseMessage *msg)
   key_len = ntohs (msg->key_len);
   GNUNET_assert (GNUNET_SYSERR !=
                  GNUNET_CRYPTO_read_private_key_from_buffer (&msg[1],
-                                                               key_len,
-                                                               &private_key,
-                                                               &kbytes_read));
+                                                             key_len,
+                                                             &private_key,
+                                                             &kbytes_read));
   GNUNET_assert (kbytes_read == key_len);
   name = (const char *) &msg[1] + key_len;
   if (GNUNET_NO == found)
@@ -510,6 +512,93 @@ handle_lookup_result (void *cls, const struct 
LabelLookupResponseMessage *msg)
 }
 
 
+/**
+ * Handle an incoming message of type
+ * #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_RESPONSE
+ *
+ * @param cls
+ * @param msg the message we received
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
+ */
+static int
+check_edit_record_set_response (void *cls, const struct
+                                EditRecordSetResponseMessage *msg)
+{
+  const char *editor_hint;
+  size_t msg_len;
+  size_t editor_hint_len;
+  size_t rd_len;
+
+  (void) cls;
+  rd_len = ntohs (msg->rd_len);
+  msg_len = ntohs (msg->gns_header.header.size);
+  editor_hint_len = ntohs (msg->editor_hint_len);
+  if (msg_len != sizeof(struct EditRecordSetResponseMessage) + editor_hint_len
+      + rd_len)
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  editor_hint = (const char *) &msg[1];
+  if ((0 == editor_hint_len) || ('\0' != editor_hint[editor_hint_len - 1]))
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  return check_rd (rd_len, &editor_hint[editor_hint_len], ntohs (
+                     msg->rd_count));
+}
+
+
+/**
+ * Handle an incoming message of type
+ * #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_RESPONSE
+ *
+ * @param cls
+ * @param msg the message we received
+ */
+static void
+handle_edit_record_set_response (void *cls, const struct
+                                 EditRecordSetResponseMessage *msg)
+{
+  struct GNUNET_NAMESTORE_Handle *h = cls;
+  struct GNUNET_NAMESTORE_QueueEntry *qe;
+  const char *editor_hint;
+  const char *rd_tmp;
+  size_t rd_len;
+  size_t editor_hint_len;
+  unsigned int rd_count;
+
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "Received EDIT_RECORD_SET_RESPONSE\n");
+  rd_len = ntohs (msg->rd_len);
+  rd_count = ntohs (msg->rd_count);
+  editor_hint_len = ntohs (msg->editor_hint_len);
+  qe = find_qe (h, ntohl (msg->gns_header.r_id));
+  if (NULL == qe)
+    return; /* rid not found */
+  editor_hint = (const char *) &msg[1];
+  rd_tmp = &editor_hint[editor_hint_len];
+  {
+    struct GNUNET_GNSRECORD_Data rd[rd_count];
+
+    GNUNET_assert (
+      GNUNET_OK ==
+      GNUNET_GNSRECORD_records_deserialize (rd_len, rd_tmp, rd_count, rd));
+    if (0 == editor_hint_len)
+      editor_hint = NULL;
+    if (NULL != qe->edit_proc)
+      qe->edit_proc (qe->proc_cls,
+                     ntohs (msg->ec),
+                     rd_count,
+                     (rd_count > 0) ? rd : NULL,
+                     editor_hint);
+    free_qe (qe);
+    return;
+  }
+  GNUNET_assert (0);
+}
+
+
 /**
  * Handle an incoming message of type
  * #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT
@@ -593,9 +682,9 @@ handle_record_result (void *cls, const struct 
RecordResultMessage *msg)
   name = (const char *) &msg[1] + key_len;
   GNUNET_assert (GNUNET_SYSERR !=
                  GNUNET_CRYPTO_read_private_key_from_buffer (&msg[1],
-                                                               key_len,
-                                                               &private_key,
-                                                               &kbytes_read));
+                                                             key_len,
+                                                             &private_key,
+                                                             &kbytes_read));
   GNUNET_assert (kbytes_read == key_len);
   rd_tmp = &name[name_len];
   {
@@ -674,25 +763,6 @@ handle_record_result_end (void *cls, const struct 
GNUNET_NAMESTORE_Header *msg)
   free_ze (ze);
 }
 
-static void
-handle_tx_control_result (void *cls,
-                          const struct TxControlResultMessage *msg)
-{
-  struct GNUNET_NAMESTORE_Handle *h = cls;
-  struct GNUNET_NAMESTORE_QueueEntry *qe;
-  enum GNUNET_ErrorCode res;
-
-  qe = find_qe (h, ntohl (msg->gns_header.r_id));
-  res = ntohs (msg->ec);
-  LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Received TX_CONTROL_RESULT with result %d\n",
-       res);
-  if (NULL == qe)
-    return;
-  if (NULL != qe->cont)
-    qe->cont (qe->cont_cls, res);
-  free_qe (qe);
-}
 
 /**
  * Handle an incoming message of type
@@ -769,9 +839,9 @@ handle_zone_to_name_response (void *cls,
   key_len = ntohs (msg->key_len);
   GNUNET_assert (GNUNET_SYSERR !=
                  GNUNET_CRYPTO_read_private_key_from_buffer (&msg[1],
-                                                               key_len,
-                                                               &zone,
-                                                               &kbytes_read));
+                                                             key_len,
+                                                             &zone,
+                                                             &kbytes_read));
   GNUNET_assert (kbytes_read == key_len);
   switch (res)
   {
@@ -849,9 +919,9 @@ static void
 reconnect (struct GNUNET_NAMESTORE_Handle *h)
 {
   struct GNUNET_MQ_MessageHandler handlers[] =
-  { GNUNET_MQ_hd_fixed_size (record_store_response,
-                             
GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE,
-                             struct RecordStoreResponseMessage,
+  { GNUNET_MQ_hd_fixed_size (generic_response,
+                             GNUNET_MESSAGE_TYPE_NAMESTORE_GENERIC_RESPONSE,
+                             struct NamestoreResponseMessage,
                              h),
     GNUNET_MQ_hd_var_size (zone_to_name_response,
                            GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE,
@@ -869,10 +939,10 @@ reconnect (struct GNUNET_NAMESTORE_Handle *h)
                            
GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP_RESPONSE,
                            struct LabelLookupResponseMessage,
                            h),
-    GNUNET_MQ_hd_fixed_size (tx_control_result,
-                             GNUNET_MESSAGE_TYPE_NAMESTORE_TX_CONTROL_RESULT,
-                             struct TxControlResultMessage,
-                             h),
+    GNUNET_MQ_hd_var_size (edit_record_set_response,
+                           
GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_RESPONSE,
+                           struct EditRecordSetResponseMessage,
+                           h),
     GNUNET_MQ_handler_end () };
   struct GNUNET_NAMESTORE_ZoneIterator *it;
   struct GNUNET_NAMESTORE_QueueEntry *qe;
@@ -1048,7 +1118,7 @@ warn_delay (void *cls)
 
 
 struct GNUNET_NAMESTORE_QueueEntry *
-GNUNET_NAMESTORE_records_store (
+GNUNET_NAMESTORE_record_set_store (
   struct GNUNET_NAMESTORE_Handle *h,
   const struct GNUNET_CRYPTO_PrivateKey *pkey,
   const char *label,
@@ -1062,12 +1132,13 @@ GNUNET_NAMESTORE_records_store (
   ri.a_label = label;
   ri.a_rd_count = rd_count;
   ri.a_rd = (struct GNUNET_GNSRECORD_Data *) rd;
-  return GNUNET_NAMESTORE_records_store2 (h, pkey, 1, &ri, &rds_sent,
-                                          cont, cont_cls);
+  return GNUNET_NAMESTORE_records_store (h, pkey, 1, &ri, &rds_sent,
+                                         cont, cont_cls);
 }
 
+
 struct GNUNET_NAMESTORE_QueueEntry *
-GNUNET_NAMESTORE_records_store2 (
+GNUNET_NAMESTORE_records_store (
   struct GNUNET_NAMESTORE_Handle *h,
   const struct GNUNET_CRYPTO_PrivateKey *pkey,
   unsigned int rd_set_count,
@@ -1147,8 +1218,8 @@ GNUNET_NAMESTORE_records_store2 (
   msg->key_len = htons (key_len);
   msg->rd_set_count = htons ((uint16_t) (*rds_sent));
   GNUNET_CRYPTO_write_private_key_to_buffer (pkey,
-                                               &msg[1],
-                                               key_len);
+                                             &msg[1],
+                                             key_len);
   rd_set = (struct RecordSet*) (((char*) &msg[1]) + key_len);
   for (int i = 0; i < *rds_sent; i++)
   {
@@ -1201,7 +1272,6 @@ records_lookup (
   void *error_cb_cls,
   GNUNET_NAMESTORE_RecordMonitor rm,
   void *rm_cls,
-  int is_edit_request,
   enum GNUNET_GNSRECORD_Filter filter)
 {
   struct GNUNET_NAMESTORE_QueueEntry *qe;
@@ -1231,11 +1301,10 @@ records_lookup (
                              GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP);
   msg->gns_header.r_id = htonl (qe->op_id);
   GNUNET_CRYPTO_write_private_key_to_buffer (pkey,
-                                               &msg[1],
-                                               key_len);
+                                             &msg[1],
+                                             key_len);
 
   msg->key_len = htons (key_len);
-  msg->is_edit_request = htons (is_edit_request);
   msg->label_len = htons (label_len);
   msg->filter = htons (filter);
   GNUNET_memcpy (((char*) &msg[1]) + key_len, label, label_len);
@@ -1246,6 +1315,7 @@ records_lookup (
   return qe;
 }
 
+
 struct GNUNET_NAMESTORE_QueueEntry *
 GNUNET_NAMESTORE_records_lookup (
   struct GNUNET_NAMESTORE_Handle *h,
@@ -1258,10 +1328,11 @@ GNUNET_NAMESTORE_records_lookup (
 {
   return records_lookup (h, pkey, label,
                          error_cb, error_cb_cls,
-                         rm, rm_cls, GNUNET_NO, GNUNET_GNSRECORD_FILTER_NONE);
+                         rm, rm_cls, GNUNET_GNSRECORD_FILTER_NONE);
 
 }
 
+
 struct GNUNET_NAMESTORE_QueueEntry *
 GNUNET_NAMESTORE_records_lookup2 (
   struct GNUNET_NAMESTORE_Handle *h,
@@ -1275,26 +1346,11 @@ GNUNET_NAMESTORE_records_lookup2 (
 {
   return records_lookup (h, pkey, label,
                          error_cb, error_cb_cls,
-                         rm, rm_cls, GNUNET_NO, filter);
+                         rm, rm_cls, filter);
 
 }
 
 
-struct GNUNET_NAMESTORE_QueueEntry *
-GNUNET_NAMESTORE_records_edit (
-  struct GNUNET_NAMESTORE_Handle *h,
-  const struct GNUNET_CRYPTO_PrivateKey *pkey,
-  const char *label,
-  GNUNET_SCHEDULER_TaskCallback error_cb,
-  void *error_cb_cls,
-  GNUNET_NAMESTORE_RecordMonitor rm,
-  void *rm_cls)
-{
-  return records_lookup (h, pkey, label,
-                         error_cb, error_cb_cls,
-                         rm, rm_cls, GNUNET_YES, GNUNET_GNSRECORD_FILTER_NONE);
-}
-
 struct GNUNET_NAMESTORE_QueueEntry *
 GNUNET_NAMESTORE_zone_to_name (
   struct GNUNET_NAMESTORE_Handle *h,
@@ -1331,8 +1387,8 @@ GNUNET_NAMESTORE_zone_to_name (
   msg->pkey_len = htons (pkey_len);
   GNUNET_CRYPTO_write_private_key_to_buffer (zone, &msg[1], key_len);
   GNUNET_CRYPTO_write_public_key_to_buffer (value_zone,
-                                              (char*) &msg[1] + key_len,
-                                              pkey_len);
+                                            (char*) &msg[1] + key_len,
+                                            pkey_len);
   if (NULL == h->mq)
     qe->env = env;
   else
@@ -1389,6 +1445,7 @@ GNUNET_NAMESTORE_zone_iteration_start (
   return it;
 }
 
+
 struct GNUNET_NAMESTORE_ZoneIterator *
 GNUNET_NAMESTORE_zone_iteration_start2 (
   struct GNUNET_NAMESTORE_Handle *h,
@@ -1494,69 +1551,124 @@ GNUNET_NAMESTORE_cancel (struct 
GNUNET_NAMESTORE_QueueEntry *qe)
   free_qe (qe);
 }
 
+
 /**
  * New API draft. Experimental
  */
 
-static struct GNUNET_NAMESTORE_QueueEntry *
-send_transaction_control_msg (struct GNUNET_NAMESTORE_Handle *h,
-                              GNUNET_NAMESTORE_ContinuationWithStatus cont,
-                              void *cont_cls,
-                              enum GNUNET_NAMESTORE_TxControl ctrl)
+struct GNUNET_NAMESTORE_QueueEntry *
+GNUNET_NAMESTORE_record_set_edit_begin (struct GNUNET_NAMESTORE_Handle *h,
+                                        const struct
+                                        GNUNET_CRYPTO_PrivateKey *pkey,
+                                        const char *label,
+                                        const char *editor_hint,
+                                        
GNUNET_NAMESTORE_EditRecordSetBeginCallback
+                                        edit_cb,
+                                        void *edit_cb_cls)
 {
   struct GNUNET_NAMESTORE_QueueEntry *qe;
   struct GNUNET_MQ_Envelope *env;
-  struct TxControlMessage *msg;
-  uint32_t rid;
+  struct EditRecordSetMessage *msg;
+  size_t label_len;
+  size_t key_len;
+  size_t editor_hint_len;
 
-  rid = get_op_id (h);
+  if (1 == (label_len = strlen (label) + 1))
+  {
+    GNUNET_break (0);
+    return NULL;
+  }
+  GNUNET_assert (editor_hint != NULL);
+  editor_hint_len = strlen (editor_hint) + 1;
   qe = GNUNET_new (struct GNUNET_NAMESTORE_QueueEntry);
   qe->h = h;
-  qe->cont = cont;
-  qe->cont_cls = cont_cls;
-  qe->op_id = rid;
+  qe->edit_proc = edit_cb;
+  qe->proc_cls = edit_cb_cls;
+  qe->op_id = get_op_id (h);
   GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, qe);
 
-  env = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_NAMESTORE_TX_CONTROL);
-  msg->gns_header.r_id = htonl (rid);
-  msg->control = htons (ctrl);
+  key_len = GNUNET_CRYPTO_private_key_get_length (pkey);
+  env = GNUNET_MQ_msg_extra (msg,
+                             label_len +  key_len + editor_hint_len,
+                             GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT);
+  msg->gns_header.r_id = htonl (qe->op_id);
+  GNUNET_CRYPTO_write_private_key_to_buffer (pkey,
+                                             &msg[1],
+                                             key_len);
+
+  msg->key_len = htons (key_len);
+  msg->label_len = htons (label_len);
+  msg->editor_hint_len = htons (editor_hint_len);
+  GNUNET_memcpy (((char*) &msg[1]) + key_len, label, label_len);
+  GNUNET_memcpy (((char*) &msg[1]) + key_len + label_len, editor_hint,
+                 editor_hint_len);
   if (NULL == h->mq)
     qe->env = env;
   else
     GNUNET_MQ_send (h->mq, env);
   return qe;
-  GNUNET_break (0);
-  return NULL;
 }
 
-struct GNUNET_NAMESTORE_QueueEntry *
-GNUNET_NAMESTORE_transaction_begin (struct GNUNET_NAMESTORE_Handle *h,
-                                    GNUNET_NAMESTORE_ContinuationWithStatus 
cont,
-                                    void *cont_cls)
-{
-  return send_transaction_control_msg (h, cont, cont_cls,
-                                       GNUNET_NAMESTORE_TX_BEGIN);
-}
 
 struct GNUNET_NAMESTORE_QueueEntry *
-GNUNET_NAMESTORE_transaction_commit (struct GNUNET_NAMESTORE_Handle *h,
-                                     GNUNET_NAMESTORE_ContinuationWithStatus
-                                     cont,
-                                     void *cont_cls)
+GNUNET_NAMESTORE_record_set_edit_cancel (struct GNUNET_NAMESTORE_Handle *h,
+                                         const struct
+                                         GNUNET_CRYPTO_PrivateKey *pkey,
+                                         const char *label,
+                                         const char *editor_hint,
+                                         const char *editor_hint_replacement,
+                                         
GNUNET_NAMESTORE_ContinuationWithStatus finished_cb,
+                                         void *finished_cls)
 {
-  return send_transaction_control_msg (h, cont, cont_cls,
-                                       GNUNET_NAMESTORE_TX_COMMIT);
-}
+  struct GNUNET_NAMESTORE_QueueEntry *qe;
+  struct GNUNET_MQ_Envelope *env;
+  struct EditRecordSetCancelMessage *msg;
+  size_t label_len;
+  size_t key_len;
+  size_t editor_hint_len;
+  size_t editor_hint_replacement_len;
 
+  if (1 == (label_len = strlen (label) + 1))
+  {
+    GNUNET_break (0);
+    return NULL;
+  }
+  GNUNET_assert (editor_hint != NULL);
+  editor_hint_len = strlen (editor_hint) + 1;
+  GNUNET_assert (editor_hint != NULL);
+  editor_hint_replacement_len = strlen (editor_hint_replacement) + 1;
+  qe = GNUNET_new (struct GNUNET_NAMESTORE_QueueEntry);
+  qe->h = h;
+  qe->op_id = get_op_id (h);
+  qe->cont = finished_cb;
+  qe->cont_cls = finished_cls;
+  GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, qe);
 
-struct GNUNET_NAMESTORE_QueueEntry *
-GNUNET_NAMESTORE_transaction_rollback (struct GNUNET_NAMESTORE_Handle *h,
-                                       GNUNET_NAMESTORE_ContinuationWithStatus
-                                       cont,
-                                       void *cont_cls)
-{
-  return send_transaction_control_msg (h, cont, cont_cls,
-                                       GNUNET_NAMESTORE_TX_ROLLBACK);
+  key_len = GNUNET_CRYPTO_private_key_get_length (pkey);
+  env = GNUNET_MQ_msg_extra (msg,
+                             label_len +  key_len + editor_hint_len
+                             + editor_hint_replacement_len,
+                             
GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_CANCEL);
+  msg->gns_header.r_id = htonl (qe->op_id);
+  GNUNET_CRYPTO_write_private_key_to_buffer (pkey,
+                                             &msg[1],
+                                             key_len);
+
+  msg->key_len = htons (key_len);
+  msg->label_len = htons (label_len);
+  msg->editor_hint_len = htons (editor_hint_len);
+  msg->editor_hint_replacement_len = htons (editor_hint_replacement_len);
+  GNUNET_memcpy (((char*) &msg[1]) + key_len, label, label_len);
+  GNUNET_memcpy (((char*) &msg[1]) + key_len + label_len, editor_hint,
+                 editor_hint_len);
+  GNUNET_memcpy (((char*) &msg[1]) + key_len + label_len + editor_hint_len,
+                 editor_hint_replacement,
+                 editor_hint_replacement_len);
+  if (NULL == h->mq)
+    qe->env = env;
+  else
+    GNUNET_MQ_send (h->mq, env);
+  return qe;
 }
 
 
diff --git a/src/service/namestore/perf_namestore_api_import.c 
b/src/service/namestore/perf_namestore_api_import.c
index bf8093f43..faa75b5ab 100644
--- a/src/service/namestore/perf_namestore_api_import.c
+++ b/src/service/namestore/perf_namestore_api_import.c
@@ -22,10 +22,8 @@
  * @brief testcase for namestore: Import a lot of records
  * @author Martin Schanzenbach
  */
-#include "platform.h"
 #include "gnunet_namestore_service.h"
 #include "gnunet_testing_lib.h"
-#include "../service/namestore/namestore.h"
 
 #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT
 
@@ -148,31 +146,6 @@ create_record (unsigned int count)
 static void
 publish_records_single (void *cls);
 
-static void
-commit_cont (void *cls,
-             enum GNUNET_ErrorCode ec)
-{
-  struct GNUNET_TIME_Relative delay;
-
-  (void) cls;
-  qe = NULL;
-  if (GNUNET_EC_NONE != ec)
-  {
-    GNUNET_break (0);
-    GNUNET_SCHEDULER_shutdown ();
-    return;
-  }
-  single_put_pos++;
-  delay = GNUNET_TIME_absolute_get_duration (start);
-  fprintf (stdout,
-           "BULK-TX: Publishing %u records took %s\n",
-           TEST_RECORD_COUNT,
-           GNUNET_STRINGS_relative_time_to_string (delay,
-                                                   GNUNET_YES));
-  res = 0;
-  GNUNET_SCHEDULER_shutdown ();
-}
-
 static void
 publish_records_bulk_tx (void *cls);
 
@@ -181,6 +154,7 @@ static void
 put_cont_bulk_tx (void *cls,
                   enum GNUNET_ErrorCode ec)
 {
+  struct GNUNET_TIME_Relative delay;
   qe = NULL;
   if (GNUNET_EC_NONE != ec)
   {
@@ -190,7 +164,15 @@ put_cont_bulk_tx (void *cls,
   }
   if (bulk_count == TEST_RECORD_COUNT)
   {
-    qe = GNUNET_NAMESTORE_transaction_commit (nsh, commit_cont, NULL);
+    single_put_pos++;
+    delay = GNUNET_TIME_absolute_get_duration (start);
+    fprintf (stdout,
+             "BULK-TX: Publishing %u records took %s\n",
+             TEST_RECORD_COUNT,
+             GNUNET_STRINGS_relative_time_to_string (delay,
+                                                     GNUNET_YES));
+    res = 0;
+    GNUNET_SCHEDULER_shutdown ();
     return;
   }
   t = GNUNET_SCHEDULER_add_now (&publish_records_bulk_tx, NULL);
@@ -202,34 +184,18 @@ publish_records_bulk_tx (void *cls)
 {
   unsigned int sent_rds;
   t = NULL;
-  qe = GNUNET_NAMESTORE_records_store2 (nsh,
-                                        &privkey,
-                                        TEST_RECORD_COUNT - bulk_count,
-                                        &ri[bulk_count],
-                                        &sent_rds,
-                                        &put_cont_bulk_tx,
-                                        NULL);
+  qe = GNUNET_NAMESTORE_records_store (nsh,
+                                       &privkey,
+                                       TEST_RECORD_COUNT - bulk_count,
+                                       &ri[bulk_count],
+                                       &sent_rds,
+                                       &put_cont_bulk_tx,
+                                       NULL);
   bulk_count += sent_rds;
   GNUNET_assert (sent_rds != 0);
 }
 
 
-static void
-begin_cont (void *cls,
-            enum GNUNET_ErrorCode ec)
-{
-  unsigned int sent_rds;
-  qe = GNUNET_NAMESTORE_records_store2 (nsh,
-                                        &privkey,
-                                        TEST_RECORD_COUNT - bulk_count,
-                                        &ri[bulk_count],
-                                        &sent_rds,
-                                        &put_cont_bulk_tx,
-                                        NULL);
-  bulk_count += sent_rds;
-  GNUNET_assert (sent_rds != 0);
-}
-
 static void
 publish_records_bulk (void *cls);
 
@@ -238,6 +204,7 @@ put_cont_bulk (void *cls,
                enum GNUNET_ErrorCode ec)
 {
   struct GNUNET_TIME_Relative delay;
+  unsigned int sent_rds;
 
   (void) cls;
   qe = NULL;
@@ -258,7 +225,15 @@ put_cont_bulk (void *cls,
                                                      GNUNET_YES));
     start = GNUNET_TIME_absolute_get ();
     bulk_count = 0;
-    qe = GNUNET_NAMESTORE_transaction_begin (nsh, begin_cont, NULL);
+    qe = GNUNET_NAMESTORE_records_store (nsh,
+                                         &privkey,
+                                         TEST_RECORD_COUNT - bulk_count,
+                                         &ri[bulk_count],
+                                         &sent_rds,
+                                         &put_cont_bulk_tx,
+                                         NULL);
+    bulk_count += sent_rds;
+    GNUNET_assert (sent_rds != 0);
     return;
   }
   (void) cls;
@@ -272,19 +247,20 @@ put_cont_bulk (void *cls,
   t = GNUNET_SCHEDULER_add_now (&publish_records_bulk, NULL);
 }
 
+
 static void
 publish_records_bulk (void *cls)
 {
   static unsigned int sent_rds = 0;
   (void) cls;
   t = NULL;
-  qe = GNUNET_NAMESTORE_records_store2 (nsh,
-                                        &privkey,
-                                        TEST_RECORD_COUNT - bulk_count,
-                                        &ri[bulk_count],
-                                        &sent_rds,
-                                        &put_cont_bulk,
-                                        NULL);
+  qe = GNUNET_NAMESTORE_records_store (nsh,
+                                       &privkey,
+                                       TEST_RECORD_COUNT - bulk_count,
+                                       &ri[bulk_count],
+                                       &sent_rds,
+                                       &put_cont_bulk,
+                                       NULL);
   bulk_count += sent_rds;
   GNUNET_assert (sent_rds != 0);
 }
@@ -338,13 +314,13 @@ publish_records_single (void *cls)
                                                      GNUNET_YES));
     GNUNET_SCHEDULER_add_now (&publish_records_bulk, NULL);
   }
-  qe = GNUNET_NAMESTORE_records_store (nsh,
-                                       &privkey,
-                                       ri[single_put_pos].a_label,
-                                       ri[single_put_pos].a_rd_count,
-                                       ri[single_put_pos].a_rd,
-                                       &put_cont_single,
-                                       NULL);
+  qe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                          &privkey,
+                                          ri[single_put_pos].a_label,
+                                          ri[single_put_pos].a_rd_count,
+                                          ri[single_put_pos].a_rd,
+                                          &put_cont_single,
+                                          NULL);
 }
 
 
diff --git a/src/service/namestore/perf_namestore_api_zone_iteration.c 
b/src/service/namestore/perf_namestore_api_zone_iteration.c
index 1b669fdac..cc59ff4c7 100644
--- a/src/service/namestore/perf_namestore_api_zone_iteration.c
+++ b/src/service/namestore/perf_namestore_api_zone_iteration.c
@@ -22,10 +22,8 @@
  * @brief testcase for zone iteration functionality: iterate all zones
  * @author Christian Grothoff
  */
-#include "platform.h"
 #include "gnunet_namestore_service.h"
 #include "gnunet_testing_lib.h"
-#include "../service/namestore/namestore.h"
 
 #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT
 
@@ -316,12 +314,12 @@ publish_record (void *cls)
   GNUNET_asprintf (&label,
                    "l%u",
                    off);
-  qe = GNUNET_NAMESTORE_records_store (nsh,
-                                       &privkey,
-                                       label,
-                                       1, rd,
-                                       &put_cont,
-                                       NULL);
+  qe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                          &privkey,
+                                          label,
+                                          1, rd,
+                                          &put_cont,
+                                          NULL);
   GNUNET_free (label);
   GNUNET_free (rd);
 }
diff --git a/src/service/namestore/test_namestore_api_edit_records.c 
b/src/service/namestore/test_namestore_api_edit_records.c
index 94b4f4fc1..02e821377 100644
--- a/src/service/namestore/test_namestore_api_edit_records.c
+++ b/src/service/namestore/test_namestore_api_edit_records.c
@@ -21,8 +21,9 @@
  * @file namestore/test_namestore_api_edit_records.c
  * @brief testcase for namestore_api.c: Multiple clients work with record set.
  */
-#include "platform.h"
+#include "gnunet_error_codes.h"
 #include "gnunet_namestore_service.h"
+#include "gnunet_scheduler_lib.h"
 #include "gnunet_testing_lib.h"
 
 #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT
@@ -50,8 +51,6 @@ static int removed;
 
 static struct GNUNET_NAMESTORE_QueueEntry *nsqe;
 
-static int nonce = 0;
-
 static void
 cleanup ()
 {
@@ -60,6 +59,11 @@ cleanup ()
     GNUNET_NAMESTORE_disconnect (nsh);
     nsh = NULL;
   }
+  if (NULL != nsh2)
+  {
+    GNUNET_NAMESTORE_disconnect (nsh2);
+    nsh2 = NULL;
+  }
   GNUNET_SCHEDULER_shutdown ();
 }
 
@@ -85,200 +89,65 @@ endbadly (void *cls)
 static void
 end (void *cls)
 {
+  if (endbadly_task != NULL)
+    GNUNET_SCHEDULER_cancel (endbadly_task);
   cleanup ();
   res = 0;
+  GNUNET_SCHEDULER_shutdown ();
 }
 
-static void
-lookup_it (void *cls,
-           const struct GNUNET_CRYPTO_PrivateKey *zone,
-           const char *label,
-           unsigned int rd_count,
-           const struct GNUNET_GNSRECORD_Data *rd)
-{
-  GNUNET_assert (0 == rd_count);
-  GNUNET_SCHEDULER_add_now (&end, NULL);
-}
 
 static void
-fail_cb (void *cls)
+cancel_done (void *cls, enum GNUNET_ErrorCode ec)
 {
-  if (endbadly_task != NULL)
-    GNUNET_SCHEDULER_cancel (endbadly_task);
-  endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL);
-  return;
-}
-
-static void
-remove_cont (void *cls,
-             enum GNUNET_ErrorCode ec)
-{
-  nsqe = NULL;
-  if (GNUNET_EC_NONE != ec)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                _ ("Unable to roll back: `%s'\n"),
-                GNUNET_ErrorCode_get_hint (ec));
-    if (NULL != endbadly_task)
-      GNUNET_SCHEDULER_cancel (endbadly_task);
-    endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly,
-                                              NULL);
-    return;
-  }
-  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-              "Rolled back, perform lookup\n");
-  removed = GNUNET_YES;
-  if (NULL != endbadly_task)
-    GNUNET_SCHEDULER_cancel (endbadly_task);
+  GNUNET_assert (GNUNET_EC_NONE == ec);
   GNUNET_SCHEDULER_add_now (&end, NULL);
 }
 
-static void
-fail_cb_lock (void *cls);
-
-static void
-edit_cont_b (void *cls,
-             const struct GNUNET_CRYPTO_PrivateKey *zone,
-             const char *label,
-             unsigned int rd_count,
-             const struct GNUNET_GNSRECORD_Data *rd)
-{
-  const char *name = cls;
-  /**
-   * We should probably never get here right at first.
-   * We may want to change the blocking of nsh2 so that we do get this
-   * eventually instead of the error callback above when locked.
-   */
-  if (0 == nonce)
-  {
-    if (endbadly_task != NULL)
-      GNUNET_SCHEDULER_cancel (endbadly_task);
-    endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL);
-    return;
-
-  }
-  /* Abort transaction for B */
-  nsqe = GNUNET_NAMESTORE_transaction_rollback (nsh2, remove_cont,
-                                                (void *) name);
-}
-
-
-static void
-commit_cont_a (void *cls,
-               enum GNUNET_ErrorCode ec)
-{
-  const char *name = cls;
-
-  GNUNET_assert (NULL != cls);
-  nsqe = NULL;
-  if (GNUNET_EC_NONE != ec)
-  {
-    GNUNET_break (0);
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Namestore could not store record: `%s'\n",
-                GNUNET_ErrorCode_get_hint (ec));
-    if (endbadly_task != NULL)
-      GNUNET_SCHEDULER_cancel (endbadly_task);
-    endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL);
-    return;
-  }
-
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Name store added record for `%s': %s\n",
-              name,
-              (GNUNET_EC_NONE == ec) ? "SUCCESS" : "FAIL");
-  /**
-   * Try again for B
-   */
-  nsqe = GNUNET_NAMESTORE_records_edit (nsh2,
-                                        &privkey,
-                                        name,
-                                        &fail_cb_lock,
-                                        (void *) name,
-                                        &edit_cont_b,
-                                        (void *) name);
-
-  GNUNET_assert (NULL != nsqe);
-}
-
-static void
-fail_cb_lock (void *cls)
-{
-  const char *name = cls;
-  if (1 == nonce)
-  {
-    if (endbadly_task != NULL)
-      GNUNET_SCHEDULER_cancel (endbadly_task);
-    endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL);
-    return;
-  }
-  nonce = 1;
-  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-              "Failed to aquire additional lock\n");
-  /* Now, we stop the transaction for B */
-  nsqe = GNUNET_NAMESTORE_transaction_commit (nsh, commit_cont_a,
-                                              (void *) name);
-}
-
 
 static void
 begin_cont_b (void *cls,
-              enum GNUNET_ErrorCode ec)
+              enum GNUNET_ErrorCode ec,
+              unsigned int rd_count,
+              const struct
+              GNUNET_GNSRECORD_Data *rd,
+              const char *editor_hint)
 {
-  const char *name = cls;
+  char *name = cls;
 
   GNUNET_assert (GNUNET_EC_NONE == ec);
-  /** Now, we expect this to "hang" let's see how this behaves in practice. */
-  nsqe = GNUNET_NAMESTORE_records_edit (nsh2,
-                                        &privkey,
-                                        name,
-                                        &fail_cb_lock,
-                                        (void *) name,
-                                        &edit_cont_b,
-                                        (void *) name);
-
-  GNUNET_assert (NULL != nsqe);
-}
-
-
-static void
-edit_cont (void *cls,
-           const struct GNUNET_CRYPTO_PrivateKey *zone,
-           const char *label,
-           unsigned int rd_count,
-           const struct GNUNET_GNSRECORD_Data *rd)
-{
-  const char *name = cls;
-
-  GNUNET_assert (1 == rd_count);
-  /* Now, we start a transaction for B */
-  nsqe = GNUNET_NAMESTORE_transaction_begin (nsh2, begin_cont_b, (void *) 
name);
+  GNUNET_assert (0 != strcmp (editor_hint, "B"));
+  nsqe = GNUNET_NAMESTORE_record_set_edit_cancel (nsh2, &privkey, name, "A",
+                                                  "B", &cancel_done, name);
 }
 
 
 static void
 begin_cont (void *cls,
-            enum GNUNET_ErrorCode ec)
+            enum GNUNET_ErrorCode ec,
+            unsigned int rd_count,
+            const struct
+            GNUNET_GNSRECORD_Data *rd,
+            const char *editor_hint)
 {
-  const char *name = cls;
+  char *name = cls;
 
   GNUNET_assert (GNUNET_EC_NONE == ec);
-  nsqe = GNUNET_NAMESTORE_records_edit (nsh,
-                                        &privkey,
-                                        name,
-                                        &fail_cb,
-                                        (void *) name,
-                                        &edit_cont,
-                                        (void *) name);
-
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+              "records: `%u'\n",
+              rd_count);
+  GNUNET_assert (1 == rd_count);
+  nsqe = GNUNET_NAMESTORE_record_set_edit_begin (nsh2, &privkey, name, "B",
+                                                 &begin_cont_b, name);
   GNUNET_assert (NULL != nsqe);
 }
 
+
 static void
 preload_cont (void *cls,
               enum GNUNET_ErrorCode ec)
 {
-  const char *name = cls;
+  char *name = cls;
 
   GNUNET_assert (NULL != cls);
   nsqe = NULL;
@@ -299,7 +168,8 @@ preload_cont (void *cls,
               name,
               (GNUNET_EC_NONE == ec) ? "SUCCESS" : "FAIL");
   /* We start transaction for A */
-  nsqe = GNUNET_NAMESTORE_transaction_begin (nsh, begin_cont, (void *) name);
+  nsqe = GNUNET_NAMESTORE_record_set_edit_begin (nsh, &privkey, name, "A",
+                                                 &begin_cont, name);
 
 }
 
@@ -310,7 +180,7 @@ run (void *cls,
      struct GNUNET_TESTING_Peer *peer)
 {
   struct GNUNET_GNSRECORD_Data rd;
-  const char *name = "dummy";
+  char *name = "dummy";
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
                                                 &endbadly,
@@ -323,11 +193,12 @@ run (void *cls,
   privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY);
   GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key);
   GNUNET_CRYPTO_key_get_public (&privkey,
-                                  &pubkey);
+                                &pubkey);
 
   removed = GNUNET_NO;
 
-  rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us;
+  rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us
+                       + GNUNET_TIME_UNIT_DAYS.rel_value_us;
   rd.record_type = TEST_RECORD_TYPE;
   rd.data_size = TEST_RECORD_DATALEN;
   rd.data = GNUNET_malloc (TEST_RECORD_DATALEN);
@@ -335,36 +206,15 @@ run (void *cls,
   memset ((char *) rd.data,
           'a',
           TEST_RECORD_DATALEN);
-  nsqe = GNUNET_NAMESTORE_records_store (nsh,
-                                         &privkey,
-                                         name,
-                                         1,
-                                         &rd,
-                                         &preload_cont,
-                                         (void *) name);
+  nsqe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                            &privkey,
+                                            name,
+                                            1,
+                                            &rd,
+                                            &preload_cont,
+                                            (void *) name);
   GNUNET_assert (NULL != nsqe);
   GNUNET_free_nz ((void *) rd.data);
-
-  /*nsqe = GNUNET_NAMESTORE_transaction_commit (nsh, commit_cont);
-  nsqe = GNUNET_NAMESTORE_transaction_rollback (nsh, rollback_cont); Must also 
happen on disconnect
-  nsqe = GNUNET_NAMESTORE_records_edit (nsh,
-                                        &privkey,
-                                        name,
-                                        1,
-                                        &rd,
-                                        &edit_cont,
-                                        (void *) name);
-  nsqe = GNUNET_NAMESTORE_records_insert_bulk (nsh,
-                                               count,
-                                               &rd,
-                                               &
-  nsqe = GNUNET_NAMESTORE_records_store (nsh,
-                                         &privkey,
-                                         name,
-                                         1,
-                                         &rd,
-                                         &put_cont,
-                                         (void *) name);*/
   GNUNET_assert (NULL != nsqe);
 }
 
diff --git a/src/service/namestore/test_namestore_api_lookup_nick.c 
b/src/service/namestore/test_namestore_api_lookup_nick.c
index 22734baab..8b4799363 100644
--- a/src/service/namestore/test_namestore_api_lookup_nick.c
+++ b/src/service/namestore/test_namestore_api_lookup_nick.c
@@ -23,7 +23,6 @@
  */
 #include "platform.h"
 #include "gnunet_namestore_service.h"
-#include "gnunet_gns_service.h"
 #include "gnunet_testing_lib.h"
 
 #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT
@@ -269,11 +268,11 @@ nick_cont (void *cls, enum GNUNET_ErrorCode ec)
   rd_orig.flags = GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
   memset ((char *) rd_orig.data, 'a', TEST_RECORD_DATALEN);
 
-  nsqe = GNUNET_NAMESTORE_records_store (nsh, &privkey,
-                                         name,
-                                         1,
-                                         &rd_orig,
-                                         &put_cont, (void *) name);
+  nsqe = GNUNET_NAMESTORE_record_set_store (nsh, &privkey,
+                                            name,
+                                            1,
+                                            &rd_orig,
+                                            &put_cont, (void *) name);
 }
 
 
@@ -290,7 +289,7 @@ run (void *cls,
   privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY);
   GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key);
   GNUNET_CRYPTO_key_get_public (&privkey,
-                                      &pubkey);
+                                &pubkey);
 
   nsh = GNUNET_NAMESTORE_connect (cfg);
   GNUNET_break (NULL != nsh);
@@ -301,13 +300,13 @@ run (void *cls,
   rd.record_type = GNUNET_GNSRECORD_TYPE_NICK;
   rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
   rd.flags |= GNUNET_GNSRECORD_RF_PRIVATE;
-  nsqe = GNUNET_NAMESTORE_records_store (nsh,
-                                         &privkey,
-                                         GNUNET_GNS_EMPTY_LABEL_AT,
-                                         1,
-                                         &rd,
-                                         &nick_cont,
-                                         (void *) name);
+  nsqe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                            &privkey,
+                                            GNUNET_GNS_EMPTY_LABEL_AT,
+                                            1,
+                                            &rd,
+                                            &nick_cont,
+                                            (void *) name);
 
   if (NULL == nsqe)
   {
diff --git a/src/service/namestore/test_namestore_api_monitoring.c 
b/src/service/namestore/test_namestore_api_monitoring.c
index 0b879786c..016313148 100644
--- a/src/service/namestore/test_namestore_api_monitoring.c
+++ b/src/service/namestore/test_namestore_api_monitoring.c
@@ -21,10 +21,8 @@
  * @file namestore/test_namestore_api_monitoring.c
  * @brief testcase for zone monitoring functionality: monitor first, then add 
records
  */
-#include "platform.h"
 #include "gnunet_namestore_service.h"
 #include "gnunet_testing_lib.h"
-#include "../service/namestore/namestore.h"
 
 #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT
 
@@ -312,38 +310,38 @@ run (void *cls,
   GNUNET_asprintf (&s_name_3, "dummy3");
   s_rd_3 = create_record (1);
   GNUNET_assert (NULL != (ns_ops[2] =
-                            GNUNET_NAMESTORE_records_store (nsh,
-                                                            &privkey2,
-                                                            s_name_3,
-                                                            1,
-                                                            s_rd_3,
-                                                            &put_cont,
-                                                            s_name_3)));
+                            GNUNET_NAMESTORE_record_set_store (nsh,
+                                                               &privkey2,
+                                                               s_name_3,
+                                                               1,
+                                                               s_rd_3,
+                                                               &put_cont,
+                                                               s_name_3)));
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Created record 1\n");
   GNUNET_asprintf (&s_name_1, "dummy1");
   s_rd_1 = create_record (1);
   GNUNET_assert (NULL != (ns_ops[0] =
-                            GNUNET_NAMESTORE_records_store (nsh,
-                                                            &privkey,
-                                                            s_name_1,
-                                                            1,
-                                                            s_rd_1,
-                                                            &put_cont,
-                                                            s_name_1)));
+                            GNUNET_NAMESTORE_record_set_store (nsh,
+                                                               &privkey,
+                                                               s_name_1,
+                                                               1,
+                                                               s_rd_1,
+                                                               &put_cont,
+                                                               s_name_1)));
 
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 2 \n");
   GNUNET_asprintf (&s_name_2, "dummy2");
   s_rd_2 = create_record (1);
   GNUNET_assert (NULL != (ns_ops[1] =
-                            GNUNET_NAMESTORE_records_store (nsh,
-                                                            &privkey,
-                                                            s_name_2,
-                                                            1,
-                                                            s_rd_2,
-                                                            &put_cont,
-                                                            s_name_2)));
+                            GNUNET_NAMESTORE_record_set_store (nsh,
+                                                               &privkey,
+                                                               s_name_2,
+                                                               1,
+                                                               s_rd_2,
+                                                               &put_cont,
+                                                               s_name_2)));
 }
 
 
diff --git a/src/service/namestore/test_namestore_api_monitoring_existing.c 
b/src/service/namestore/test_namestore_api_monitoring_existing.c
index ff7e39504..84cdaaa70 100644
--- a/src/service/namestore/test_namestore_api_monitoring_existing.c
+++ b/src/service/namestore/test_namestore_api_monitoring_existing.c
@@ -21,10 +21,8 @@
  * @file namestore/test_namestore_api_monitoring_existing.c
  * @brief testcase for zone monitoring functionality: add records first, then 
monitor
  */
-#include "platform.h"
 #include "gnunet_namestore_service.h"
 #include "gnunet_testing_lib.h"
-#include "../service/namestore/namestore.h"
 
 #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT
 
@@ -326,38 +324,38 @@ run (void *cls,
   s_name_3 = "dummy3";
   s_rd_3 = create_record (1);
   GNUNET_assert (NULL != (ns_ops[2] =
-                            GNUNET_NAMESTORE_records_store (nsh,
-                                                            &privkey2,
-                                                            s_name_3,
-                                                            1,
-                                                            s_rd_3,
-                                                            &put_cont,
-                                                            (void *) 
s_name_3)));
+                            GNUNET_NAMESTORE_record_set_store (nsh,
+                                                               &privkey2,
+                                                               s_name_3,
+                                                               1,
+                                                               s_rd_3,
+                                                               &put_cont,
+                                                               (void *) 
s_name_3)));
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Created record 1\n");
   s_name_1 = "dummy1";
   s_rd_1 = create_record (1);
   GNUNET_assert (NULL != (ns_ops[0] =
-                            GNUNET_NAMESTORE_records_store (nsh,
-                                                            &privkey,
-                                                            s_name_1,
-                                                            1,
-                                                            s_rd_1,
-                                                            &put_cont,
-                                                            (void *) 
s_name_1)));
+                            GNUNET_NAMESTORE_record_set_store (nsh,
+                                                               &privkey,
+                                                               s_name_1,
+                                                               1,
+                                                               s_rd_1,
+                                                               &put_cont,
+                                                               (void *) 
s_name_1)));
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Created record 2 \n");
   s_name_2 = "dummy2";
   s_rd_2 = create_record (1);
   GNUNET_assert (NULL != (ns_ops[1] =
-                            GNUNET_NAMESTORE_records_store (nsh,
-                                                            &privkey,
-                                                            s_name_2,
-                                                            1,
-                                                            s_rd_2,
-                                                            &put_cont,
-                                                            (void *) 
s_name_2)));
+                            GNUNET_NAMESTORE_record_set_store (nsh,
+                                                               &privkey,
+                                                               s_name_2,
+                                                               1,
+                                                               s_rd_2,
+                                                               &put_cont,
+                                                               (void *) 
s_name_2)));
 }
 
 
diff --git a/src/service/namestore/test_namestore_api_remove.c 
b/src/service/namestore/test_namestore_api_remove.c
index 4efdb7efa..f096c6310 100644
--- a/src/service/namestore/test_namestore_api_remove.c
+++ b/src/service/namestore/test_namestore_api_remove.c
@@ -136,11 +136,11 @@ put_cont (void *cls,
               "Name store added record for `%s': %s\n",
               name,
               (GNUNET_EC_NONE == ec) ? "SUCCESS" : "FAIL");
-  nsqe = GNUNET_NAMESTORE_records_store (nsh,
-                                         &privkey,
-                                         name,
-                                         0, NULL,
-                                         &remove_cont, (void *) name);
+  nsqe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                            &privkey,
+                                            name,
+                                            0, NULL,
+                                            &remove_cont, (void *) name);
 }
 
 
@@ -158,7 +158,7 @@ run (void *cls,
   privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY);
   GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key);
   GNUNET_CRYPTO_key_get_public (&privkey,
-                                  &pubkey);
+                                &pubkey);
 
   removed = GNUNET_NO;
 
@@ -173,13 +173,13 @@ run (void *cls,
 
   nsh = GNUNET_NAMESTORE_connect (cfg);
   GNUNET_break (NULL != nsh);
-  nsqe = GNUNET_NAMESTORE_records_store (nsh,
-                                         &privkey,
-                                         name,
-                                         1,
-                                         &rd,
-                                         &put_cont,
-                                         (void *) name);
+  nsqe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                            &privkey,
+                                            name,
+                                            1,
+                                            &rd,
+                                            &put_cont,
+                                            (void *) name);
   if (NULL == nsqe)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
diff --git 
a/src/service/namestore/test_namestore_api_remove_not_existing_record.c 
b/src/service/namestore/test_namestore_api_remove_not_existing_record.c
index 4a21b0ff9..e6ddd8892 100644
--- a/src/service/namestore/test_namestore_api_remove_not_existing_record.c
+++ b/src/service/namestore/test_namestore_api_remove_not_existing_record.c
@@ -136,11 +136,11 @@ run (void *cls,
 
   nsh = GNUNET_NAMESTORE_connect (cfg);
   GNUNET_break (NULL != nsh);
-  nsqe = GNUNET_NAMESTORE_records_store (nsh,
-                                         &privkey,
-                                         name,
-                                         0, NULL,
-                                         &put_cont, (void *) name);
+  nsqe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                            &privkey,
+                                            name,
+                                            0, NULL,
+                                            &put_cont, (void *) name);
   if (NULL == nsqe)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/service/namestore/test_namestore_api_store.c 
b/src/service/namestore/test_namestore_api_store.c
index e7b87c28b..7e19fb79f 100644
--- a/src/service/namestore/test_namestore_api_store.c
+++ b/src/service/namestore/test_namestore_api_store.c
@@ -108,7 +108,7 @@ run (void *cls,
      struct GNUNET_TESTING_Peer *peer)
 {
   struct GNUNET_GNSRECORD_Data rd;
-  const char *name = "dummy.dummy.gnunet";
+  const char *name = "dummy";
 
   endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
                                                 &endbadly, NULL);
@@ -126,13 +126,13 @@ run (void *cls,
 
   nsh = GNUNET_NAMESTORE_connect (cfg);
   GNUNET_break (NULL != nsh);
-  nsqe = GNUNET_NAMESTORE_records_store (nsh,
-                                         &privkey,
-                                         name,
-                                         1,
-                                         &rd,
-                                         &put_cont,
-                                         (void *) name);
+  nsqe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                            &privkey,
+                                            name,
+                                            1,
+                                            &rd,
+                                            &put_cont,
+                                            (void *) name);
   if (NULL == nsqe)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/service/namestore/test_namestore_api_store_update.c 
b/src/service/namestore/test_namestore_api_store_update.c
index f2af41841..99bec23f9 100644
--- a/src/service/namestore/test_namestore_api_store_update.c
+++ b/src/service/namestore/test_namestore_api_store_update.c
@@ -101,7 +101,7 @@ put_cont (void *cls,
 static void
 lookup_success (void *cls,
                 const struct GNUNET_CRYPTO_PrivateKey *zone,
-                const char* label,
+                const char*label,
                 unsigned int rd_count,
                 const struct GNUNET_GNSRECORD_Data *rd)
 {
@@ -136,13 +136,13 @@ lookup_success (void *cls,
             TEST_RECORD_DATA2,
             TEST_RECORD_DATALEN2);
 
-    nsqe = GNUNET_NAMESTORE_records_store (nsh,
-                                           &privkey,
-                                           name,
-                                           1,
-                                           &rd_new,
-                                           &put_cont,
-                                           (void *) name);
+    nsqe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                              &privkey,
+                                              name,
+                                              1,
+                                              &rd_new,
+                                              &put_cont,
+                                              (void *) name);
     GNUNET_free_nz ((void*) rd_new.data);
     update_performed = GNUNET_YES;
   }
@@ -179,7 +179,7 @@ put_cont (void *cls,
                                           name,
                                           &endbadly,
                                           (void *) name,
-                                          & lookup_success,
+                                          &lookup_success,
                                           (void *) name);
 }
 
@@ -213,13 +213,13 @@ run (void *cls,
   nsh = GNUNET_NAMESTORE_connect (cfg);
   GNUNET_break (NULL != nsh);
 
-  nsqe = GNUNET_NAMESTORE_records_store (nsh,
-                                         &privkey,
-                                         name,
-                                         1,
-                                         &rd,
-                                         &put_cont,
-                                         (void *) name);
+  nsqe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                            &privkey,
+                                            name,
+                                            1,
+                                            &rd,
+                                            &put_cont,
+                                            (void *) name);
   if (NULL == nsqe)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/service/namestore/test_namestore_api_tx_rollback.c 
b/src/service/namestore/test_namestore_api_tx_rollback.c
deleted file mode 100644
index 0c334d374..000000000
--- a/src/service/namestore/test_namestore_api_tx_rollback.c
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
-     This file is part of GNUnet.
-     Copyright (C) 2022 GNUnet e.V.
-
-     GNUnet is free software: you can redistribute it and/or modify it
-     under the terms of the GNU Affero General Public License as published
-     by the Free Software Foundation, either version 3 of the License,
-     or (at your option) any later version.
-
-     GNUnet is distributed in the hope that it will be useful, but
-     WITHOUT ANY WARRANTY; without even the implied warranty of
-     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-     Affero General Public License for more details.
-
-     You should have received a copy of the GNU Affero General Public License
-     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-     SPDX-License-Identifier: AGPL3.0-or-later
- */
-/**
- * @file namestore/test_namestore_api_tx_rollback.c
- * @brief testcase for namestore_api_tx_rollback.c to: rollback changes in TX
- */
-#include "platform.h"
-#include "gnunet_namestore_service.h"
-#include "gnunet_testing_lib.h"
-
-#define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT
-
-#define TEST_RECORD_DATALEN 123
-
-#define TEST_RECORD_DATA 'a'
-
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100)
-
-
-static struct GNUNET_NAMESTORE_Handle *nsh;
-
-static struct GNUNET_SCHEDULER_Task *endbadly_task;
-
-static struct GNUNET_CRYPTO_PrivateKey privkey;
-
-static struct GNUNET_CRYPTO_PublicKey pubkey;
-
-static int res;
-
-static int removed;
-
-static struct GNUNET_NAMESTORE_QueueEntry *nsqe;
-
-
-static void
-cleanup ()
-{
-  if (NULL != nsh)
-  {
-    GNUNET_NAMESTORE_disconnect (nsh);
-    nsh = NULL;
-  }
-  GNUNET_SCHEDULER_shutdown ();
-}
-
-
-/**
- * Re-establish the connection to the service.
- *
- * @param cls handle to use to re-connect.
- */
-static void
-endbadly (void *cls)
-{
-  if (NULL != nsqe)
-  {
-    GNUNET_NAMESTORE_cancel (nsqe);
-    nsqe = NULL;
-  }
-  cleanup ();
-  res = 1;
-}
-
-
-static void
-end (void *cls)
-{
-  cleanup ();
-  res = 0;
-}
-
-static void
-lookup_it (void *cls,
-           const struct GNUNET_CRYPTO_PrivateKey *zone,
-           const char *label,
-           unsigned int rd_count,
-           const struct GNUNET_GNSRECORD_Data *rd)
-{
-  GNUNET_assert (0 == rd_count);
-  GNUNET_SCHEDULER_add_now (&end, NULL);
-}
-
-static void
-fail_cb (void *cls)
-{
-  GNUNET_assert (0);
-}
-
-static void
-remove_cont (void *cls,
-             enum GNUNET_ErrorCode ec)
-{
-  nsqe = NULL;
-  if (GNUNET_EC_NONE != ec)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                _ ("Unable to roll back: `%s'\n"),
-                GNUNET_ErrorCode_get_hint (ec));
-    if (NULL != endbadly_task)
-      GNUNET_SCHEDULER_cancel (endbadly_task);
-    endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly,
-                                              NULL);
-    return;
-  }
-  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-              "Rolled back, perform lookup\n");
-  removed = GNUNET_YES;
-  if (NULL != endbadly_task)
-    GNUNET_SCHEDULER_cancel (endbadly_task);
-  /* FIXME not actually doing lookup here */
-  nsqe = GNUNET_NAMESTORE_records_lookup (nsh,
-                                          &privkey,
-                                          (char*) cls,
-                                          &fail_cb,
-                                          NULL,
-                                          &lookup_it,
-                                          NULL);
-}
-
-
-static void
-put_cont (void *cls,
-          enum GNUNET_ErrorCode ec)
-{
-  const char *name = cls;
-
-  GNUNET_assert (NULL != cls);
-  nsqe = NULL;
-  if (GNUNET_EC_NONE != ec)
-  {
-    GNUNET_break (0);
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Namestore could not store record: `%s'\n",
-                GNUNET_ErrorCode_get_hint (ec));
-    if (endbadly_task != NULL)
-      GNUNET_SCHEDULER_cancel (endbadly_task);
-    endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL);
-    return;
-  }
-
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Name store added record for `%s': %s\n",
-              name,
-              (GNUNET_EC_NONE == ec) ? "SUCCESS" : "FAIL");
-  nsqe = GNUNET_NAMESTORE_transaction_rollback (nsh, remove_cont,
-                                                (void *) name);
-}
-
-static void
-begin_cont (void *cls,
-            enum GNUNET_ErrorCode ec)
-{
-  struct GNUNET_GNSRECORD_Data rd;
-  const char *name = cls;
-
-  GNUNET_assert (GNUNET_EC_NONE == ec);
-  privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY);
-  GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key);
-  GNUNET_CRYPTO_key_get_public (&privkey,
-                                  &pubkey);
-
-  removed = GNUNET_NO;
-
-  rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us;
-  rd.record_type = TEST_RECORD_TYPE;
-  rd.data_size = TEST_RECORD_DATALEN;
-  rd.data = GNUNET_malloc (TEST_RECORD_DATALEN);
-  rd.flags = 0;
-  memset ((char *) rd.data,
-          'a',
-          TEST_RECORD_DATALEN);
-  nsqe = GNUNET_NAMESTORE_records_store (nsh,
-                                         &privkey,
-                                         name,
-                                         1,
-                                         &rd,
-                                         &put_cont,
-                                         (void *) name);
-  GNUNET_assert (NULL != nsqe);
-  GNUNET_free_nz ((void *) rd.data);
-}
-
-static void
-run (void *cls,
-     const struct GNUNET_CONFIGURATION_Handle *cfg,
-     struct GNUNET_TESTING_Peer *peer)
-{
-  const char *name = "dummy";
-
-  endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
-                                                &endbadly,
-                                                NULL);
-  nsh = GNUNET_NAMESTORE_connect (cfg);
-  GNUNET_break (NULL != nsh);
-  nsqe = GNUNET_NAMESTORE_transaction_begin (nsh, begin_cont, (void *) name);
-  /*nsqe = GNUNET_NAMESTORE_transaction_commit (nsh, commit_cont);
-  nsqe = GNUNET_NAMESTORE_transaction_rollback (nsh, rollback_cont); Must also 
happen on disconnect
-  nsqe = GNUNET_NAMESTORE_records_edit (nsh,
-                                        &privkey,
-                                        name,
-                                        1,
-                                        &rd,
-                                        &edit_cont,
-                                        (void *) name);
-  nsqe = GNUNET_NAMESTORE_records_insert_bulk (nsh,
-                                               count,
-                                               &rd,
-                                               &
-  nsqe = GNUNET_NAMESTORE_records_store (nsh,
-                                         &privkey,
-                                         name,
-                                         1,
-                                         &rd,
-                                         &put_cont,
-                                         (void *) name);*/
-  GNUNET_assert (NULL != nsqe);
-}
-
-
-#include "test_common.c"
-
-
-int
-main (int argc, char *argv[])
-{
-  char *plugin_name;
-  char *cfg_name;
-
-  SETUP_CFG (plugin_name, cfg_name);
-  res = 1;
-  if (0 !=
-      GNUNET_TESTING_peer_run ("test-namestore-api-remove",
-                               cfg_name,
-                               &run,
-                               NULL))
-  {
-    res = 1;
-  }
-  GNUNET_DISK_purge_cfg_dir (cfg_name,
-                             "GNUNET_TEST_HOME");
-  GNUNET_free (plugin_name);
-  GNUNET_free (cfg_name);
-  return res;
-}
-
-
-/* end of test_namestore_api_remove.c */
diff --git a/src/service/namestore/test_namestore_api_zone_iteration.c 
b/src/service/namestore/test_namestore_api_zone_iteration.c
index 403a49a23..3147661a7 100644
--- a/src/service/namestore/test_namestore_api_zone_iteration.c
+++ b/src/service/namestore/test_namestore_api_zone_iteration.c
@@ -370,34 +370,34 @@ empty_zone_end (void *cls)
 
   GNUNET_asprintf (&s_name_1, "dummy1");
   s_rd_1 = create_record (1);
-  GNUNET_NAMESTORE_records_store (nsh,
-                                  &privkey,
-                                  s_name_1,
-                                  1, s_rd_1,
-                                  &put_cont,
-                                  NULL);
+  GNUNET_NAMESTORE_record_set_store (nsh,
+                                     &privkey,
+                                     s_name_1,
+                                     1, s_rd_1,
+                                     &put_cont,
+                                     NULL);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Created record 2 \n");
   GNUNET_asprintf (&s_name_2, "dummy2");
   s_rd_2 = create_record (1);
-  GNUNET_NAMESTORE_records_store (nsh,
-                                  &privkey,
-                                  s_name_2,
-                                  1, s_rd_2,
-                                  &put_cont,
-                                  NULL);
+  GNUNET_NAMESTORE_record_set_store (nsh,
+                                     &privkey,
+                                     s_name_2,
+                                     1, s_rd_2,
+                                     &put_cont,
+                                     NULL);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Created record 3\n");
   /* name in different zone */
   GNUNET_asprintf (&s_name_3, "dummy3");
   s_rd_3 = create_record (1);
-  GNUNET_NAMESTORE_records_store (nsh,
-                                  &privkey2,
-                                  s_name_3,
-                                  1,
-                                  s_rd_3,
-                                  &put_cont,
-                                  NULL);
+  GNUNET_NAMESTORE_record_set_store (nsh,
+                                     &privkey2,
+                                     s_name_3,
+                                     1,
+                                     s_rd_3,
+                                     &put_cont,
+                                     NULL);
 }
 
 
diff --git a/src/service/namestore/test_namestore_api_zone_iteration_nick.c 
b/src/service/namestore/test_namestore_api_zone_iteration_nick.c
index 1ca7b3559..29c5ee70f 100644
--- a/src/service/namestore/test_namestore_api_zone_iteration_nick.c
+++ b/src/service/namestore/test_namestore_api_zone_iteration_nick.c
@@ -23,7 +23,6 @@
  */
 #include "platform.h"
 #include "gnunet_namestore_service.h"
-#include "gnunet_gns_service.h"
 #include "gnunet_testing_lib.h"
 #include "../service/namestore/namestore.h"
 
@@ -282,16 +281,16 @@ nick_2_cont (void *cls,
 
   GNUNET_asprintf (&s_name_1, "dummy1");
   s_rd_1 = create_record (1);
-  GNUNET_NAMESTORE_records_store (nsh, &privkey, s_name_1,
-                                  1, s_rd_1,
-                                  &put_cont, NULL);
+  GNUNET_NAMESTORE_record_set_store (nsh, &privkey, s_name_1,
+                                     1, s_rd_1,
+                                     &put_cont, NULL);
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Created record 2 \n");
   GNUNET_asprintf (&s_name_2, "dummy2");
   s_rd_2 = create_record (1);
-  GNUNET_NAMESTORE_records_store (nsh, &privkey, s_name_2,
-                                  1, s_rd_2, &put_cont, NULL);
+  GNUNET_NAMESTORE_record_set_store (nsh, &privkey, s_name_2,
+                                     1, s_rd_2, &put_cont, NULL);
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Created record 3\n");
@@ -299,9 +298,9 @@ nick_2_cont (void *cls,
   /* name in different zone */
   GNUNET_asprintf (&s_name_3, "dummy3");
   s_rd_3 = create_record (1);
-  GNUNET_NAMESTORE_records_store (nsh, &privkey2, s_name_3,
-                                  1, s_rd_3,
-                                  &put_cont, NULL);
+  GNUNET_NAMESTORE_record_set_store (nsh, &privkey2, s_name_3,
+                                     1, s_rd_3,
+                                     &put_cont, NULL);
 }
 
 
@@ -319,13 +318,13 @@ nick_1_cont (void *cls, enum GNUNET_ErrorCode ec)
   rd.record_type = GNUNET_GNSRECORD_TYPE_NICK;
   rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
   rd.flags |= GNUNET_GNSRECORD_RF_PRIVATE;
-  nsqe = GNUNET_NAMESTORE_records_store (nsh,
-                                         &privkey2,
-                                         GNUNET_GNS_EMPTY_LABEL_AT,
-                                         1,
-                                         &rd,
-                                         &nick_2_cont,
-                                         &privkey2);
+  nsqe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                            &privkey2,
+                                            GNUNET_GNS_EMPTY_LABEL_AT,
+                                            1,
+                                            &rd,
+                                            &nick_2_cont,
+                                            &privkey2);
 
   if (NULL == nsqe)
   {
@@ -387,13 +386,13 @@ empty_zone_end (void *cls)
   rd.record_type = GNUNET_GNSRECORD_TYPE_NICK;
   rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
   rd.flags |= GNUNET_GNSRECORD_RF_PRIVATE;
-  nsqe = GNUNET_NAMESTORE_records_store (nsh,
-                                         &privkey,
-                                         GNUNET_GNS_EMPTY_LABEL_AT,
-                                         1,
-                                         &rd,
-                                         &nick_1_cont,
-                                         NULL);
+  nsqe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                            &privkey,
+                                            GNUNET_GNS_EMPTY_LABEL_AT,
+                                            1,
+                                            &rd,
+                                            &nick_1_cont,
+                                            NULL);
   if (NULL == nsqe)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
diff --git 
a/src/service/namestore/test_namestore_api_zone_iteration_specific_zone.c 
b/src/service/namestore/test_namestore_api_zone_iteration_specific_zone.c
index 753e550ad..8189b7e7e 100644
--- a/src/service/namestore/test_namestore_api_zone_iteration_specific_zone.c
+++ b/src/service/namestore/test_namestore_api_zone_iteration_specific_zone.c
@@ -25,7 +25,6 @@
 #include "platform.h"
 #include "gnunet_namestore_service.h"
 #include "gnunet_testing_lib.h"
-#include "../service/namestore/namestore.h"
 
 #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT
 
@@ -348,26 +347,26 @@ empty_zone_proc_end (void *cls)
   GNUNET_asprintf (&s_name_1,
                    "dummy1");
   s_rd_1 = create_record (1);
-  GNUNET_NAMESTORE_records_store (nsh,
-                                  &privkey,
-                                  s_name_1,
-                                  1,
-                                  s_rd_1,
-                                  &put_cont,
-                                  NULL);
+  GNUNET_NAMESTORE_record_set_store (nsh,
+                                     &privkey,
+                                     s_name_1,
+                                     1,
+                                     s_rd_1,
+                                     &put_cont,
+                                     NULL);
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Created record 2 \n");
   GNUNET_asprintf (&s_name_2,
                    "dummy2");
   s_rd_2 = create_record (1);
-  GNUNET_NAMESTORE_records_store (nsh,
-                                  &privkey,
-                                  s_name_2,
-                                  1,
-                                  s_rd_2,
-                                  &put_cont,
-                                  NULL);
+  GNUNET_NAMESTORE_record_set_store (nsh,
+                                     &privkey,
+                                     s_name_2,
+                                     1,
+                                     s_rd_2,
+                                     &put_cont,
+                                     NULL);
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Created record 3\n");
@@ -376,12 +375,12 @@ empty_zone_proc_end (void *cls)
   GNUNET_asprintf (&s_name_3,
                    "dummy3");
   s_rd_3 = create_record (1);
-  GNUNET_NAMESTORE_records_store (nsh,
-                                  &privkey2,
-                                  s_name_3,
-                                  1, s_rd_3,
-                                  &put_cont,
-                                  NULL);
+  GNUNET_NAMESTORE_record_set_store (nsh,
+                                     &privkey2,
+                                     s_name_3,
+                                     1, s_rd_3,
+                                     &put_cont,
+                                     NULL);
 }
 
 
diff --git a/src/service/namestore/test_namestore_api_zone_iteration_stop.c 
b/src/service/namestore/test_namestore_api_zone_iteration_stop.c
index dd63837ce..e578c50d7 100644
--- a/src/service/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/service/namestore/test_namestore_api_zone_iteration_stop.c
@@ -24,7 +24,6 @@
 #include "platform.h"
 #include "gnunet_namestore_service.h"
 #include "gnunet_testing_lib.h"
-#include "../service/namestore/namestore.h"
 
 #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT
 
@@ -359,21 +358,21 @@ empty_zone_proc_end (void *cls)
   GNUNET_asprintf (&s_name_1,
                    "dummy1");
   s_rd_1 = create_record (1);
-  GNUNET_NAMESTORE_records_store (nsh,
-                                  &privkey, s_name_1,
-                                  1, s_rd_1, &put_cont, NULL);
+  GNUNET_NAMESTORE_record_set_store (nsh,
+                                     &privkey, s_name_1,
+                                     1, s_rd_1, &put_cont, NULL);
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Created record 2 \n");
   GNUNET_asprintf (&s_name_2,
                    "dummy2");
   s_rd_2 = create_record (1);
-  GNUNET_NAMESTORE_records_store (nsh,
-                                  &privkey,
-                                  s_name_2,
-                                  1,
-                                  s_rd_2,
-                                  &put_cont, NULL);
+  GNUNET_NAMESTORE_record_set_store (nsh,
+                                     &privkey,
+                                     s_name_2,
+                                     1,
+                                     s_rd_2,
+                                     &put_cont, NULL);
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Created record 3\n");
@@ -381,12 +380,12 @@ empty_zone_proc_end (void *cls)
   /* name in different zone */
   GNUNET_asprintf (&s_name_3, "dummy3");
   s_rd_3 = create_record (1);
-  GNUNET_NAMESTORE_records_store (nsh,
-                                  &privkey2,
-                                  s_name_3,
-                                  1,
-                                  s_rd_3,
-                                  &put_cont, NULL);
+  GNUNET_NAMESTORE_record_set_store (nsh,
+                                     &privkey2,
+                                     s_name_3,
+                                     1,
+                                     s_rd_3,
+                                     &put_cont, NULL);
 }
 
 
diff --git a/src/service/namestore/test_namestore_api_zone_to_name.c 
b/src/service/namestore/test_namestore_api_zone_to_name.c
index f41b41642..c05a9173f 100644
--- a/src/service/namestore/test_namestore_api_zone_to_name.c
+++ b/src/service/namestore/test_namestore_api_zone_to_name.c
@@ -21,10 +21,8 @@
  * @file namestore/test_namestore_api_zone_to_name.c
  * @brief testcase for zone to name translation
  */
-#include "platform.h"
 #include "gnunet_namestore_service.h"
 #include "gnunet_testing_lib.h"
-#include "../service/namestore/namestore.h"
 
 #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT
 
@@ -206,7 +204,7 @@ run (void *cls,
   GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key);
   /* get public key */
   GNUNET_CRYPTO_key_get_public (&privkey,
-                                  &pubkey);
+                                &pubkey);
 
   GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
                               &s_zone_value,
@@ -223,13 +221,13 @@ run (void *cls,
 
     nsh = GNUNET_NAMESTORE_connect (cfg);
     GNUNET_break (NULL != nsh);
-    GNUNET_NAMESTORE_records_store (nsh,
-                                    &privkey,
-                                    s_name,
-                                    1,
-                                    &rd,
-                                    &put_cont,
-                                    s_name);
+    GNUNET_NAMESTORE_record_set_store (nsh,
+                                       &privkey,
+                                       s_name,
+                                       1,
+                                       &rd,
+                                       &put_cont,
+                                       s_name);
   }
 }
 
diff --git a/src/service/reclaim/did_core.c b/src/service/reclaim/did_core.c
index ce3336b91..5804a0d7e 100644
--- a/src/service/reclaim/did_core.c
+++ b/src/service/reclaim/did_core.c
@@ -27,7 +27,6 @@
 // TODO: DID documents do not have an expiration date. Still we add one
 // TODO: Store DID document with empty label and own type (maybe DID-Document 
or JSON??)
 
-#include "platform.h"
 #include "did_core.h"
 
 struct DID_resolve_return
@@ -66,7 +65,8 @@ DID_resolve_gns_lookup_cb (
   void *cls_did_resolve_cb = ((struct DID_resolve_return *) cls)->cls;
   free (cls);
 
-  for (int i = 0; i < rd_count; i++) {
+  for (int i = 0; i < rd_count; i++)
+  {
     if (rd[i].record_type != GNUNET_GNSRECORD_TYPE_DID_DOCUMENT)
       continue;
     did_document = (char *) rd[i].data;
@@ -77,6 +77,7 @@ DID_resolve_gns_lookup_cb (
       cls_did_resolve_cb);
 }
 
+
 /**
  * @brief Resolve a DID.
  * Calls the given callback function with the resolved DID Document and the 
given closure.
@@ -116,6 +117,7 @@ DID_resolve (const char *did,
   return GNUNET_OK;
 }
 
+
 // ------------------------------------------------ //
 // -------------------- Create -------------------- //
 // ------------------------------------------------ //
@@ -140,6 +142,7 @@ DID_create_did_store_cb (void *cls,
   }
 }
 
+
 struct DID_create_namestore_lookup_closure
 {
   const char *did_document;
@@ -178,7 +181,8 @@ DID_create_namestore_lookup_cb (void *cls,
     printf ("Ego already has a DID Document. Abort.\n");
     cls_record_store_cb->cb (GNUNET_NO, cls_record_store_cb->cls);
   }
-  else {
+  else
+  {
     // Get public key
     GNUNET_CRYPTO_key_get_public (zone, &pkey);
 
@@ -197,16 +201,17 @@ DID_create_namestore_lookup_cb (void *cls,
     record_data.flags = GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
 
     // Store record
-    GNUNET_NAMESTORE_records_store (namestore_handle,
-                                    zone,
-                                    DID_DOCUMENT_LABEL,
-                                    1, // FIXME what if 
GNUNET_GNS_EMPTY_LABEL_AT has records
-                                    &record_data,
-                                    &DID_create_did_store_cb,
-                                    (void *) cls_record_store_cb);
+    GNUNET_NAMESTORE_record_set_store (namestore_handle,
+                                       zone,
+                                       DID_DOCUMENT_LABEL,
+                                       1, // FIXME what if 
GNUNET_GNS_EMPTY_LABEL_AT has records
+                                       &record_data,
+                                       &DID_create_did_store_cb,
+                                       (void *) cls_record_store_cb);
   }
 }
 
+
 /**
  * @brief Creates a DID and saves DID Document in Namestore.
  *
diff --git a/src/service/reclaim/gnunet-service-reclaim.c 
b/src/service/reclaim/gnunet-service-reclaim.c
index 47a86a3e8..2e45324c0 100644
--- a/src/service/reclaim/gnunet-service-reclaim.c
+++ b/src/service/reclaim/gnunet-service-reclaim.c
@@ -23,15 +23,12 @@
  * @brief reclaim Service
  *
  */
-#include "platform.h"
 #include "gnunet_util_lib.h"
 #include "gnunet-service-reclaim_tickets.h"
-#include "gnunet_constants.h"
 #include "gnunet_gnsrecord_lib.h"
 #include "gnunet_protocols.h"
 #include "gnunet_reclaim_lib.h"
 #include "gnunet_reclaim_service.h"
-#include "gnunet_signatures.h"
 #include "reclaim.h"
 
 
@@ -784,7 +781,7 @@ handle_issue_ticket_message (void *cls, const struct 
IssueTicketMessage *im)
   buf = (char *) &im[1];
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len,
-                                                     &identity, &read)) ||
+                                                   &identity, &read)) ||
       (read != key_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -796,7 +793,7 @@ handle_issue_ticket_message (void *cls, const struct 
IssueTicketMessage *im)
   pkey_len = ntohs (im->pkey_len);
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_public_key_from_buffer (buf, pkey_len,
-                                                    &rp, &read)) ||
+                                                  &rp, &read)) ||
       (read != pkey_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -902,7 +899,7 @@ handle_revoke_ticket_message (void *cls, const struct 
RevokeTicketMessage *rm)
   buf = (char *) &rm[1];
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len,
-                                                     &identity, &read)) ||
+                                                   &identity, &read)) ||
       (read != key_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -978,8 +975,8 @@ consume_result_cb (void *cls,
   crm->result = htons (success);
   data_tmp = (char *) &crm[1];
   written = GNUNET_CRYPTO_write_public_key_to_buffer (identity,
-                                                        data_tmp,
-                                                        key_len);
+                                                      data_tmp,
+                                                      key_len);
   GNUNET_assert (0 <= written);
   data_tmp += written;
   GNUNET_RECLAIM_attribute_list_serialize (attrs, data_tmp);
@@ -1037,7 +1034,7 @@ handle_consume_ticket_message (void *cls, const struct 
ConsumeTicketMessage *cm)
   buf = (char *) &cm[1];
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len,
-                                                     &identity, &read)) ||
+                                                   &identity, &read)) ||
       (read != key_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -1142,13 +1139,13 @@ attr_store_task (void *cls)
   rd[0].record_type = GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE;
   rd[0].flags = GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
   rd[0].expiration_time = ash->exp.rel_value_us;
-  ash->ns_qe = GNUNET_NAMESTORE_records_store (nsh,
-                                               &ash->identity,
-                                               label,
-                                               1,
-                                               rd,
-                                               &attr_store_cont,
-                                               ash);
+  ash->ns_qe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                                  &ash->identity,
+                                                  label,
+                                                  1,
+                                                  rd,
+                                                  &attr_store_cont,
+                                                  ash);
   GNUNET_free (buf);
   GNUNET_free (label);
 }
@@ -1201,7 +1198,7 @@ handle_attribute_store_message (void *cls,
   buf = (char *) &sam[1];
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len,
-                                                     &identity, &read)) ||
+                                                   &identity, &read)) ||
       (read != key_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -1314,13 +1311,13 @@ cred_add_cb (void *cls,
   rd_new[0].record_type = GNUNET_GNSRECORD_TYPE_RECLAIM_CREDENTIAL;
   rd_new[0].flags = GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
   rd_new[0].expiration_time = ash->exp.rel_value_us;
-  ash->ns_qe = GNUNET_NAMESTORE_records_store (nsh,
-                                               &ash->identity,
-                                               label,
-                                               1,
-                                               rd_new,
-                                               &cred_store_cont,
-                                               ash);
+  ash->ns_qe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                                  &ash->identity,
+                                                  label,
+                                                  1,
+                                                  rd_new,
+                                                  &cred_store_cont,
+                                                  ash);
   GNUNET_free (buf);
   return;
 }
@@ -1402,7 +1399,7 @@ handle_credential_store_message (void *cls,
   buf = (char *) &sam[1];
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len,
-                                                     &identity, &read)) ||
+                                                   &identity, &read)) ||
       (read != key_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -1641,13 +1638,13 @@ update_tickets (void *cls)
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Updating ticket with %d entries (%d before)...\n",
               j, i);
-  adh->ns_qe = GNUNET_NAMESTORE_records_store (nsh,
-                                               &adh->identity,
-                                               le->label,
-                                               j,
-                                               rd_new,
-                                               &ticket_updated,
-                                               adh);
+  adh->ns_qe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                                  &adh->identity,
+                                                  le->label,
+                                                  j,
+                                                  rd_new,
+                                                  &ticket_updated,
+                                                  adh);
   GNUNET_free (le->label);
   GNUNET_free (le->data);
   GNUNET_free (le);
@@ -1727,13 +1724,13 @@ purge_attributes (void *cls)
     = GNUNET_STRINGS_data_to_string_alloc (&ale->attribute->id,
                                            sizeof(ale->attribute->id));
 
-  adh->ns_qe = GNUNET_NAMESTORE_records_store (nsh,
-                                               &adh->identity,
-                                               label,
-                                               0,
-                                               NULL,
-                                               &offending_attr_delete_cont,
-                                               adh);
+  adh->ns_qe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                                  &adh->identity,
+                                                  label,
+                                                  0,
+                                                  NULL,
+                                                  &offending_attr_delete_cont,
+                                                  adh);
   GNUNET_CONTAINER_DLL_remove (adh->existing_attributes->list_head,
                                adh->existing_attributes->list_tail,
                                ale);
@@ -1873,7 +1870,7 @@ handle_attribute_delete_message (void *cls,
   buf = (char *) &dam[1];
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len,
-                                                     &identity, &read)) ||
+                                                   &identity, &read)) ||
       (read != key_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -1896,13 +1893,13 @@ handle_attribute_delete_message (void *cls,
   GNUNET_SERVICE_client_continue (idp->client);
   adh->client = idp;
   GNUNET_CONTAINER_DLL_insert (idp->delete_op_head, idp->delete_op_tail, adh);
-  adh->ns_qe = GNUNET_NAMESTORE_records_store (nsh,
-                                               &adh->identity,
-                                               adh->label,
-                                               0,
-                                               NULL,
-                                               &attr_delete_cont,
-                                               adh);
+  adh->ns_qe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                                  &adh->identity,
+                                                  adh->label,
+                                                  0,
+                                                  NULL,
+                                                  &attr_delete_cont,
+                                                  adh);
 }
 
 
@@ -1980,7 +1977,7 @@ handle_credential_delete_message (void *cls,
   buf = (char *) &dam[1];
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_private_key_from_buffer (buf, key_len,
-                                                     &identity, &read)) ||
+                                                   &identity, &read)) ||
       (read != key_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -2002,13 +1999,13 @@ handle_credential_delete_message (void *cls,
   GNUNET_SERVICE_client_continue (idp->client);
   adh->client = idp;
   GNUNET_CONTAINER_DLL_insert (idp->delete_op_head, idp->delete_op_tail, adh);
-  adh->ns_qe = GNUNET_NAMESTORE_records_store (nsh,
-                                               &adh->identity,
-                                               adh->label,
-                                               0,
-                                               NULL,
-                                               &cred_delete_cont,
-                                               adh);
+  adh->ns_qe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                                  &adh->identity,
+                                                  adh->label,
+                                                  0,
+                                                  NULL,
+                                                  &cred_delete_cont,
+                                                  adh);
 }
 
 
@@ -2101,8 +2098,8 @@ attr_iter_cb (void *cls,
   data_tmp = (char *) &arm[1];
   arm->pkey_len = htons (key_len);
   written = GNUNET_CRYPTO_write_public_key_to_buffer (&identity,
-                                                        data_tmp,
-                                                        key_len);
+                                                      data_tmp,
+                                                      key_len);
   GNUNET_assert (0 <= written);
   data_tmp += written;
   GNUNET_memcpy (data_tmp, rd->data, rd->data_size);
@@ -2129,6 +2126,7 @@ check_iteration_start (
   return GNUNET_OK;
 }
 
+
 /**
  * Iterate over zone to get attributes
  *
@@ -2150,9 +2148,9 @@ handle_iteration_start (void *cls,
   key_len = ntohs (ais_msg->key_len);
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_private_key_from_buffer (&ais_msg[1],
-                                                     key_len,
-                                                     &identity,
-                                                     &read)) ||
+                                                   key_len,
+                                                   &identity,
+                                                   &read)) ||
       (read != key_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -2331,14 +2329,15 @@ cred_iter_cb (void *cls,
   arm->key_len = htons (key_len);
   data_tmp = (char *) &arm[1];
   written = GNUNET_CRYPTO_write_public_key_to_buffer (&identity,
-                                                        data_tmp,
-                                                        key_len);
+                                                      data_tmp,
+                                                      key_len);
   GNUNET_assert (written >= 0);
   data_tmp += written;
   GNUNET_memcpy (data_tmp, rd->data, rd->data_size);
   GNUNET_MQ_send (ai->client->mq, env);
 }
 
+
 static enum GNUNET_GenericReturnValue
 check_credential_iteration_start (
   void *cls,
@@ -2381,9 +2380,9 @@ handle_credential_iteration_start (void *cls,
   key_len = ntohs (ais_msg->key_len);
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_private_key_from_buffer (&ais_msg[1],
-                                                     key_len,
-                                                     &identity,
-                                                     &read)) ||
+                                                   key_len,
+                                                   &identity,
+                                                   &read)) ||
       (read != key_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -2524,6 +2523,7 @@ ticket_iter_cb (void *cls, struct GNUNET_RECLAIM_Ticket 
*ticket)
     GNUNET_free (ti);
 }
 
+
 static enum GNUNET_GenericReturnValue
 check_ticket_iteration_start (
   void *cls,
@@ -2543,6 +2543,7 @@ check_ticket_iteration_start (
   return GNUNET_OK;
 }
 
+
 /**
  * Client requests a ticket iteration
  *
@@ -2565,9 +2566,9 @@ handle_ticket_iteration_start (
   key_len = ntohs (tis_msg->key_len);
   if ((GNUNET_SYSERR ==
        GNUNET_CRYPTO_read_private_key_from_buffer (&tis_msg[1],
-                                                     key_len,
-                                                     &identity,
-                                                     &read)) ||
+                                                   key_len,
+                                                   &identity,
+                                                   &read)) ||
       (read != key_len))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/service/reclaim/gnunet-service-reclaim_tickets.c 
b/src/service/reclaim/gnunet-service-reclaim_tickets.c
index 689fbc429..acd2b6859 100644
--- a/src/service/reclaim/gnunet-service-reclaim_tickets.c
+++ b/src/service/reclaim/gnunet-service-reclaim_tickets.c
@@ -24,8 +24,6 @@
  * @brief reclaim tickets
  *
  */
-#include "platform.h"
-#include <inttypes.h>
 #include "gnunet-service-reclaim_tickets.h"
 
 
@@ -451,13 +449,13 @@ process_tickets (void *cls)
       rd[i].data = &ae->new_id;
     }
   }
-  rvk->ns_qe = GNUNET_NAMESTORE_records_store (nsh,
-                                               &rvk->identity,
-                                               le->label,
-                                               le->rd_count,
-                                               rd,
-                                               &ticket_processed,
-                                               rvk);
+  rvk->ns_qe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                                  &rvk->identity,
+                                                  le->label,
+                                                  le->rd_count,
+                                                  rd,
+                                                  &ticket_processed,
+                                                  rvk);
   GNUNET_free (le->label);
   GNUNET_free (le->data);
   GNUNET_free (le);
@@ -645,13 +643,13 @@ move_attr_finished (void *cls, enum GNUNET_ErrorCode ec)
                                                sizeof(rvk->move_attr->old_id));
   GNUNET_assert (NULL != label);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Removing attribute %s\n", label);
-  rvk->ns_qe = GNUNET_NAMESTORE_records_store (nsh,
-                                               &rvk->identity,
-                                               label,
-                                               0,
-                                               NULL,
-                                               &del_attr_finished,
-                                               rvk);
+  rvk->ns_qe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                                  &rvk->identity,
+                                                  label,
+                                                  0,
+                                                  NULL,
+                                                  &del_attr_finished,
+                                                  rvk);
   GNUNET_free (label);
 }
 
@@ -744,17 +742,18 @@ rvk_move_attr_cb (void *cls,
                   new_label);
       GNUNET_free (credential);
     }
-    else {
+    else
+    {
       memcpy (&new_rd[i], &rd[i], sizeof (struct GNUNET_GNSRECORD_Data));
     }
   }
-  rvk->ns_qe = GNUNET_NAMESTORE_records_store (nsh,
-                                               &rvk->identity,
-                                               new_label,
-                                               rd_count,
-                                               new_rd,
-                                               &move_attr_finished,
-                                               rvk);
+  rvk->ns_qe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                                  &rvk->identity,
+                                                  new_label,
+                                                  rd_count,
+                                                  new_rd,
+                                                  &move_attr_finished,
+                                                  rvk);
   GNUNET_free (new_label);
   GNUNET_free (attr_data);
 }
@@ -870,13 +869,13 @@ revoke_attrs_cb (void *cls,
   }
 
   /** Remove attribute references **/
-  rvk->ns_qe = GNUNET_NAMESTORE_records_store (nsh,
-                                               &rvk->identity,
-                                               label,
-                                               0,
-                                               NULL,
-                                               &remove_ticket_cont,
-                                               rvk);
+  rvk->ns_qe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                                  &rvk->identity,
+                                                  label,
+                                                  0,
+                                                  NULL,
+                                                  &remove_ticket_cont,
+                                                  rvk);
 }
 
 
@@ -1399,19 +1398,19 @@ issue_ticket (struct TicketIssueHandle *ih)
                                          sizeof(ih->ticket.rnd));
   struct GNUNET_CRYPTO_PublicKey pub;
   GNUNET_CRYPTO_key_get_public (&ih->identity,
-                                  &pub);
+                                &pub);
   char *str = GNUNET_CRYPTO_public_key_to_string (&pub);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Storing AuthZ information under %s in %s\n", label, str);
   GNUNET_free (str);
   // Publish record
-  ih->ns_qe = GNUNET_NAMESTORE_records_store (nsh,
-                                              &ih->identity,
-                                              label,
-                                              i,
-                                              attrs_record,
-                                              &store_ticket_issue_cont,
-                                              ih);
+  ih->ns_qe = GNUNET_NAMESTORE_record_set_store (nsh,
+                                                 &ih->identity,
+                                                 label,
+                                                 i,
+                                                 attrs_record,
+                                                 &store_ticket_issue_cont,
+                                                 ih);
   for (j = 0; j < i; j++)
   {
     if (attrs_record[j].record_type
diff --git a/src/service/rest/namestore_plugin.c 
b/src/service/rest/namestore_plugin.c
index 8c5b8b824..8ea2457f2 100644
--- a/src/service/rest/namestore_plugin.c
+++ b/src/service/rest/namestore_plugin.c
@@ -27,7 +27,6 @@
 #include "platform.h"
 #include "gnunet_error_codes.h"
 #include "gnunet_rest_plugin.h"
-#include "gnunet_gns_service.h"
 #include "gnunet_namestore_service.h"
 #include "gnunet_identity_service.h"
 #include "gnunet_rest_lib.h"
@@ -709,13 +708,13 @@ ns_lookup_cb (void *cls,
   }
   for (j = 0; j < handle->rd_count; j++)
     rd_new[i + j] = handle->rd[j];
-  handle->ns_qe = GNUNET_NAMESTORE_records_store (ns_handle,
-                                                  handle->zone_pkey,
-                                                  handle->record_name,
-                                                  i + j,
-                                                  rd_new,
-                                                  &create_finished,
-                                                  handle);
+  handle->ns_qe = GNUNET_NAMESTORE_record_set_store (ns_handle,
+                                                     handle->zone_pkey,
+                                                     handle->record_name,
+                                                     i + j,
+                                                     rd_new,
+                                                     &create_finished,
+                                                     handle);
   if (NULL == handle->ns_qe)
   {
     handle->ec = GNUNET_EC_NAMESTORE_UNKNOWN;
@@ -725,27 +724,6 @@ ns_lookup_cb (void *cls,
 }
 
 
-static void
-bulk_tx_commit_cb (void *cls, enum GNUNET_ErrorCode ec)
-{
-  struct RequestHandle *handle = cls;
-  struct MHD_Response *resp;
-
-  handle->ns_qe = NULL;
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Commit finished (%d)\n", ec);
-  handle->ec = ec;
-  if (GNUNET_EC_NONE != ec)
-  {
-    GNUNET_SCHEDULER_add_now (&do_error, handle);
-    return;
-  }
-  resp = GNUNET_REST_create_response (NULL);
-  handle->proc (handle->proc_cls, resp, MHD_HTTP_NO_CONTENT);
-  GNUNET_SCHEDULER_add_now (&cleanup_handle, handle);
-}
-
-
 static void
 import_next_cb (void *cls, enum GNUNET_ErrorCode ec)
 {
@@ -763,22 +741,33 @@ import_next_cb (void *cls, enum GNUNET_ErrorCode ec)
   unsigned int remaining = handle->rd_set_count - handle->rd_set_pos;
   if (0 == remaining)
   {
-    handle->ns_qe = GNUNET_NAMESTORE_transaction_commit (handle->nc,
-                                                         &bulk_tx_commit_cb,
-                                                         handle);
+    struct MHD_Response *resp;
+
+    handle->ns_qe = NULL;
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Commit finished (%d)\n", ec);
+    handle->ec = ec;
+    if (GNUNET_EC_NONE != ec)
+    {
+      GNUNET_SCHEDULER_add_now (&do_error, handle);
+      return;
+    }
+    resp = GNUNET_REST_create_response (NULL);
+    handle->proc (handle->proc_cls, resp, MHD_HTTP_NO_CONTENT);
+    GNUNET_SCHEDULER_add_now (&cleanup_handle, handle);
     return;
   }
   unsigned int sent_rds = 0;
   // Find the smallest set of records we can send with our message size
   // restriction of 16 bit
-  handle->ns_qe = GNUNET_NAMESTORE_records_store2 (handle->nc,
-                                                   handle->zone_pkey,
-                                                   remaining,
-                                                   &handle->ri[handle->
-                                                               rd_set_pos],
-                                                   &sent_rds,
-                                                   &import_next_cb,
-                                                   handle);
+  handle->ns_qe = GNUNET_NAMESTORE_records_store (handle->nc,
+                                                  handle->zone_pkey,
+                                                  remaining,
+                                                  &handle->ri[handle->
+                                                              rd_set_pos],
+                                                  &sent_rds,
+                                                  &import_next_cb,
+                                                  handle);
   if ((NULL == handle->ns_qe) && (0 == sent_rds))
   {
     handle->ec = GNUNET_EC_NAMESTORE_UNKNOWN;
@@ -790,20 +779,13 @@ import_next_cb (void *cls, enum GNUNET_ErrorCode ec)
 
 
 static void
-bulk_tx_start (void *cls, enum GNUNET_ErrorCode ec)
+bulk_tx_start (struct RequestHandle *handle)
 {
-  struct RequestHandle *handle = cls;
   json_t *data_js;
   json_error_t err;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Transaction started...\n");
-  handle->ec = ec;
-  if (GNUNET_EC_NONE != ec)
-  {
-    GNUNET_SCHEDULER_add_now (&do_error, handle);
-    return;
-  }
   if (0 >= handle->rest_handle->data_size)
   {
     handle->ec = GNUNET_EC_NAMESTORE_NO_RECORDS_GIVEN;
@@ -866,13 +848,13 @@ bulk_tx_start (void *cls, enum GNUNET_ErrorCode ec)
   unsigned int sent_rds = 0;
   // Find the smallest set of records we can send with our message size
   // restriction of 16 bit
-  handle->ns_qe = GNUNET_NAMESTORE_records_store2 (handle->nc,
-                                                   handle->zone_pkey,
-                                                   handle->rd_set_count,
-                                                   handle->ri,
-                                                   &sent_rds,
-                                                   &import_next_cb,
-                                                   handle);
+  handle->ns_qe = GNUNET_NAMESTORE_records_store (handle->nc,
+                                                  handle->zone_pkey,
+                                                  handle->rd_set_count,
+                                                  handle->ri,
+                                                  &sent_rds,
+                                                  &import_next_cb,
+                                                  handle);
   if ((NULL == handle->ns_qe) && (0 == sent_rds))
   {
     handle->ec = GNUNET_EC_NAMESTORE_UNKNOWN;
@@ -928,9 +910,7 @@ namestore_import (struct GNUNET_REST_RequestHandle 
*con_handle,
     GNUNET_SCHEDULER_add_now (&do_error, handle);
     return;
   }
-  handle->ns_qe = GNUNET_NAMESTORE_transaction_begin (handle->nc,
-                                                      &bulk_tx_start,
-                                                      handle);
+  bulk_tx_start (handle);
 }
 
 
@@ -1104,13 +1084,13 @@ namestore_delete (struct GNUNET_REST_RequestHandle 
*con_handle,
   }
 
   handle->record_name = GNUNET_strdup (labelname + 1);
-  handle->ns_qe = GNUNET_NAMESTORE_records_store (ns_handle,
-                                                  handle->zone_pkey,
-                                                  handle->record_name,
-                                                  0,
-                                                  NULL,
-                                                  &del_finished,
-                                                  handle);
+  handle->ns_qe = GNUNET_NAMESTORE_record_set_store (ns_handle,
+                                                     handle->zone_pkey,
+                                                     handle->record_name,
+                                                     0,
+                                                     NULL,
+                                                     &del_finished,
+                                                     handle);
   if (NULL == handle->ns_qe)
   {
     handle->ec = GNUNET_EC_NAMESTORE_UNKNOWN;
diff --git a/src/service/transport/meson.build 
b/src/service/transport/meson.build
index 4dc6a9991..8b85a3258 100644
--- a/src/service/transport/meson.build
+++ b/src/service/transport/meson.build
@@ -81,6 +81,8 @@ libgnunettransporttesting2 = 
library('gnunettransporttesting2',
                                        'transport_api_cmd_backchannel_check.c',
                                        'transport_api_cmd_start_peer.c',
                                        'transport_api_cmd_stop_peer.c',
+                                       'testing_api_cmd_start_peer.c',
+                                       'testing_api_cmd_stop_peer.c',
                                        'transport_api_cmd_send_simple.c',
                                        
'transport_api_cmd_send_simple_performance.c',
                                        'transport-testing2.c',

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]