From 87a411b839dc770460cd152cf2e7e6d40729709a Mon Sep 17 00:00:00 2001
From: Felix Lange <fjl@twurst.com>
Date: Thu, 26 Mar 2020 16:39:56 +0100
Subject: [PATCH] cmd/devp2p: lower route53 change limit again (#20819)

---
 cmd/devp2p/dns_route53.go | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/cmd/devp2p/dns_route53.go b/cmd/devp2p/dns_route53.go
index 71118be54..d83446a73 100644
--- a/cmd/devp2p/dns_route53.go
+++ b/cmd/devp2p/dns_route53.go
@@ -32,9 +32,11 @@ import (
 	"gopkg.in/urfave/cli.v1"
 )
 
-// The Route53 limits change sets to this size. DNS changes need to be split
-// up into multiple batches to work around the limit.
-const route53ChangeLimit = 30000
+// Route53 limits change sets to 32k of 'RDATA size'. DNS changes need to be split up into
+// multiple batches to work around the limit. Unfortunately I cannot find any
+// documentation explaining how the RDATA size of a change set is computed and the best we
+// can do is estimate it. For this reason, our internal limit is much lower than 32k.
+const route53ChangeLimit = 20000
 
 var (
 	route53AccessKeyFlag = cli.StringFlag{
-- 
GitLab