Prepare release 0.4.0

Change-Id: I361b0a37f48c729b31ea6a61aefb513c8d3d670f
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b551e45..f328d39 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -53,7 +53,7 @@
           - os: macos-12
             xcode: '13.4'
           - os: macos-12
-            xcode: '14.1'
+            xcode: '14.2'
     steps:
       - name: Set up Xcode
         uses: maxim-lobanov/setup-xcode@v1
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 4debb4e..3a7bf66 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -145,9 +145,9 @@
         flags = super(GccBasicFlags, self).getDebugFlags(conf)
         flags['CXXFLAGS'] += ['-Og',
                               '-g3',
-                              '-pedantic',
                               '-Wall',
                               '-Wextra',
+                              '-Wpedantic',
                               '-Werror',
                               '-Wcatch-value=2',
                               '-Wextra-semi',
@@ -163,9 +163,9 @@
         flags = super(GccBasicFlags, self).getOptimizedFlags(conf)
         flags['CXXFLAGS'] += ['-O2',
                               '-g',
-                              '-pedantic',
                               '-Wall',
                               '-Wextra',
+                              '-Wpedantic',
                               '-Wcatch-value=2',
                               '-Wextra-semi',
                               '-Wnon-virtual-dtor',
diff --git a/AUTHORS.md b/AUTHORS.md
index d9af015..58f971c 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -1,10 +1,12 @@
 # PSync Authors
 
-The following lists maintainers, primary developers, and all much-appreciated contributors to PSync in alphabetic order.
+The following lists maintainers, primary developers, and all much-appreciated contributors to PSync in alphabetical order.
 The specific contributions of individual authors can be obtained from the git history of the [official PSync repository](https://github.com/named-data/PSync).
-If you would like to become a contributor to the official repository, please follow the recommendations in https://github.com/named-data/.github/blob/master/CONTRIBUTING.md.
+If you would like to become a contributor to the official repository, please follow the recommendations in <https://github.com/named-data/.github/blob/master/CONTRIBUTING.md>.
 
-* ***(Maintainer)*** Ashlesh Gawande <https://www.linkedin.com/in/agawande>
+* Alexander Afanasyev <https://users.cs.fiu.edu/~afanasyev>
+* ***(Maintainer)*** Saurab Dulal <https://dulalsaurab.github.io>
+* ***(Former Maintainer)*** Ashlesh Gawande <https://www.linkedin.com/in/agawande>
 * Eric Newberry <https://ericnewberry.com>
 * Davide Pesavento <https://github.com/Pesa>
 * Junxiao Shi <https://cs.arizona.edu/~shijunxiao>
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
index 96d796b..4da744b 100644
--- a/docs/release-notes.rst
+++ b/docs/release-notes.rst
@@ -1,4 +1,4 @@
 Release Notes
 =============
 
-.. include:: release-notes/release-notes-0.3.0.rst
+.. include:: release-notes/release-notes-0.4.0.rst
diff --git a/docs/release-notes/release-notes-0.4.0.rst b/docs/release-notes/release-notes-0.4.0.rst
new file mode 100644
index 0000000..f27a2bd
--- /dev/null
+++ b/docs/release-notes/release-notes-0.4.0.rst
@@ -0,0 +1,37 @@
+PSync version 0.4.0
+-------------------
+
+*Release date: January 18, 2023*
+
+Important changes and new features
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- The minimum build requirements have been increased as follows:
+
+  - Either GCC >= 7.4.0 or Clang >= 6.0 is required on Linux
+  - On macOS, Xcode 11.3 or later is recommended; older versions may still work but are not
+    officially supported
+  - Boost >= 1.65.1 and ndn-cxx >= 0.8.1 are required on all platforms
+  - Sphinx 4.0 or later is required to build the documentation
+
+- *(breaking change)* Switch to C++17
+- *(breaking change)* The Name TLV value is now hashed directly instead of being converted
+  to URI format first (:issue:`4838`)
+- Add ``incomingFace`` field to missing data notifications (:issue:`3626`)
+- *(breaking change)* Add ``ndn::KeyChain`` parameter to the producer API
+- Provide API to remove a subscription in partial sync :psync:`Consumer` (:issue:`5242`)
+
+Improvements and bug fixes
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Use ndn-cxx's ``ndn::util::Segmenter`` class in :psync:`SegmentPublisher`
+- Fix compilation against the latest version of ndn-cxx
+- Stop using the ``gold`` linker on Linux; prefer instead linking with ``lld`` if installed
+- Update waf build system to version 2.0.24
+- Various documentation improvements
+
+Known issues
+^^^^^^^^^^^^
+
+- We have taken some steps to be endian safe but PSync is not completely endian safe yet
+  (:issue:`4818`)
diff --git a/wscript b/wscript
index b368414..59bb70f 100644
--- a/wscript
+++ b/wscript
@@ -3,7 +3,7 @@
 from waflib import Context, Logs, Utils
 import os, subprocess
 
-VERSION = '0.3.0'
+VERSION = '0.4.0'
 APPNAME = 'PSync'
 GIT_TAG_PREFIX = ''
 
@@ -47,7 +47,7 @@
     conf.find_program(['pkgconf', 'pkg-config'], var='PKGCONFIG')
 
     pkg_config_path = os.environ.get('PKG_CONFIG_PATH', f'{conf.env.LIBDIR}/pkgconfig')
-    conf.check_cfg(package='libndn-cxx', args=['libndn-cxx >= 0.8.0', '--cflags', '--libs'],
+    conf.check_cfg(package='libndn-cxx', args=['libndn-cxx >= 0.8.1', '--cflags', '--libs'],
                    uselib_store='NDN_CXX', pkg_config_path=pkg_config_path)
 
     boost_libs = ['system', 'iostreams']