Merge "acl permissions: fix a bug"
diff --git a/lib/exec/exec_test.go b/lib/exec/exec_test.go
index 00e58ec..b903e41 100644
--- a/lib/exec/exec_test.go
+++ b/lib/exec/exec_test.go
@@ -389,7 +389,7 @@
 
 func TestToCompletion(t *testing.T) {
 	ph := readyHelper(t, "TestToCompletion", "testSuccess", "...ok")
-	e := ph.Wait(time.Second)
+	e := ph.Wait(10 * time.Second)
 	if e != nil {
 		t.Errorf("Wait failed: err %s\n", e)
 	}
@@ -418,7 +418,7 @@
 	if ph == nil {
 		t.Fatalf("Failed to get vexec.ParentHandle\n")
 	}
-	e := ph.Wait(1 * time.Second)
+	e := ph.Wait(10 * time.Second)
 	if e != nil {
 		t.Errorf("Wait failed: err %s\n", e)
 	}
@@ -451,6 +451,11 @@
 	if err := waitForReady(t, cmd, name, 1, ph); err != nil {
 		t.Errorf("%s: WaitForReady: %v (%v)", name, err, ph)
 	}
+	// Drain the tk.Requests() channel since waitForReady can leave something in it.
+	select {
+	case <-tk.Requests():
+	default:
+	}
 	go func() {
 		// Wait for the ph.Wait below to block, then advance the time
 		// s.t. the Wait times out.
diff --git a/runtime/internal/discovery/uuid.go b/runtime/internal/discovery/uuid.go
new file mode 100644
index 0000000..221ef5a
--- /dev/null
+++ b/runtime/internal/discovery/uuid.go
@@ -0,0 +1,26 @@
+// Copyright 2015 The Vanadium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package discovery
+
+import (
+	"github.com/pborman/uuid"
+)
+
+var (
+	// UUID of Vanadium namespace.
+	// Generated from UUID5("00000000-0000-0000-0000-000000000000", "v.io").
+	v23UUID uuid.UUID = uuid.UUID{0x3d, 0xd1, 0xd5, 0xa8, 0x2e, 0xef, 0x58, 0x16, 0xa7, 0x20, 0xf8, 0x8b, 0x9b, 0xcf, 0x6e, 0xe4}
+)
+
+// NewServiceUUID returns a version 5 UUID for the given interface name.
+func NewServiceUUID(interfaceName string) uuid.UUID {
+	return uuid.NewSHA1(v23UUID, []byte(interfaceName))
+}
+
+// NewInstanceUUID returns a version 4 (random) UUID. Mostly used for
+// uniquely identifying the discovery service instance.
+func NewInstanceUUID() uuid.UUID {
+	return uuid.NewRandom()
+}
diff --git a/runtime/internal/discovery/uuid_test.go b/runtime/internal/discovery/uuid_test.go
new file mode 100644
index 0000000..114c8e4
--- /dev/null
+++ b/runtime/internal/discovery/uuid_test.go
@@ -0,0 +1,38 @@
+// Copyright 2015 The Vanadium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package discovery_test
+
+import (
+	"testing"
+
+	"v.io/x/ref/runtime/internal/discovery"
+)
+
+func TestServiceUUID(t *testing.T) {
+	tests := []struct {
+		in, want string
+	}{
+		{"v.io", "2101363c-688d-548a-a600-34d506e1aad0"},
+		{"v.io/v23/abc", "6726c4e5-b6eb-5547-9228-b2913f4fad52"},
+		{"v.io/v23/abc/xyz", "be8a57d7-931d-5ee4-9243-0bebde0029a5"},
+	}
+
+	for _, test := range tests {
+		if got := discovery.NewServiceUUID(test.in).String(); got != test.want {
+			t.Errorf("ServiceUUID for %q mismatch; got %q, want %q", test.in, got, test.want)
+		}
+	}
+}
+
+func TestInstanceUUID(t *testing.T) {
+	uuids := make(map[string]struct{})
+	for x := 0; x < 100; x++ {
+		uuid := discovery.NewInstanceUUID().String()
+		if _, ok := uuids[uuid]; ok {
+			t.Errorf("InstanceUUID returned duplicated UUID %q", uuid)
+		}
+		uuids[uuid] = struct{}{}
+	}
+}
diff --git a/runtime/internal/flow/flowcontrol/flowcontrol_test.go b/runtime/internal/flow/flowcontrol/flowcontrol_test.go
index 3d9a297..70fd9d3 100644
--- a/runtime/internal/flow/flowcontrol/flowcontrol_test.go
+++ b/runtime/internal/flow/flowcontrol/flowcontrol_test.go
@@ -201,7 +201,7 @@
 }
 
 func newNullConn(mtu int) net.Conn {
-	ln, err := net.Listen("tcp", ":0")
+	ln, err := net.Listen("tcp", "127.0.0.1:0")
 	if err != nil {
 		panic(err)
 	}
diff --git a/runtime/internal/naming/endpoint.go b/runtime/internal/naming/endpoint.go
index 9f32a92..ca14c9b 100644
--- a/runtime/internal/naming/endpoint.go
+++ b/runtime/internal/naming/endpoint.go
@@ -208,7 +208,7 @@
 	metadata.Insert("v23.RPCEndpointVersion", fmt.Sprint(defaultVersion))
 }
 
-var defaultVersion = 5
+var defaultVersion = 6
 
 func (ep *Endpoint) VersionedString(version int) string {
 	// nologcall
diff --git a/runtime/internal/naming/endpoint_test.go b/runtime/internal/naming/endpoint_test.go
index f699440..9d44400 100644
--- a/runtime/internal/naming/endpoint_test.go
+++ b/runtime/internal/naming/endpoint_test.go
@@ -12,98 +12,11 @@
 	"v.io/v23/naming"
 )
 
-func TestEndpointV5(t *testing.T) {
-	defver := defaultVersion
-	defer func() {
-		defaultVersion = defver
-	}()
-	v5a := &Endpoint{
-		Protocol:     naming.UnknownProtocol,
-		Address:      "batman.com:1234",
-		RID:          naming.FixedRoutingID(0xdabbad00),
-		IsMountTable: true,
-	}
-	v5b := &Endpoint{
-		Protocol:     naming.UnknownProtocol,
-		Address:      "batman.com:2345",
-		RID:          naming.FixedRoutingID(0xdabbad00),
-		IsMountTable: false,
-	}
-	v5c := &Endpoint{
-		Protocol:     "tcp",
-		Address:      "batman.com:2345",
-		RID:          naming.FixedRoutingID(0x0),
-		IsMountTable: false,
-	}
-	v5d := &Endpoint{
-		Protocol:     "ws6",
-		Address:      "batman.com:2345",
-		RID:          naming.FixedRoutingID(0x0),
-		IsMountTable: false,
-	}
-	v5e := &Endpoint{
-		Protocol:     "tcp",
-		Address:      "batman.com:2345",
-		RID:          naming.FixedRoutingID(0xba77),
-		IsMountTable: true,
-		Blessings:    []string{"dev.v.io/foo@bar.com", "dev.v.io/bar@bar.com/delegate"},
-	}
-	v5f := &Endpoint{
-		Protocol:     "tcp",
-		Address:      "batman.com:2345",
-		RID:          naming.FixedRoutingID(0xba77),
-		IsMountTable: true,
-		// Blessings that look similar to other parts of the endpoint.
-		Blessings: []string{"@@", "@s", "@m"},
-	}
-	testcasesA := []struct {
-		endpoint naming.Endpoint
-		address  string
-	}{
-		{v5a, "batman.com:1234"},
-		{v5b, "batman.com:2345"},
-		{v5c, "batman.com:2345"},
-	}
-	for _, test := range testcasesA {
-		addr := test.endpoint.Addr()
-		if addr.String() != test.address {
-			t.Errorf("unexpected address %q, not %q", addr.String(), test.address)
-		}
-	}
-	// Test v5 endpoints.
-	testcasesC := []struct {
-		Endpoint naming.Endpoint
-		String   string
-		Version  int
-	}{
-		{v5a, "@5@@batman.com:1234@000000000000000000000000dabbad00@m@@@", 5},
-		{v5b, "@5@@batman.com:2345@000000000000000000000000dabbad00@s@@@", 5},
-		{v5c, "@5@tcp@batman.com:2345@00000000000000000000000000000000@s@@@", 5},
-		{v5d, "@5@ws6@batman.com:2345@00000000000000000000000000000000@s@@@", 5},
-		{v5e, "@5@tcp@batman.com:2345@0000000000000000000000000000ba77@m@dev.v.io/foo@bar.com,dev.v.io/bar@bar.com/delegate@@", 5},
-		{v5f, "@5@tcp@batman.com:2345@0000000000000000000000000000ba77@m@@@,@s,@m@@", 5},
-	}
-	for i, test := range testcasesC {
-		if got, want := test.Endpoint.VersionedString(test.Version), test.String; got != want {
-			t.Errorf("Test %d: Got %q want %q for endpoint (v%d): %#v", i, got, want, test.Version, test.Endpoint)
-		}
-		ep, err := NewEndpoint(test.String)
-		if err != nil {
-			t.Errorf("Test %d: NewEndpoint(%q) failed with %v", i, test.String, err)
-			continue
-		}
-		if !reflect.DeepEqual(ep, test.Endpoint) {
-			t.Errorf("Test %d: Got endpoint %#v, want %#v for string %q", i, ep, test.Endpoint, test.String)
-		}
-	}
-}
-
 func TestEndpoint(t *testing.T) {
 	defver := defaultVersion
 	defer func() {
 		defaultVersion = defver
 	}()
-	defaultVersion = 6
 	v6a := &Endpoint{
 		Protocol:     naming.UnknownProtocol,
 		Address:      "batman.com:1234",
diff --git a/runtime/internal/rpc/server.go b/runtime/internal/rpc/server.go
index 9f97089..52be186 100644
--- a/runtime/internal/rpc/server.go
+++ b/runtime/internal/rpc/server.go
@@ -1338,7 +1338,7 @@
 	//nologcall
 	return fs.discharges
 }
-func (fs *flowServer) Server() rpc.Server {
+func (fs *flowServer) Server() rpc.XServer {
 	//nologcall
 	return fs.server
 }
diff --git a/runtime/internal/rpc/sort_internal_test.go b/runtime/internal/rpc/sort_internal_test.go
index 2d0d545..7600d2b 100644
--- a/runtime/internal/rpc/sort_internal_test.go
+++ b/runtime/internal/rpc/sort_internal_test.go
@@ -71,10 +71,10 @@
 
 	// Just foobar and tcp4
 	want := []string{
-		"/@5@foobar@127.0.0.10@@@@@",
-		"/@5@foobar@127.0.0.11@@@@@",
-		"/@5@tcp4@127.0.0.1@@@@@",
-		"/@5@tcp4@127.0.0.2@@@@@",
+		"/@6@foobar@127.0.0.10@@@@@@",
+		"/@6@foobar@127.0.0.11@@@@@@",
+		"/@6@tcp4@127.0.0.1@@@@@@",
+		"/@6@tcp4@127.0.0.2@@@@@@",
 		"/127.0.0.12:14141",
 	}
 	result, err := filterAndOrderServers(servers, []string{"foobar", "tcp4"}, ipnets)
@@ -91,14 +91,14 @@
 	// original ordering within each protocol, with protocols that
 	// are not in the default ordering list at the end.
 	want = []string{
-		"/@5@tcp4@127.0.0.1@@@@@",
-		"/@5@tcp4@127.0.0.2@@@@@",
-		"/@5@tcp@127.0.0.3@@@@@",
-		"/@5@tcp@127.0.0.4@@@@@",
-		"/@5@tcp6@127.0.0.7@@@@@",
-		"/@5@tcp6@127.0.0.8@@@@@",
-		"/@5@foobar@127.0.0.10@@@@@",
-		"/@5@foobar@127.0.0.11@@@@@",
+		"/@6@tcp4@127.0.0.1@@@@@@",
+		"/@6@tcp4@127.0.0.2@@@@@@",
+		"/@6@tcp@127.0.0.3@@@@@@",
+		"/@6@tcp@127.0.0.4@@@@@@",
+		"/@6@tcp6@127.0.0.7@@@@@@",
+		"/@6@tcp6@127.0.0.8@@@@@@",
+		"/@6@foobar@127.0.0.10@@@@@@",
+		"/@6@foobar@127.0.0.11@@@@@@",
 		"/127.0.0.12:14141",
 	}
 	if result, err = filterAndOrderServers(servers, nil, ipnets); err != nil {
@@ -117,12 +117,12 @@
 
 	// Just "tcp" implies tcp4 and tcp6 as well.
 	want = []string{
-		"/@5@tcp@127.0.0.3@@@@@",
-		"/@5@tcp@127.0.0.4@@@@@",
-		"/@5@tcp4@127.0.0.1@@@@@",
-		"/@5@tcp4@127.0.0.2@@@@@",
-		"/@5@tcp6@127.0.0.7@@@@@",
-		"/@5@tcp6@127.0.0.8@@@@@",
+		"/@6@tcp@127.0.0.3@@@@@@",
+		"/@6@tcp@127.0.0.4@@@@@@",
+		"/@6@tcp4@127.0.0.1@@@@@@",
+		"/@6@tcp4@127.0.0.2@@@@@@",
+		"/@6@tcp6@127.0.0.7@@@@@@",
+		"/@6@tcp6@127.0.0.8@@@@@@",
 		"/127.0.0.12:14141",
 	}
 	if result, err = filterAndOrderServers(servers, []string{"tcp"}, ipnets); err != nil {
@@ -134,14 +134,14 @@
 
 	// Ask for all protocols, with no ordering, except for locality
 	want = []string{
-		"/@5@tcp@127.0.0.3@@@@@",
-		"/@5@tcp@127.0.0.1@@@@@",
-		"/@5@tcp@74.125.69.139@@@@@",
-		"/@5@tcp@192.168.1.10@@@@@",
-		"/@5@tcp@74.125.142.83@@@@@",
+		"/@6@tcp@127.0.0.3@@@@@@",
+		"/@6@tcp@127.0.0.1@@@@@@",
+		"/@6@tcp@74.125.69.139@@@@@@",
+		"/@6@tcp@192.168.1.10@@@@@@",
+		"/@6@tcp@74.125.142.83@@@@@@",
 		"/127.0.0.12:14141",
-		"/@5@foobar@127.0.0.10@@@@@",
-		"/@5@foobar@127.0.0.11@@@@@",
+		"/@6@foobar@127.0.0.10@@@@@@",
+		"/@6@foobar@127.0.0.11@@@@@@",
 	}
 	servers = []naming.MountedServer{}
 	// naming.UnknownProtocol
@@ -176,11 +176,11 @@
 		t.Fatalf("unexpected error: %s", err)
 	}
 	want := []string{
-		"/@5@tcp@127.0.0.3@@@@@",
-		"/@5@tcp@127.0.0.1@@@@@",
-		"/@5@tcp@74.125.69.139@@@@@",
-		"/@5@tcp@192.168.1.10@@@@@",
-		"/@5@tcp@74.125.142.83@@@@@",
+		"/@6@tcp@127.0.0.3@@@@@@",
+		"/@6@tcp@127.0.0.1@@@@@@",
+		"/@6@tcp@74.125.69.139@@@@@@",
+		"/@6@tcp@192.168.1.10@@@@@@",
+		"/@6@tcp@74.125.142.83@@@@@@",
 	}
 	if got := servers2names(result); !reflect.DeepEqual(got, want) {
 		t.Errorf("got: %v, want %v", got, want)
@@ -194,16 +194,16 @@
 		t.Fatalf("unexpected error: %s", err)
 	}
 	want = []string{
-		"/@5@ws@127.0.0.3:123@@@@@",
-		"/@5@ws@127.0.0.1@@@@@",
-		"/@5@ws@74.125.69.139@@@@@",
-		"/@5@ws@192.168.1.10@@@@@",
-		"/@5@ws@74.125.142.83@@@@@",
-		"/@5@tcp@127.0.0.3@@@@@",
-		"/@5@tcp@127.0.0.1@@@@@",
-		"/@5@tcp@74.125.69.139@@@@@",
-		"/@5@tcp@192.168.1.10@@@@@",
-		"/@5@tcp@74.125.142.83@@@@@",
+		"/@6@ws@127.0.0.3:123@@@@@@",
+		"/@6@ws@127.0.0.1@@@@@@",
+		"/@6@ws@74.125.69.139@@@@@@",
+		"/@6@ws@192.168.1.10@@@@@@",
+		"/@6@ws@74.125.142.83@@@@@@",
+		"/@6@tcp@127.0.0.3@@@@@@",
+		"/@6@tcp@127.0.0.1@@@@@@",
+		"/@6@tcp@74.125.69.139@@@@@@",
+		"/@6@tcp@192.168.1.10@@@@@@",
+		"/@6@tcp@74.125.142.83@@@@@@",
 	}
 	if got := servers2names(result); !reflect.DeepEqual(got, want) {
 		t.Errorf("got: %v, want %v", got, want)
diff --git a/runtime/internal/rpc/xserver.go b/runtime/internal/rpc/xserver.go
index 3907975..6b98b09 100644
--- a/runtime/internal/rpc/xserver.go
+++ b/runtime/internal/rpc/xserver.go
@@ -769,7 +769,7 @@
 	//nologcall
 	return fs.flow.RemoteDischarges()
 }
-func (fs *xflowServer) Server() rpc.Server {
+func (fs *xflowServer) Server() rpc.XServer {
 	//nologcall
 	return nil // TODO(toddw): Change return to rpc.XServer
 }
diff --git a/services/agent/agentlib/client.go b/services/agent/agentlib/client.go
index 1d72439..c5a68c8 100644
--- a/services/agent/agentlib/client.go
+++ b/services/agent/agentlib/client.go
@@ -408,8 +408,8 @@
 }
 
 func agentEndpoint(proto, addr string) string {
-	// TODO: use naming.FormatEndpoint when it supports version 5.
-	return fmt.Sprintf("@5@%s@%s@@s@@@", proto, addr)
+	// TODO: use naming.FormatEndpoint when it supports version 6.
+	return fmt.Sprintf("@6@%s@%s@@@s@@@", proto, addr)
 }
 
 func AgentEndpoint(fd int) string {
diff --git a/services/device/deviced/internal/impl/dispatcher.go b/services/device/deviced/internal/impl/dispatcher.go
index f02dec4..194e925 100644
--- a/services/device/deviced/internal/impl/dispatcher.go
+++ b/services/device/deviced/internal/impl/dispatcher.go
@@ -102,7 +102,7 @@
 			callback:       newCallbackState(config.Name),
 			updating:       newUpdatingState(),
 			restartHandler: restartHandler,
-			stats:          newStats(),
+			stats:          newStats("device-manager"),
 			testMode:       testMode,
 			tidying:        newTidyingDaemon(ctx, config.Root),
 		},
diff --git a/services/device/deviced/internal/impl/stats.go b/services/device/deviced/internal/impl/stats.go
index caa8dbb..36bb8b4 100644
--- a/services/device/deviced/internal/impl/stats.go
+++ b/services/device/deviced/internal/impl/stats.go
@@ -15,6 +15,8 @@
 // stats contains various exported stats we maintain for the device manager.
 type stats struct {
 	sync.Mutex
+	// Prefix for each of the stat names.
+	prefix string
 	// How many times apps were run via the Run rpc.
 	runs *counter.Counter
 	// How many times apps were auto-restarted by the reaper.
@@ -27,12 +29,17 @@
 	restartsPerInstance map[string]*counter.Counter
 }
 
-func newStats() *stats {
+func newCounter(names ...string) *counter.Counter {
+	return libstats.NewCounter(naming.Join(names...))
+}
+
+func newStats(prefix string) *stats {
 	return &stats{
-		runs:                libstats.NewCounter("runs"),
+		runs:                newCounter(prefix, "runs"),
 		runsPerInstance:     make(map[string]*counter.Counter),
-		restarts:            libstats.NewCounter("restarts"),
+		restarts:            newCounter(prefix, "restarts"),
 		restartsPerInstance: make(map[string]*counter.Counter),
+		prefix:              prefix,
 	}
 }
 
@@ -42,7 +49,7 @@
 	s.restarts.Incr(1)
 	perInstanceCtr, ok := s.restartsPerInstance[instance]
 	if !ok {
-		perInstanceCtr = libstats.NewCounter(naming.Join("restarts", instance))
+		perInstanceCtr = newCounter(s.prefix, "restarts", instance)
 		s.restartsPerInstance[instance] = perInstanceCtr
 	}
 	perInstanceCtr.Incr(1)
@@ -54,7 +61,7 @@
 	s.runs.Incr(1)
 	perInstanceCtr, ok := s.runsPerInstance[instance]
 	if !ok {
-		perInstanceCtr = libstats.NewCounter(naming.Join("runs", instance))
+		perInstanceCtr = newCounter(s.prefix, "runs", instance)
 		s.runsPerInstance[instance] = perInstanceCtr
 	}
 	perInstanceCtr.Incr(1)
diff --git a/services/mounttable/mounttablelib/mounttable_test.go b/services/mounttable/mounttablelib/mounttable_test.go
index ae52282..3cca456 100644
--- a/services/mounttable/mounttablelib/mounttable_test.go
+++ b/services/mounttable/mounttablelib/mounttable_test.go
@@ -450,7 +450,7 @@
 func (fakeServerCall) LocalEndpoint() naming.Endpoint       { return nil }
 func (fakeServerCall) RemoteEndpoint() naming.Endpoint      { return nil }
 func (fakeServerCall) GrantedBlessings() security.Blessings { return security.Blessings{} }
-func (fakeServerCall) Server() rpc.Server                   { return nil }
+func (fakeServerCall) Server() rpc.XServer                  { return nil }
 func (c *fakeServerCall) SendStream() interface {
 	Send(naming.GlobReply) error
 } {
diff --git a/services/syncbase/clock/vclock.go b/services/syncbase/clock/vclock.go
index 876e45b..cf67845 100644
--- a/services/syncbase/clock/vclock.go
+++ b/services/syncbase/clock/vclock.go
@@ -45,11 +45,14 @@
 	if err := c.sa.GetClockData(ctx, clockData); err != nil {
 		if verror.ErrorID(err) == verror.ErrNoExist.ID {
 			// VClock's cron job to setup UTC time at boot has not been run yet.
-			vlog.Error("No ClockData found while creating a timestamp")
+			// TODO(jlodhia): uncomment info messages once clock service
+			// scheduling is enabled. In absence of clock service, no clock
+			// data is present and hence these logs get printed all the time.
+			// vlog.Info("No ClockData found while creating a timestamp")
 		} else {
 			vlog.Errorf("Error while fetching clock data: %v", err)
 		}
-		vlog.Error("Returning current system clock time")
+		// vlog.Info("Returning current system clock time")
 		return c.clock.Now()
 	}
 	skew := time.Duration(clockData.Skew)
diff --git a/services/syncbase/server/mojo_call.go b/services/syncbase/server/mojo_call.go
index d0b9dac..c825bc0 100644
--- a/services/syncbase/server/mojo_call.go
+++ b/services/syncbase/server/mojo_call.go
@@ -16,12 +16,12 @@
 
 type mojoServerCall struct {
 	sec    security.Call
-	srv    rpc.Server
+	srv    rpc.XServer
 	suffix string
 }
 
 // TODO(sadovsky): Synthesize endpoints and discharges as needed.
-func newMojoServerCall(ctx *context.T, srv rpc.Server, suffix string, method rpc.MethodDesc) rpc.ServerCall {
+func newMojoServerCall(ctx *context.T, srv rpc.XServer, suffix string, method rpc.MethodDesc) rpc.ServerCall {
 	p := v23.GetPrincipal(ctx)
 	// HACK: For now, we set the remote (client, i.e. Mojo app) blessing to be the
 	// same as the local (server, i.e. Syncbase Mojo service) blessing.
@@ -63,6 +63,6 @@
 	return security.Blessings{}
 }
 
-func (call *mojoServerCall) Server() rpc.Server {
+func (call *mojoServerCall) Server() rpc.XServer {
 	return call.srv
 }
diff --git a/services/syncbase/server/mojo_impl.go b/services/syncbase/server/mojo_impl.go
index 603f954..27bd987 100644
--- a/services/syncbase/server/mojo_impl.go
+++ b/services/syncbase/server/mojo_impl.go
@@ -33,11 +33,11 @@
 
 type mojoImpl struct {
 	ctx  *context.T
-	srv  rpc.Server
+	srv  rpc.XServer
 	disp rpc.Dispatcher
 }
 
-func NewMojoImpl(ctx *context.T, srv rpc.Server, disp rpc.Dispatcher) *mojoImpl {
+func NewMojoImpl(ctx *context.T, srv rpc.XServer, disp rpc.Dispatcher) *mojoImpl {
 	return &mojoImpl{ctx: ctx, srv: srv, disp: disp}
 }
 
diff --git a/services/syncbase/vsync/responder_test.go b/services/syncbase/vsync/responder_test.go
index dbd0fea..135830c 100644
--- a/services/syncbase/vsync/responder_test.go
+++ b/services/syncbase/vsync/responder_test.go
@@ -487,7 +487,7 @@
 	return security.Blessings{}
 }
 
-func (d *dummyResponder) Server() rpc.Server {
+func (d *dummyResponder) Server() rpc.XServer {
 	return nil
 }
 
diff --git a/services/wspr/internal/app/app.go b/services/wspr/internal/app/app.go
index 6edb6c0..0b22d86 100644
--- a/services/wspr/internal/app/app.go
+++ b/services/wspr/internal/app/app.go
@@ -429,7 +429,7 @@
 }
 func (l *localCall) Recv(interface{}) error                          { return nil }
 func (l *localCall) GrantedBlessings() security.Blessings            { return security.Blessings{} }
-func (l *localCall) Server() rpc.Server                              { return nil }
+func (l *localCall) Server() rpc.XServer                             { return nil }
 func (l *localCall) Timestamp() (t time.Time)                        { return }
 func (l *localCall) Method() string                                  { return l.vrpc.Method }
 func (l *localCall) MethodTags() []*vdl.Value                        { return l.tags }